Vincent Massol wrote on Monday, April 18, 2005 10:14 AM: > Hi Brett, > >> -----Original Message----- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> Sent: lundi 18 avril 2005 09:08 >> To: [EMAIL PROTECTED] >> Subject: cvs commit: maven-components/maven-plugins/maven-assembly- >> plugin/src/main/resources/assemblies jar-with-dependencies.xml > > [snip] > >> add ability to build a JAR with its dependencies unpacked inside. > > Cool. Just a question: In the cargo's build I have the following > structure: > > cargo/ > |_ core/ > |_ util/ > |_ module/ > |_ container/ > |_ ant/ > |_ samples/ > |_ ant/ > |_ java/ > > Ideally I would like that the core's pom.xml produces an > aggregated jar from util/, module/ and container/ and that > the ant/, samples/ant/ and samples/java project have a single > dependency on this aggregated jar. > > How would that work? If I type "m2 install" it will not > produce the aggregated jar as I believe it'll be done during > the assembly stage only, right? > > Of course, I could still have the other projects depend on > the individual jars but then it's not as good as they won't exercise > the generated jar. > > Any idea how this UC could be supported?
javaapp ? Seriously, this is the job of the javaapp in M1. With this possibility a port of javaapp to M2 is a little hollow if it just reuses the functionality of the jar plugin, but with the aggregated jar as main artifact. OTOH I currently don't know enough about the different artifact type support of M2, but I believe you can specify a dependency. All that is left to support this is, that the aggregated jar has a different artifact type. One question to Brett though: How does the aggregation work, if two dependent artifacts come with the same classes? The aggregation must ensure, that the same classes are available as it would have been using a normal classpath i.e. the aggragation may not overwrite classes already provided by another artifact in the dependency list. A use case is my current app, that is a standalone java app running in a server environment managed with JMX. Additionally it has to access EJBs provided by an app server. In my case I have to use jboss-client-3.2.3.jar as dependency for accessing the EJBs and mx4j-<XXX>-2.1.1.jar for the JMX functionality. Unfortunately jboss-client-3.2.3.jar contains also a subset (!) of the classes defined by JSR3 and the app breaks if this dependency is in the classpath before the mx4j jars. - Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]