Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] Exclusions on a dependency

On 29.09.2011 02:08, Michael Guymon wrote:
> 
> Hello Aetherians,
> 
> I am trying to add a Dependency with an Exclusion, but the Exclusion
> does not appear to be applied with the dependencies are resolved. Here
> is the paraphrased code I am using based on what I figured out from the
> javadocs:
> 
>     Dependency dependency = new Dependency(new DefaultArtifact(
> "org.apache.tomcat:jasper:6.0.23" ), null);
>     List<Exclusion> exclusions = new ArrayList<Exclusion>();
>     exclusions.add( new Exclusion( "org.apache.tomcat", "catalina",
> null, null) );               
>     dependency.setExclusions( exclusions );

Hi,

Dependency is immutable, Dependency#setExclusions creates a new
instance. From a brief look at your code, it looks like you are still
using the old one without the exclusion.

Ben


Back to the top