These instructions apply to the entire repository. They are aimed at helping Codex agents build and run the core unit tests that live under maven/core-unittests.
- Use Java 8 when running the Maven build. This matches the CI configuration in
.github/workflows/pr.ymland avoids JaCoCo instrumentation errors with newer JDKs. - Set
JAVA_HOMEand updatePATHbefore invoking Maven:export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 export PATH="$JAVA_HOME/bin:$PATH"
- From the repository root, run the same Maven goal the PR CI uses for the core unit tests:
cd maven mvn clean verify -DunitTests=true -pl core-unittests -am -Dmaven.javadoc.skip=true -Plocal-dev-javase - This command will compile the dependencies, run the
core-unitteststest suite, and generate quality reports (SpotBugs/PMD/Checkstyle/JaCoCo) inmaven/core-unittests/target. - For a quicker edit/build cycle while iterating on tests, you can skip the clean step and run just the module’s tests:
cd maven mvn -pl core-unittests -am -DunitTests=true -Dmaven.javadoc.skip=true -Plocal-dev-javase test
- For the fastest smoke check Codex can run while editing tests, use the helper script to execute a single lightweight test with the CI flags:
This keeps the Java 8 toolchain, skips the top-level clean, and targets
./scripts/fast-core-unit-smoke.sh
ButtonGroupTestfor a sub-minute feedback loop.
- Test reports:
maven/core-unittests/target/surefire-reports/ - Coverage:
maven/core-unittests/target/site/jacoco/ - Static analysis:
maven/core-unittests/target/spotbugs*.xml,maven/core-unittests/target/pmd.xml,maven/core-unittests/target/checkstyle-result.xml