This is my personal fork of eclipse-ee4j/cargotracker, some features planned to sync to the upstream project is in progress.
For the detailed introduction to this project, go to the original project website: https://eclipse-ee4j.github.io/cargotracker/.
Follow the following steps to try it on your local system.
In this project, we use Postgres as an example.
There is a docker-compose.yaml file available in the project root folder.
Switch to the project root folder, and run the following command to start a Postgres instance in Docker container.
docker-compose up postgres
Run the following command to run the application on Payara 5 using cargo maven plugin.
mvn clean package cargo:run
Open your browser, go to http://localhost:8080/cargo-tracker
Run the following command to run the application on WildFly using the official WildFly maven plugin.
mvn clean package wildfly:run -Pwildfly
Open your browser, go to http://localhost:8080/cargo-tracker
Cargo Tracker's testing is done using JUnit and Arquillian. There are several Maven profiles configured for running the testing codes against various adapters.
For testing locally you will first need to run a Payara 5 server.
You can do that with the following script:
wget https://repo1.maven.org/maven2/fish/payara/distributions/payara/5.2020.7/payara-5.2020.7.zip
unzip payara-5.2020.7.zip && cd payara5/bin
./asadmin start-domain
Now for running the tests:
mvn -Ppayara -DskipTests=false test
I also added configuration of running tests on Payara Embedded and Payara Micro adapters, but they failed. See the issues I reported on Payara issue tracker.
Getting the latest WildFly distribution from the official WildFly website.
You can do that with the following script:
wget https://download.jboss.org/wildfly/23.0.0.Final/wildfly-23.0.0.Final.zip
unzip wildfly-23.0.0.Final.zip && cd wildfly-23.0.0.Final/bin
./standalone -c standalone-full.xml
Follow the WildFly Admin Guide to add a new admin user(admin/admin@123
).
Now for running the tests against WildFly:
mvn clean verify -Parq-wildfly-remote -DskipTests=false
Run Arquillian tests against WildFly Managed Adaper.
mvn clean verify -Parq-wildfly-managed -DskipTests=false
Run the following command to run testing codes on an embedded WildFly.
mvn clean verify -Parq-wildfly-embedded -DskipTests=false