Generates a minimal Maven project for Java with
- JDK 23 (or any version you specify, read below)
- JUnit 5.10.x
Change the jdkVersion
property to change the JDK version. Default value is currently 22
.
Change the javaPreviewFeatures
property to no
or n
if you want to disable preview features. Default value is yes
, which means this archetype will generate a pom.xml
file that allows you to use the newest preview features of Java.
Change the values of DgroupId
, -DartifactId
and -Dversion
to match your own project details. These properties are required. archetypeGroupId
, archetypeArtifactId
and archetypeVersion
must remain as is.
mvn archetype:generate -DarchetypeGroupId=no.dervis \
-DarchetypeArtifactId=java-starter \
-DarchetypeVersion=1.0.13 \
-DgroupId=org.mygroup \
-DartifactId=demoapp \
-Dversion=1.0.0 \
-DjdkVersion=23 \
-DjavaPreviewFeatures=yes \
-DinteractiveMode=false
https://central.sonatype.com/artifact/no.dervis/java-starter/1.0.13
- mvn clean compile
- mvn clean install
- mvn versions:display-dependency-updates
- mvn versions:use-releases
- mvn versions:use-next-releases
- mvn versions:use-latest-releases