gnodet commented on issue #6521:
URL: https://github.com/apache/maven/issues/6521#issuecomment-4110348796

   ### Status: Still reproducible on Maven 4.1.0-SNAPSHOT
   
   Tested with the original scenario from the issue report:
   
   ```xml
   <dependencies>
       <dependency>
           <groupId>org.apache.axis2</groupId>
           <artifactId>axis2-xmlbeans</artifactId>
           <version>1.5</version>
           <scope>provided</scope>
       </dependency>
       <dependency>
           <groupId>org.apache.axis2</groupId>
           <artifactId>axis2-codegen</artifactId>
           <version>1.5</version>
           <exclusions>
               <exclusion>
                   <groupId>org.apache.geronimo.specs</groupId>
                   <artifactId>geronimo-stax-api_1.0_spec</artifactId>
               </exclusion>
           </exclusions>
       </dependency>
   </dependencies>
   ```
   
   `mvn dependency:tree` output:
   ```
   +- org.apache.axis2:axis2-xmlbeans:jar:1.5:provided
   |  +- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile 
  ← should be provided
   \- org.apache.axis2:axis2-codegen:jar:1.5:compile
   ```
   
   The `geronimo-stax-api_1.0_spec` is resolved as `compile` but should be 
`provided`. The only non-excluded path to this artifact is through 
`axis2-xmlbeans` (scope `provided`), so the effective scope should be 
`provided`.
   
   This appears to be a Maven Resolver issue in how exclusions interact with 
scope mediation — the excluded path's scope (`compile` via `axis2-codegen`) is 
being used instead of the surviving path's scope (`provided` via 
`axis2-xmlbeans`).
   
   Moving to 4.1.0 as this is a long-standing resolver behavior issue that 
needs careful investigation in Maven Resolver 2.0.
   
   _Claude Code on behalf of Guillaume Nodet_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to