maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lewis, Eric" <>
Subject Skinny WAR and SNAPSHOT
Date Thu, 07 Mar 2013 13:32:44 GMT

I know a lot has been written about skinny WARs and the problems they represent.

The strategy that we're using is:

- Set dependencies in the web module to scope 'provided', except dependencies that are web-specific
(PrimeFaces, ...)
- Set skinnyWars to true in the EAR project

The strategy works very well for releases. But for SNAPSHOTs (we use Maven 3.0.4 with timestamped
JARs) we have the problem that the same dependency still exists in both the WAR/WEB-INF/lib
and the EAR/lib:


>From my point of view, this is what happens:
- The WAR plugin for my.war resolves all dependencies and puts them into its WEB-INF/lib.
For some reason, the JARs contain the timestamp instead of SNAPSHOT in the filename.
- The WAR is deployed to the repo
- The EAR plugin for my.ear gets the my.war and tries to figure out what files are both in
its dependencies as well as in the WAR's WEB-INF/lib
- However, since the two filenames of util-logging differ, it's only successful up to a certain
extent - anything which is resolved to different filenames leaves me with two JARs.

Am I right with this?

Also, how can I solve the problem with the SNAPSHOTs?
Is there any other way than to force people to always use 'provided' in the web module? (I
guess I should write a Maven Enforcer rule for that)

Thanks for any pointers...

Best regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message