diff --git a/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java index 650fefaf2f..91b1cfea56 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java @@ -31,6 +31,37 @@ public class DefaultProjectDependenciesResolver public Set resolve( MavenProject project, String scope, ArtifactRepository localRepository, List remoteRepositories ) throws ArtifactResolutionException, ArtifactNotFoundException { + /* + + Logic for transitve global exclusions + + List exclusions = new ArrayList(); + + for ( Dependency d : project.getDependencies() ) + { + if ( d.getExclusions() != null ) + { + for ( Exclusion e : d.getExclusions() ) + { + exclusions.add( e.getGroupId() + ":" + e.getArtifactId() ); + } + } + } + + ArtifactFilter scopeFilter = new ScopeArtifactFilter( scope ); + + ArtifactFilter filter; + + if ( ! exclusions.isEmpty() ) + { + filter = new AndArtifactFilter( Arrays.asList( new ArtifactFilter[]{ new ExcludesArtifactFilter( exclusions ), scopeFilter } ) ); + } + else + { + filter = scopeFilter; + } + */ + ArtifactFilter scopeFilter = new ScopeArtifactFilter( scope ); ArtifactFilter filter = scopeFilter;