Build

The JaCoCo build is based on Maven and can be locally executed on every machine with a proper environment setup. In particular you need at least Maven 3.3.9 and JDK 8 installations. Developers are encouraged to run the build before every commit to ensure consistency of the source tree.

Running the Build

The build can be started by executing the following command with ./org.jacoco.build/ as the working directory:

  mvn clean verify

Total build time is typically around 3 minutes, however first build might take more time, because Maven should download plugins and dependencies. The download ZIP will be created at the following location:

  ./jacoco/target/jacoco-x.y.z.qualifier.zip

Running Quick Build without Tests

It is not recommended, however possible to the run build without any tests:

  mvn clean verify -DskipTests

Compilation and testing with different JDKs

By default for compilation and execution of tests will be used JDK that runs Maven. Alternatively you can use JDK from Maven Toolchains by setting property jdk.version.

Following table shows in which classfile version modules will be compiled to depending on version of JDK (empty cells = no compilation possible):

Modules JDK 5 JDK 6 JDK 7 JDK 8 JDK 9 JDK 10 JDK 11 JDK 12 JDK 13 JDK 14 JDK 15 JDK 16
org.jacoco.core.test.validation.java14 14 14 14
org.jacoco.core.test.validation.java8 8 8 8 8 8 8 8 8 8
org.jacoco.core.test.validation.java7 7 7 7 7 7 7 7 7 7 7
org.jacoco.core.test.validation.groovy 8 8 8 8 8 8 8 8 8
org.jacoco.core.test.validation.kotlin 6 6 6 6 6 6 6 6 6 6 6
all other modules 5 5 5 5 6 6 6 7 7 7 7 7

Alternatively you can specify bytecode version for all modules using property bytecode.version.

For example to use JDK 10 from Maven Toolchains and compile all modules into bytecode version 53 (Java 9):

  mvn clean verify -Djdk.version=10 -Dbytecode.version=9

Also Eclipse Compiler for Java can be used for compilation:

  mvn clean verify -Decj

Combining these options JaCoCo is regularly tested with the following setups: