maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hoffer <dhoff...@gmail.com>
Subject How to exclude transitive dependencies from war?
Date Mon, 17 Sep 2012 19:09:54 GMT
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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message