aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes maven packaging is not including dependent jars Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "maven packaging is not including dependent jars" Watch "maven packaging is not including dependent jars" New topic
Author

maven packaging is not including dependent jars

dhoni Gibson
Ranch Hand

Joined: Feb 10, 2011
Posts: 30
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

Joined: May 14, 2008
Posts: 5837
    
    7

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.


JBoss In Action
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: maven packaging is not including dependent jars