Imho this is a very good solution if your WAR really is a very skinny one, ie has no content in WEB-INF/lib and WEB-INF/classes AND you like to have all the jars in your EAR (common libs for all WARs) rather than in the single WAR.
If one of the WARs does contain libs, you may end up with having different versions of the same jar in your final EAR. At the end of the day, one should be able to configure on the EAR level which lib is common for all WARs (APP-INF/lib) and removed from all WARs WEB-INF/lib folders The rest should be skipped and left back in the WARs. With the warpath plugin, Michael Horwitz originally addressed the WAR-overlay problem, so altough there are a few common points, it mostly covers WAR-WAR and not WAR-EAR dependencies. There are a few comments on this topic in MWAR-73 and MWAR-131. LieGrü, strub --- Milos Kleint <[EMAIL PROTECTED]> schrieb am Mi, 4.6.2008: > Von: Milos Kleint <[EMAIL PROTECTED]> > Betreff: Re: Tip about Skinny Wars > An: "Maven Users List" <[email protected]> > Datum: Mittwoch, 4. Juni 2008, 11:17 > i'm wondering if the solution would render the war-path > plugin > obsolete? it's causing trouble in embedded use. > http://issues.appfuse.org/browse/APF-645 > > Milos > > On 6/3/08, Arnaud HERITIER <[EMAIL PROTECTED]> > wrote: > > Hi all, > > > > I would like to share with you a workaround I found > for the problem of > > transitive dependencies in skinny wars. > > In the documentation it is said that : > > "Now the painful part. Your EAR's > <<<pom.xml>>> needs to list every > > dependency that the WAR has. > > This is because Maven assumes fat WARs and does not > include transitive > > dependencies > > of WARs within the EAR." > > > > A workaround of this is to define for each war 2 > dependencies. One for the > > war itself and another for the war's pom to > retrieve transitive > > dependencies. > > With that you'll have something like that in > your ear dependencies : > > > > <dependencies> > > <dependency> > > <groupId>com.acme</groupId> > > <artifactId>war1</artifactId> > > <version>1.0.0</version> > > <type>war</type> > > </dependency> > > <dependency> > > <groupId>com.acme</groupId> > > <artifactId>war1</artifactId> > > <version>1.0.0</version> > > <type>pom</type> > > </dependency> > > </dependencies> > > > > I'm using maven 2.0.9. > > > > I'll do more tests tomorrow and I'll update > the doc : > > > http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html > > > > Cheers > > > > > > arnaud > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] __________________________________________________________ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
