You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "laudio.info" <la...@gmail.com> on 2012/12/08 20:57:19 UTC

exclusion only when test

hello

i have one artifact (A1) that depends from another artifact (A2)

the A2 artifact has one dependency but when i make the A1's tests i want to
exclude one dependency
i am using the exclusion into the dependency but i cannot say it that the
exclusion applies only whent test.

is this posible?

thanks

Re: exclusion only when test

Posted by Anders Hammar <an...@hammar.net>.
No, you cannot set a scope for an exclusion.

/Anders


On Sat, Dec 8, 2012 at 8:57 PM, laudio.info <la...@gmail.com> wrote:

> hello
>
> i have one artifact (A1) that depends from another artifact (A2)
>
> the A2 artifact has one dependency but when i make the A1's tests i want to
> exclude one dependency
> i am using the exclusion into the dependency but i cannot say it that the
> exclusion applies only whent test.
>
> is this posible?
>
> thanks
>

RE: exclusion only when test

Posted by Martin Gainty <mg...@hotmail.com>.
centralising dependency information for differing child poms can be achieved via dependency-management mechanismhttp://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management activating which grouping is included is achieved by defining profiles by testinf your attributes (i.e. when condition) will trigger that profile to be includedhttp://maven.apache.org/guides/introduction/introduction-to-profiles.html  
Martin 
______________________________________________ 
Long winded disclaimer goes here
 > Date: Sat, 8 Dec 2012 20:57:19 +0100
> Subject: exclusion only when test
> From: laudio.info@gmail.com
> To: users@maven.apache.org
> 
> hello
> 
> i have one artifact (A1) that depends from another artifact (A2)
> 
> the A2 artifact has one dependency but when i make the A1's tests i want to
> exclude one dependency
> i am using the exclusion into the dependency but i cannot say it that the
> exclusion applies only whent test.
> 
> is this posible?
> 
> thanks