slachiewicz opened a new issue, #1394:
URL: https://github.com/apache/maven-scm/issues/1394

   ### Affected version
   
   2.2.1
   
   ### Bug description
   
   `maven-scm-test:2.2.1` depends on `maven-plugin-testing-harness:3.3.0`, 
which brings `plexus-archiver:2.2` and, through it, 
`plexus-container-default:1.0-alpha-9-stable-1`. Anything that consumes a 
`maven-scm-provider-*test` artifact therefore gets a second copy of 
`org/codehaus/plexus/PlexusContainer.class`, `DefaultPlexusContainer.class` and 
`PlexusTestCase.class` on its test classpath, next to the copy 
`org.eclipse.sisu.plexus` supplies. Which one wins depends on declaration order.
   
   ```
   org.apache.maven.wagon:wagon-scm:jar:3.6.0-SNAPSHOT
      org.apache.maven.scm:maven-scm-provider-gittest:jar:2.2.1
         org.apache.maven.scm:maven-scm-test:jar:2.2.1
            
org.apache.maven.plugin-testing:maven-plugin-testing-harness:jar:3.3.0
               org.codehaus.plexus:plexus-archiver:jar:2.2
                  
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
   ```
   
   This surfaced while moving `wagon-scm` from maven-scm 1.11.1 to 2.2.1. On 
1.x, `maven-scm-manager-plexus` depended on `plexus-container-default` directly 
and wagon excluded it there; #1206 removed that dependency for 2.0.0, but the 
test-scope path above survives, so the exclusion moves rather than disappears.
   
   Master already fixes it. Commit 4287e80 ("Migration to JUnit 5 - avoid using 
PlexusTestCase") replaced the harness with `plexus-testing:2.1.0`, and `mvn -pl 
maven-scm-test -am dependency:tree` on 2.2.2-SNAPSHOT shows neither the harness 
nor `plexus-container-default`. Filing this to record the defect against the 
released version and to have it on the 2.2.2 milestone, not to ask for a code 
change.
   
   Workaround on 2.2.1: exclude `org.codehaus.plexus:plexus-container-default` 
from the `maven-scm-*test` dependency. Excluding the harness itself does not 
work, because `ScmTestCase` extends its `PlexusJUnit4TestCase`.
   
   *This issue was created with AI assistance.*
   


-- 
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