Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2240

Using JUnit BOM prevents upgrading the engine version via plugin dependency

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.1
    • 3.3.0
    • JUnit 5.x support
    • None

    Description

      The change being introduced in SUREFIRE-2177 prevents updating the junit-jupiter-engine through explicit plugin dependencies as outlined in https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html#select-engine-and-use-multiple-apis:

      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.10.2</version>
          </dependency>
        </dependencies>
      </plugin>
      

      The following classpath is then used in m-surefire-p

      [INFO] --- surefire:3.2.2:test (default-test) @ doxia-converter ---
      [DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=62708, ConflictMarker.markTime=28792, ConflictMarker.nodeCount=94, ConflictIdSorter.graphTime=19292, ConflictIdSorter.topsortTime=17458, ConflictIdSorter.conflictIdCount=48, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=382250, ConflictResolver.conflictItemCount=92, DfDependencyCollector.collectTime=35588250, DfDependencyCollector.transformTime=530209}
      [DEBUG] org.apache.maven.plugins:maven-surefire-plugin:jar:3.2.2
      [DEBUG]    org.junit.jupiter:junit-jupiter-engine:jar:5.10.2:runtime
      [DEBUG]       org.junit.platform:junit-platform-engine:jar:1.9.3:runtime (version managed from default)
      ...
      

      The managed junit-platform-engine version is incompatible (as being downgraded via https://github.com/apache/maven-surefire/blob/2fed802397f8c7de4cfc72f49ab4565e72f7aab7/pom.xml#L311-L318)
      For this reason there shouldn't be any depMgmt used in surefire.

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: