This project provides a simple Maven archetype for generating a Jakarta EE 9 project.
The work of this project is being ported to Eclipse EE4J Starter, see: eclipse-ee4j/starter#63.
Generate a Jakarta EE 9 project skeleton from Maven archetype
- Java 8 +
- Apache Maven 3.6
This archetype is uploaded the Maven Central Repository.
Using the following command to generate a Jakarta EE 9 project skeleton.
mvn -B archetype:generate \
-DarchetypeGroupId=io.github.hantsy \
-DarchetypeArtifactId=maven-archetype-jakartaee9 \
-DarchetypeVersion=1.0 \
-DgroupId=com.example \
-Dpackage=com.example.demo \
-DartifactId=myapp \
-Dversion=1.0-SNAPSHOT
I also uploaded a snapshot version to Github Packages. If you want to use the latst snapshot version. Add the follwing repositories settings in your ~/.m2/settings.xml
.
<repositories>
<repository>
<id>github-public</id>
<url>https://public:0[email protected]/hantsy/*</url>
</repository>
</repositories>
Once the project is generated, switch to the project root.
Run the application using the following command.
mvn clean package cargo:run
It will download a copy of Glassfish v6.0, and create a new domain for this project and start it immediately. After the Glassfish is running, then deploy the packaged application on the Glassfish.
Try to test the sample REST API endpoint.
curl http://localhost:8080/myapp/api/greeting/JakartaEE
It is a quick way to experience the Jakarta EE 9 stack.
To run the sample testing codes.
Firstly make sure there is a running Glassfish server. Then run the following command.
mvn clean verify -DskipTests=false
If you want to explore the source codes or contribute this project, follow the below steps to build the project.
-
Checkout the source codes.
git clone https://github.com/hantsy/maven-archetype-jakartaee9
-
Then build the project.
mvn clean install