Uploaded image for project: 'Maven Archetype Bundles'
  1. Maven Archetype Bundles
  2. MARCHETYPES-70

Quickstart support for junit 5 and java 9+

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.3, 1.4
    • 1.5
    • None
    • Quickstart supports java 9+ and junit 5. To specify the java version and junit version set the properties javaCompilerVersion (default = 1.7) and junitVersion (default = 4.13.1) respectively.

    Description

      Quickstart archetype is outdated due to the support for java versions below 9 and junit 4.

      The changes needs to be made backwards compatible in order to avoid breaking changes for legacy projects.

      For the support of java 9+ the java version tag must change from:

      <!-- example for java 8 and below -->
       <maven.compiler.source>1.8</maven.compiler.source>
      <maven.compiler.target>1.8</maven.compiler.target>
      

      to:

      <!-- example with java 11 -->
      <maven.compiler.release>11</maven.compiler.release>
      

      For junit 5 support it is needed to add junit-jupiter-api and the vintage plugin, to add support for large older projects (with old junit tests in it).

      Example for dependencies for junit 5 it will look like:

          <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.2.2</version>
            <scope>test</scope>
          </dependency>
          <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.2.2</version>
            <scope>test</scope>
          </dependency>
      

       

      Attachments

        Issue Links

          Activity

            People

              eolivelli Enrico Olivelli
              jfahner Jurrian Fahner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: