Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

maven packaging is not including dependent jars

 
dhoni Gibson
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

MY APPLICATION STRUCTURE :My project (let us say AAA) which has packaging as JAR. project AAA is added dependent for web project BBB and BBB inturn module for CCC which is an EAR.

while doing AAA project maven build, maven is not including the dependent jars as part of packaging, and deployment eventually fails when i deploy the ear package.

questions

1) how to make common libraries share among parent and child projects so that avoid duplicates
2) how to include individual project libraries (which is not common) during maven build

Thanks
Dhoni
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that what you are looking for is the Assembly plugin (http://maven.apache.org/plugins/maven-assembly-plugin/). It will create a JAR file that contains all of the classes from dependencies. The Jar plugin only includes classes that the project compiled.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic