Maven Archetypes to conveniently bootstrap new Java projects
MIT License
Maven Archetypes are a project templating toolkit to scaffold new Maven projects in seconds.
This repository contains a set of custom Maven Archetypes to conveniently bootstrap your next Java project:
Prerequisites:
testing-toolkit
archetype)Bootstrap a new Maven project using an archetype on Mac and Linux:
mvn archetype:generate \
-DarchetypeGroupId=de.rieckpil.archetypes \
-DarchetypeArtifactId=<archetype name> \
-DarchetypeVersion=<latest archetype version> \
-DgroupId=<your group id> \
-DartifactId=<your artifact id> \
-DinteractiveMode=false
Bootstrap a new Maven project using an archetype on Windows (CMD or PowerShell):
mvn archetype:generate "-DarchetypeGroupId=de.rieckpil.archetypes" "-DarchetypeArtifactId=<archetype name>" "-DarchetypeVersion=<latest archetype version>" "-DgroupId=<your group id>" "-DartifactId=<your artifact id>" "-DinteractiveMode=false"
Make sure to replace all <xyz>
placeholders before running the commands on your machine.
The available archetype names are:
testing-toolkit
jakartaee8
javaee8
javaee8-jsf
You can find the latest version of each archetype as part of the badges on top of this README. The badges display the version with a preceding v
, e.g. v1.0.2
which you must remove.
Complete example for Mac or Linux:
mvn archetype:generate \
-DarchetypeGroupId=de.rieckpil.archetypes \
-DarchetypeArtifactId=testing-toolkit \
-DarchetypeVersion=1.0.2 \
-DgroupId=com.mycompany \
-DartifactId=order-service \
-DinteractiveMode=false
cd order-service
./mvnw package
Complete example for Windows:
mvn archetype:generate "-DarchetypeGroupId=de.rieckpil.archetypes" "-DarchetypeArtifactId=testing-toolkit" "-DarchetypeVersion=1.0.2" "-DgroupId=com.mycompany" "-DartifactId=order-service" "-DinteractiveMode=false"
cd order-service
mvnw package
Archetype name: testing-toolkit
With this Maven archetype you can bootstrap a simple Java 17 application with basic testing capabilities in seconds. This archetype contains the following files/dependencies:
.gitignore
Refer to the Maven Setup For Testing Java Applications blog post on how to get started with this project.
Archetype name: jakartaee8
With this Maven archetype you can bootstrap a simple Jakarta EE 8 application in seconds. This archetype contains the following files/dependencies:
beans.xml
with bean-discovery-mode="all"
persistence.xml
configured for JTA persistence unitmicroprofile-config.properties
for configuration.sh
and .bat
Bootstrapping and deploying a new application under Linux/Mac (Docker daemon needs to run):
mvn archetype:generate -DarchetypeGroupId=de.rieckpil.archetypes -DarchetypeArtifactId=jakartaee8 -DarchetypeVersion=1.1.0 -DgroupId=de.rieckpil.blog -DartifactId=jakartaee-8-microservice -DinteractiveMode=false
cd jakartaee-8-microservice
./buildAndRun.sh
After Open Liberty successfully started visit http://localhost:9080/resources/sample
Archetype name: javaee8
With this Maven archetype you can bootstrap a simple Java EE 8 application in seconds. This archetype contains the following files/dependencies:
beans.xml
with bean-discovery-mode="all"
persistence.xml
configured for JTA persistence unitmicroprofile-config.properties
for configuration.sh
and .bat
Bootstrapping and deploying a new application under Linux/Mac (Docker daemon needs to run):
mvn archetype:generate -DarchetypeGroupId=de.rieckpil.archetypes -DarchetypeArtifactId=javaee8 -DarchetypeVersion=2.1.0 -DgroupId=de.rieckpil.blog -DartifactId=javaee-8-microservice -DinteractiveMode=false
cd javaee-8-microservice
./buildAndRun.sh
After Open Liberty successfully started visit http://localhost:9080/resources/sample
Archetype name: javaee8-jsf
With this Maven archetype you can bootstrap a simple Java EE 8 JSF application in seconds. This archetype contains the following files/dependencies:
web.xml
for JSF development with bootstrap
as selected PrimeFaces themebeans.xml
with bean-discovery-mode="all"
persistence.xml
configured for JTA persistence unitmicroprofile-config.properties
for configurationindex.xhtml
with backing bean SampleBean
.sh
and .bat
Bootstrapping and deploying a new application under Linux/Mac (Docker daemon needs to run):
mvn archetype:generate -DarchetypeGroupId=de.rieckpil.archetypes -DarchetypeArtifactId=javaee8-jsf -DarchetypeVersion=2.1.0 -DgroupId=de.rieckpil.blog -DartifactId=jsf-app -DinteractiveMode=false
cd jsf-app
chmod +x buildAndRun.sh
./buildAndRun.sh
After Open Liberty successfully started visit http://localhost:9080/