Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.3, 1.4
-
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
- duplicates
-
MARCHETYPES-61 Update quickstart to use JUnit 5 by default
- Closed
- is related to
-
MARCHETYPES-82 generate maven.compiler.release property as comment
- Closed
- relates to
-
MARCHETYPES-86 using m-compiler-p 3.13.0, always generate maven.compiler.release property instead of old source/target
- Open
- links to