Hi Gao, just to let you know, there are also good alternatives, you've just to choose which one fits better with your needs:
* The Apache's Shade plugin[1] * The Sonatypes's JarJar plugin[2] My preferred is the Sonatype's one because it allows define classes rewrite rules (you can repackage dependencies under a custom name). All the best, Simo [1] http://maven.apache.org/plugins/maven-shade-plugin/ [2] http://sonatype.github.com/jarjar-maven-plugin/ http://people.apache.org/~simonetripodi/ http://www.99soft.org/ 2010/12/29 Maxime Gréau <[email protected]>: > Hi, > > To do this kind of thing, you have to use the maven-assembly-plugin ( > http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies > *).* > > Maxime Gréau. > http://mgreau.com > > > > 2010/12/29 Gao Lin <[email protected]> > >> Hi: >> >> I need to make a single jar as the project output, and it needs some >> of (not all) it`s dependencies packaged into the lib/ directory in the >> target jar file, how to write the pom.xml ? >> >> example: >> >> <dependencies> >> >> <groupId>org.rhq</groupId> >> <artifactId>rhq-httpcheck-plugin</artifactId> >> <version>1.0.0</version> >> <packaging>jar</packaging> >> >> <dependency> >> <groupId>sun-javamail</groupId> >> <artifactId>mail</artifactId> >> <version>1.4</version> >> <scope>compile</scope> >> </dependency> >> >> <dependency> >> <groupId>${rhq.groupId}</groupId> >> <artifactId>rhq-core-plugin-container</artifactId> >> <version>1.3.0.GA</version> >> <scope>test</scope> >> </dependency> >> </dependencies> >> >> The sun-javamail should be packaged into rhq-httpcheck-plugin.jar file >> in the lib/ directory, the rhq-core-plugin-container should not, how >> can I do that? >> >> >> -- >> Thanks and Best Regards >> >> [email protected] >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
