Alex, that's perfect! Exactly the kind of thing I'm trying to do myself. Would you mind posting your reactor, war, jar and parent poms please? I'd really like to see a working example of this in action.
Cheers, Adam On 7 April 2011 09:51, Alex Lopez <alo...@flordeutopia.pt> wrote: > Here we have a similar setup, we manage to build everything into a WAR > including dependent jars using reactor/assembly project: > > BTW, we use separate poms for parent (inheritance) and reactor > (multi-module), which I think makes sense as all sub-modules have the parent > as parent but not one sub-module even knows about the reactor one (which > serves just to build everything). > > So the reactor project lists ALL other modules (besides parent, only used > to inherit properties). Not a module depends or inherits from reactor > module. The war module depends on some jars, which in turn depend on other > jars etc. > > So when we issue "mvn install" or "mvn deploy" in the reactor project, it > will first see the dependency graph going from the war to everything else, > and first install/deploy the needed things (jars) so, when it reaches the > war for packaging, all the necesary jars have already been > installed/deployed, and are available as dependencies to the war, which gets > packaged and installed/deployed as expected. > > So I thing the tricky part for us to see about reactor and parent and > modules and all this stuff was separating concerns: our parent only used to > inherit, the reactor only used to lists all other modules, and the build > order is determined by a correctly specified dependency graph (the war > depends on jars, etc). > > With multiple wars I believe it should behave the same way, if dependencies > spring from the wars to the jars they depend on (and thus when building > separate graphs are calculated each culminating in a war with other > dependencies included inside as jars). > > Em 06-04-2011 15:46, Wendy Smoak escreveu: > > On Wed, Apr 6, 2011 at 10:44 AM, Adam Gibbons<adam.s.gibb...@gmail.com> >> wrote: >> >>> Also I refer you to: >>> http://maven.apache.org/plugins/maven-assembly-plugin/which states >>> that it can create distributions in the war format. >>> >> >> It *can* but you generally only need it if the war plugin is not doing >> what you need. >> >> When building a war, the war plugin is the logical choice _until_ you >> run into some complication that the war plugin can't solve. >> >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >