JavaEE 8 + Payara 5 + Microprofile 2.1 + Docker In about a minute

Thin Wars to the rescue

It can be really easy to start on your JavaEE / JakartaEE application. It’ll take you about a minute…

In this minute you will get a project with:

  • JavaEE 8
  • MicroProfile 2.1
  • Preconfigured Payara 5 Full server docker container - ivonet/payara:5.184
  • Maven essential setup
  • Run and build scripts for all of this

The minute has started…

Enter the code below in a terminal were you want to create your project and press enter

1
2
3
4
mvn archetype:generate \
-DarchetypeGroupId=nl.ivonet \
-DarchetypeArtifactId=jakartaee8-payara-microprofile-archetype \
-DarchetypeVersion=1.0 -U

The first time you run this command, it will take just a bit more time as it will
download everything needed from the maven central repository.

you will be asked these questions:

1
2
3
4
5
Define value for property 'groupId': com.example
Define value for property 'artifactId': helloworld
Define value for property 'version' 1.0-SNAPSHOT: :
Define value for property 'package' com.example: :
Define value for property 'docker-hub-name': example

Just follow the instructions and your project will be created:

1
2
cd helloworld
./run

This will start the project in a docker container.
The docker container will be downloaded the first time and that might take more than the minute depending
on the speed of your internet connection.
After the first time it will only take seconds.

Now go to http://localhost:8080//rest/example and you will have a working
example HelloWorld application.

Done 😄

After burner

Now you can load it into your favorite IDE and start building your own stuff.
Don’t forget to read the README.md of the project to learn more about the available commands.

Have fun.

Links