[ https://issues.apache.org/jira/browse/MNG-5227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15130966#comment-15130966 ]
Christian Schulte commented on MNG-5227: ---------------------------------------- Maybe some code helps demonstrating the issue behind this. In [MavenRepositorySystemUtils|https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java;h=3a98b2acc53b828479057814fb0ca4f2f0b30e03;hb=HEAD] you have {code} 101 DependencySelector depFilter = 102 new AndDependencySelector( new ScopeDependencySelector( "test", "provided" ), 103 new OptionalDependencySelector(), new ExclusionDependencySelector() ); 104 session.setDependencySelector( depFilter ); {code} The 'ScopeDependencySelector' is setup to exclude transitive dependencies with scope "test" or "provided". The fix to Aether will stop Aether from returning transitive 'test' scope dependencies. The 'OptionalDependencySelector' is setup to exclude transitive dependencies with 'optional' set to 'true'. The fix to Aether will stop Aether from returning optional transitive dependencies. > The 'optional' flag of a dependency should be manageable. > --------------------------------------------------------- > > Key: MNG-5227 > URL: https://issues.apache.org/jira/browse/MNG-5227 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories > Affects Versions: 3.0.3 > Reporter: Christian Schulte > Assignee: Christian Schulte > Priority: Minor > Fix For: 3.4.0 > > Attachments: MNG-5227.patch, MNG-5227.patch > > > {code} > <dependencyManagement> > <dependencies> > <dependency> > <groupId>groupId</groupId> > <artifactId>artifactId</artifactId> > <version>version</version> > <optional>false</optional> <!-- Ignored by Maven 2 & 3 in dependency > management. --> > </dependency> > </dependencies> > </dependencyManagement> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)