maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gilday" <>
Subject Re: Dependency scope
Date Tue, 11 Sep 2007 09:10:15 GMT
Hi Antonio,
Thanks for the link.  That lead me on to
So I added a block like so:

I use * to avoid duplication of my version (of course I could use
property here).
This prevents the JAR appearing in the WAR as I wish.  Unfortunately
this caused another issue.  All the transitive dependencies of my
artifact still appear in the WAR!  To prevent this would require more
duplication than my original alternative profile method.  Is there a way
to exclude from the WAR but specify dependency artifacts rather than
file patterns?  I'm guessing there isn't from the docs.


----- Original message -----
From: "Antonio Petrelli" <>
To: "Maven Users List" <>
Date: Tue, 11 Sep 2007 10:50:28 +0200
Subject: Re: Dependency scope

2007/9/11, Martin Gilday <>:
> Is there a dependency scope which makes an artifact available for
> compilation of src/main/java and also on the test classpath, but not
> included in the resulting WAR?  I have tried provided which makes sense
> in excluding it from the WAR but then it is not available to my tests.
> The only solution I have found is to make another profile to use when
> testing which overwrites the provided scope to default scope.  This
> means duplicating all of the dependency blocks, so is far from ideal.

I think that you need to exclude it manually, in the WAR plugin


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

View raw message