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

surefire use jdkToolchain as per compiler plugin

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.22.2, 3.0.0-M3
    • None
    • Maven Surefire Plugin
    • None

    Description

      I'm trying to create a multi-release project, supporting java 1.8 and java 11.

      My issue is I'm having a nightmare executing tests against both 1.8 and 11.

      Could surefire have an option like compile to configure the jdkToolchain.

      I understand that jvm is another config option, but that from what i'm reading requires the path to the java executable which isn't as helpful.

      I would like to add something like this;

      <configuration>
          <jdkToolchain>
              <version>11</version>
          </jdkToolchain>
      </configuration>

      or this;

      <executions>
        <execution>
          <id>java11</id>
          <phase>test</phase>
          <goals>
            <goal>test</goal>
          </goals>
          <configuration>
            <jdkToolchain>
              <version>11</version>
            </jdkToolchain>
          </configuration>
        </execution>
      </executions>

       

       

      Thinks might be planned, but at the moment I'm having a nightmare using toolchain executions but if i get surefire running with java 11 then following phases also use java 11 which means jar and javadoc fail in my current setup.

      Attachments

        Issue Links

          Activity

            People

              tibordigana Tibor Digana
              nhoj.patrick John Patrick
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: