Skip to content

hantsy/cargotracker

 
 

Repository files navigation

Eclipse Cargo Tracker – Applied Domain‑Driven Design Blueprints for Jakarta EE

build arq-glassfish-managed arq-wildfly-managed

Quality Gate Status Coverage

Eclipse Cargo Tracker is based on the sample application from Eric Evans’ Domain-Driven Design book and demonstrates how to apply DDD principles in a Jakarta EE context.

Warning

This is my personal fork of Eclipse EE4J CargoTracker. I am also a contributor to the CargoTracker project.

Note

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

This fork adds a number of practical improvements while keeping the original domain‑driven design examples intact.

What’s different in this fork

  • Consistent PostgreSQL environment – Docker configuration lets you run the database identically in development and production.
  • WildFly support – in addition to GlassFish the app can now start on WildFly via the official Maven plugin.
  • More flexible testing – fine‑grained Maven profiles based on the Jakarta EE 10 template project make it easy to switch between Arquillian adapters.
  • Cleaner UI – PrimeFaces is replaced with lightweight Bootstrap CSS and plain Facelets templates; all views were reorganised and tidied.
  • Expanded test coverage – additional unit and integration tests exercise more use cases.
  • GitHub Actions automation – builds, tests and code‑quality reports (Jacoco/SonarCloud) run on every push.

Eric’s book also featured a companion client application, the ddd sample regapp, originally built with Spring and Swing. I’ve since ported that sample to the Jakarta EE ecosystem using the following stacks:


Getting started

Requirements

  • Java 21
  • Apache Maven 3.9+
  • Git
  • Docker (for PostgreSQL)
  • Application server:

Starting the database

A docker-compose.yaml file sits at the project root. To launch PostgreSQL:

cd /path/to/cargotracker
docker compose up postgres

You only need this step once per terminal session; the tests and the running application both rely on the same container.

Running the application

GlassFish

mvn clean package cargo:run -Pglassfish

WildFly

mvn clean wildfly:run -Pwildfly

Once deployment finishes, open your browser at http://localhost:8080/cargo-tracker.

Testing

Tests are written with JUnit and executed by Arquillian. Multiple Maven profiles allow you to choose the target container.

Note

Make sure the PostgreSQL container is running before launching any integration tests (see “Starting the database” above).

Execute tests against GlassFish

mvn clean verify -Parq-glassfish-managed

Execute tests against WildFly

mvn clean verify -Parq-wildfly-managed

Note

For detailed configuration examples refer to the Jakarta EE 9 template project or the Jakarta EE 10 template project and the accompanying guide.

About

Cargotracker

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 86.5%
  • HTML 13.2%
  • CSS 0.3%