[ 
https://issues.apache.org/jira/browse/SUREFIRE-2000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17496286#comment-17496286
 ] 

Slawomir Jaranowski commented on SUREFIRE-2000:
-----------------------------------------------

Dependency tree of test project is:
{code}
org.example:junit5-runner:jar:1.0-SNAPSHOT
+- org.junit.jupiter:junit-jupiter-engine:jar:5.6.2:test
|  +- org.apiguardian:apiguardian-api:jar:1.1.0:test
|  +- org.junit.platform:junit-platform-engine:jar:1.6.2:test
|  |  +- org.opentest4j:opentest4j:jar:1.2.0:test
|  |  \- org.junit.platform:junit-platform-commons:jar:1.6.2:test
|  \- org.junit.jupiter:junit-jupiter-api:jar:5.6.2:test
\- org.junit.platform:junit-platform-runner:jar:1.6.2:test
   +- junit:junit:jar:4.13:test
   |  \- org.hamcrest:hamcrest-core:jar:1.3:test
   +- org.junit.platform:junit-platform-launcher:jar:1.6.2:test
   \- org.junit.platform:junit-platform-suite-api:jar:1.6.2:test
{code}

We have direct dependency on {{junit-platform-runner}}

To detect providers as {{JUnitPlatform}} method is used:

{code}
    private Artifact getJUnit5Artifact()
    {
        if ( getProjectArtifactMap().get( 
"org.junit.platform:junit-platform-runner" ) != null )
        {
            return null;
        }

        Artifact artifact = getPluginArtifactMap().get( 
"org.junit.platform:junit-platform-engine" );
        if ( artifact == null )
        {
            return getProjectArtifactMap().get( 
"org.junit.platform:junit-platform-commons" );
        }

        return artifact;
    }
{code}

so because we have {{junit-platform-runner}} and {{junit 4}} on project 
classpath provider {{JUnit4Provider}} is used ... and rest is ok.

> Classpath contains redundant JAR artifacts if ShadeFire provider is active
> --------------------------------------------------------------------------
>
>                 Key: SUREFIRE-2000
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2000
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Failsafe Plugin, Maven Surefire Plugin, 
> surefire-shadefire
>    Affects Versions: 3.0.0-M5
>            Reporter: Tibor Digana
>            Assignee: Slawomir Jaranowski
>            Priority: Major
>             Fix For: 3.0.0-M6
>
>         Attachments: MANIFEST.MF-for-M4, MANIFEST.MF-for-M5, 
> MANIFEST.MF-for-M6, junit5-runner.tgz
>
>
> There are extra more artifacts than necessary on the classpath if ShadeFire 
> provider is used. This may cause new conflicts if testing Surefire itself.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to