Skip to content

hantsy/cargotracker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eclipse Cargo Tracker - Applied Domain-Driven Design Blueprints for Jakarta EE

build

arq-glassfish-managed arq-glassfish-remote

arq-wildfly-managed arq-wildfly-remote

Quality Gate Status Coverage

This is a personal fork of Eclipse EE4J CargoTracker, I'm also a contributor of the CargoTracker project.

For the detailed introduction to the CargoTracker project, go to the upstream project website: https://eclipse-ee4j.github.io/cargotracker/.

There are some highlights when comparing to the upstream project.

  • Utilize Docker to run a Postgres Database in both development and production to erase the risk brought by different environments.
  • Add support to run application on WildFly.
  • Add several fine-grained Maven profiles for varied Arquillian Container adapters, which is derived from Jakarta EE 10 template project.
  • Replace Primefaces with simple Bootstrap css style and plain Facelets templates, clean up and reorganize all Facelets templates.
  • Add a plenty of testing codes to cover more use cases.
  • Add GitHub Actions workflows to build the project and run testing codes, and generate code quality report via Jacoco, SonarCloud.

I have also ported the original Cargotracker regapp which was written in Spring and Swing UI to Jakarta EE/CDI world, check the following projects.

Build and Run

Prerequisites

Startup PostgresSQL Database

There is a docker-compose.yaml file available in the project root folder.

In your terminal, switch to the project root folder, and run the following command to start a Postgres instance in Docker container.

docker compose up postgres

GlassFish

Run the following command to run the application on GlassFish v7 using cargo maven plugin.

mvn clean package cargo:run -Pglassifsh

WildFly

Run the following command to run the application on WildFly using the official WildFly maven plugin.

mvn clean wildfly:run -Pwildfly

When the application is deployed sucessfully, open your browser, go to http://localhost:8080/cargo-tracker

Testing

Cargo Tracker's testing is done using JUnit and Arquillian.

There are several Maven profiles configured for running the testing codes against varied Arquillian Container adapters.

Note: Before running the Arquillian integration tests, make sure there is a running Postgres database ready for test, check the Build section for more details.

GlassFish

Open a terminal window, execute the following command to run Arquillian tests against Payara Managed Adapter.

mvn clean verify -Parq-glassfish-managed

Or run this command instead to run tests against a Glassfish Remote adapter.

Note: Make sure there is a running Glassfish server on your local machine.

mvn clean verify -Parq-glassfish-remote 

WildFly

Run the following command to run Arquillian tests against WildFly Managed Adapter.

mvn clean verify -Parq-wildfly-managed

// or run on a remote WildFly server
mvn clean verify -Parq-wildfly-remote 

More details about the Arquillian adapter's configuration, go to Jakarta EE 9 template project or Jakarta EE 10 template project, and follow this comprehensive guide to research them yourself.

Packages

No packages published

Languages

  • Java 85.2%
  • HTML 14.5%
  • CSS 0.3%