Skip to content
/ jeeez Public

A simple command-line scaffolding tool that get's you started on developing a Java EE application in seconds.

License

Notifications You must be signed in to change notification settings

38leinaD/jeeez

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JEEEZ

jeeez

JEEEZ is a command-line scaffolding tool that gets you started on developing a Jakarta EE application in seconds. It’s just a set of Bash-scripts; so it should be running on most flavors of Linux, Unix, MacOS X and for Windows under Cygwin or MSYS.

As the scaffold-projects come with Docker Compose files for most application-servers, it is helpful to have docker and docker-compose commands installed. By this, you will be able to deploy and test your application right from the start and without the need to install an application-server.

But in case you want to locally install an application-server, the tool will also help you to do this. It can download, extract and configure major application-servers with just a single command.

The tool was originally created due to the non-existing scaffolding/archetype-mechanism in Gradle but has grown beyond what e.g. archetypes in Maven can do. If you use the tool, you will notice soon that it is powerful but also optionated because it needs to serve my needs in demos and trainings. But that does not mean in cannot be useful to others.

Also note that I am using mostly Gradle nowadays. So, Gradle is tested more thoroughly by me. But still, the tool supports Maven to a large extent and I am always trying to make sure to keep it on par with Gradle.

Installation

Installation can be done from the commandline.

Automatic

curl https://raw.githubusercontent.com/38leinaD/jeeez/master/installer -sSf | sh

Manually from Git

$ git clone https://github.com/38leinaD/jeeez.git
$ echo "\nalias jz='$(pwd)/jeeez/jz'" >> ~/.bashrc

Usage

Run the tool without any argument to get some help on the usage.

The main feature/command is project:create

$ jz project:create
Usage: jz project:create [groupid.]artifactid [OPTIONS]

Create a Jakarta EE project from a template

Options:
    --jee-version=7|8 (default: 7)
    --template=ear|st|war (default: war)
    --st (creates a system-test project; same as --template=st)
    --build=gradle|maven (default: gradle)

Example:
$ jz project:create jz.myapp
    This will use some defaults (*) and create a project that...
    - is Jakarta EE 7-compliant (*),
    - packages as a WAR archive (*),
    - has group-id "jz",
    - has artifact-id "myapp",
    - and builds with Gradle (*)

Now, lets scaffold, build and deploy a Jakarta EE app.

Gradle

$ jz project:create de.dplatz.myapp
[INFO] Succesfully created a project with artifact-id 'myapp' and group-id 'de.dplatz' from template 'war'.
[INFO] ------------------------------------------------------------------------
[INFO] Build & run it with './run_docker.sh'.
[INFO] Open http://localhost/myapp/resources/health when the server is started.
[INFO] ------------------------------------------------------------------------
[INFO] Build, run & system-test it with './gradlew systemTest'.
[INFO] ------------------------------------------------------------------------

Maven

$ jz project:create de.dplatz.myapp --maven

System Tests

Have a check in the folder test for the CI-test-scripts of JEEEZ. They provide good examples of what you can achive with this tool

E.g. you can also generate a seperate system-tests project in addition to the main project.

$ jz project:create de.dplatz.myapp --st
[INFO] Succesfully created system-test project with artifact-id 'myapp-st' and group-id 'de.dplatz' from template 'st'.
[INFO] ------------------------------------------------------------------------
[INFO] Run them with './gradlew systemTest'.
[INFO] This project only works in conjunction with the project named 'myapp' located parallel to this project.
[INFO] Make sure to run  the build on it at least once to generate the artifact to deploy.
[INFO] ------------------------------------------------------------------------
$ cd myapp-st; ./gradlew systemTest

System-tests are run against a Docker Compose-based environment. See the myapp-st project for docker-compose.yml files for various application-servers. The default being used in the docker-compose.yml is Wildfly. But to e.g. test against Websphere Liberty, just run:

$ cd myapp-st; ./gradlew systemTest -PcomposeFile=docker-compose.wlp.yml

Docker compose files are provided for the following application-servers:

  • Wildfly 19

  • TomEE 8

  • Open Liberty 20

  • Websphere Traditional 9

  • Payara 5

WARN: The Maven template currently only supports a seperate system-test project. The Gradle war-template has the system-tests included already.

EARs

EAR-files have grown unpopular in modern Jakarta EE but I sometimes still need to test Jakarta EE features with EAR-packaged applications. That’s why you can also generate them:

$ jz project:create de.dplatz.myapp --ear
[INFO] Succesfully created a project with artifact-id 'myapp' and group-id 'de.dplatz' from template 'ear'.
[INFO] ------------------------------------------------------------------------
[INFO] Build & run it with './run_docker.sh'.
[INFO] Open http://localhost/myapp/resources/health when the sever is started.
[INFO] ------------------------------------------------------------------------

Supported Application Servers

The following combinations of application-server and specifications are supported/tested.

Jakarta EE

Microprofile

Wildfly 19

8

3.2

TomEE 7

8

2.0.1

Open Liberty 18

8

3

Websphere Traditional 9

7

-

Payara 5

8

2.1

Todos

None

About

A simple command-line scaffolding tool that get's you started on developing a Java EE application in seconds.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published