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.
- 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:
- cargotracker-regapp-javafx – CDI/Weld + JavaFX
- cargotracker-regapp-quarkus-javafx – Quarkus + Quarkus‑FX extension/JavaFX
- cargotracker-regapp-kotlin-multiplatform – Kotlin Multipleplatform(KMP) for Android, ios, Desktop(Swing) and Web.
- Java 21
- Apache Maven 3.9+
- Git
- Docker (for PostgreSQL)
- Application server:
- GlassFish v8 or
- WildFly (wait for a Jakarta EE 11‑compatible release)
A docker-compose.yaml file sits at the project root. To launch PostgreSQL:
cd /path/to/cargotracker
docker compose up postgresYou only need this step once per terminal session; the tests and the running application both rely on the same container.
mvn clean package cargo:run -Pglassfishmvn clean wildfly:run -PwildflyOnce deployment finishes, open your browser at http://localhost:8080/cargo-tracker.
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).
mvn clean verify -Parq-glassfish-managedmvn clean verify -Parq-wildfly-managedNote
For detailed configuration examples refer to the Jakarta EE 9 template project or the Jakarta EE 10 template project and the accompanying guide.