This is a Maven archetype project for using Java 21
- Clone this repository.
- Install and configure Java 21 and Maven 3.9.5.
- Run
mvn clean install
. - After you do that, you can
cd ../somewhere-else
and runmvn archetype:generate
, and the last item on the list will be your locally installed archetype, which you can select by number. The image below shows an example:
The resulting Java project contains a minimal HelloWorld and accompanying test and uses the latest JUnit 5.x and latest versions of various Maven plugins. To package and run the resulting project, you'd typically:
mvn clean package
java -jar target/${artifactId}-${version}.jar