Harper, Brad wrote at Montag, 11. Mai 2009 21:55: > Is there a way to detect when the dependencies of two war artifacts are > inconsistent with respect to packaged jar versions? > > > > E.g. a war depends on artifact abc-1.0.0.jar. An overlay is performed > where an inconsistent dependency on abc-1.0.1.jar is also defined. > > > > The resulting war will contain both jar files and, so far as I can tell, > the subsequent behavior is indeterminate.
We avoid this by turning all war projects into projects with packaging jar that creates a normal library out of the classes. The war is itself build then with a classifier (webapp in our case). The jar plugin has been configured to create the resulting jar in target/webapp/WEB-INF/lib while the war is assembled in target/webapp. Therefore the war contains also the local jar and resources. In case of an overlay we exclude then any stuff from WEB-INF/lib and WEB-INF/classes and get the proper dependencies declaring the jar and the webapp both as deps. - Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
