Skip to content

Latest commit

 

History

History
78 lines (63 loc) · 3.17 KB

File metadata and controls

78 lines (63 loc) · 3.17 KB

Building

Prerequisites

  • Java SDK 17 or 21 (OpenJDK recommended) — CI builds with both — and Git
  • Docker — not strictly required, but needed by some integration tests (Testcontainers-based); those tests can be skipped
  • For GraalVM native image builds, follow the Quarkus guide; on macOS, see DEVELOP_ON_MACOS.md

Basic build

Build with Maven from the root:

mvn clean install

A full build with all tests takes a long time. Common ways to shorten the cycle:

Flag Effect
-DskipTests Skip unit and integration tests
-DquickTests Formatting validation and unit tests only (skips invoker and archetype tests)
-DskipITs Skip integration tests only (failsafe)
-Dinvoker.skip=true Skip maven-invoker-based integration tests (e.g. in kie-maven-plugin)
-Dquickly Skip most plugins and tests
-Dfull Also build distribution modules (fullProfile)

You can also build only the module you work on, plus what depends on it, with standard Maven reactor flags (-pl <module> -am / -amd).

Tests

  • Unit tests run with surefire; integration tests run with failsafe and are named with a trailing IT (e.g. SomethingIT.java).
  • Some tests assume an en_US locale. On machines with a different locale, activate the test-en profile: -Ptest-en or -DTestEn.
  • Test coverage (Jacoco): mvn clean verify -Ptest-coverage, report under target/site/jacoco/.
  • Quarkus modules: @QuarkusTest classes are unit tests (surefire), @QuarkusIntegrationTest classes are integration tests (failsafe, *IT.java). The two cannot be mixed in the same integration-test phase.
  • Maven-invoker-based integration tests (which build real kjars with the KIE Maven plugin) support running a subset with -Dinvoker.test=<pattern>; their build logs land under target/it/<module_name>/build.log.

Troubleshooting

  • UnmappableCharacterException during the build: set MAVEN_OPTS=-Dfile.encoding=UTF-8 (as an environment variable, not a mvn argument) and rebuild.
  • Testcontainers fails with "Can not connect to Ryuk at localhost" (seen with some Docker for Mac versions, or when privileged containers are not allowed): try export TESTCONTAINERS_RYUK_DISABLED=true.
  • Locale-dependent test failures: use the test-en profile described above.