Hello, I believe there is now a skinny war option in the ear plugin that could help you to handle this case. I never used it so I cannot really tell you more about it.
Another option would be to have 2 profiles to build your war. One with all dependencies provided by the ear marked as provided, and another one with the same dependencies with compile/runtime scope. Again another option would be to exclude dependencies at package time (in the war plugin configuration) Hope this helps, Vincent Le 17 sept. 2012 21:10, "David Hoffer" <dhoff...@gmail.com> a écrit : > I need to package a war so that it can be optionally included in a ear > deployment, put I can't just mark the ear level dependencies as > provided because I do need the full war doing development work and > running GWT hosted mode. > > I've followed this link > > http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html > regarding how to set the dependency as optional, which seems like it > might be the right solution, as I want the full war in the current > project but when used as an ear dependency I want it to exclude a > dependency (and all its transitive dependencies). > > However its not working that way...if I set the artifact via: > > <dependency> > <groupId>com.foo</groupId> > <artifactId>bar</artifactId> > <scope>compile</scope> > <optional>true</optional> > </dependency> > > It removes just the artifact bar from the war but leaves in the war > all it's transitive dependencies, which is not expected. How can I > also exclude it's transitive dependencies? This point is key as the > logic provided by the ear is significant and probably has 100 or more > jars...no way to know what they all are and that can change too. > > -Dave > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >