mirror of https://github.com/apache/maven.git
[MNG-4203] [regression] Dependency exclusions are not applied transitively
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@785362 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
25c795c4ac
commit
be6ec8844e
|
@ -176,6 +176,8 @@ public class MavenMetadataSource
|
||||||
dependencyArtifact.setFile( new File( d.getSystemPath() ) );
|
dependencyArtifact.setFile( new File( d.getSystemPath() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ArtifactFilter newFilter = dependencyFilter;
|
||||||
|
|
||||||
if ( !d.getExclusions().isEmpty() )
|
if ( !d.getExclusions().isEmpty() )
|
||||||
{
|
{
|
||||||
List<String> exclusions = new ArrayList<String>();
|
List<String> exclusions = new ArrayList<String>();
|
||||||
|
@ -185,14 +187,15 @@ public class MavenMetadataSource
|
||||||
exclusions.add( e.getGroupId() + ":" + e.getArtifactId() );
|
exclusions.add( e.getGroupId() + ":" + e.getArtifactId() );
|
||||||
}
|
}
|
||||||
|
|
||||||
ArtifactFilter newFilter = new ExcludesArtifactFilter( exclusions );
|
newFilter = new ExcludesArtifactFilter( exclusions );
|
||||||
if ( dependencyFilter != null )
|
if ( dependencyFilter != null )
|
||||||
{
|
{
|
||||||
newFilter = new AndArtifactFilter( Arrays.asList( dependencyFilter, newFilter ) );
|
newFilter = new AndArtifactFilter( Arrays.asList( dependencyFilter, newFilter ) );
|
||||||
}
|
}
|
||||||
dependencyArtifact.setDependencyFilter( newFilter );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencyArtifact.setDependencyFilter( newFilter );
|
||||||
|
|
||||||
artifacts.add( dependencyArtifact );
|
artifacts.add( dependencyArtifact );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue