How to skip jacoco coverage check during build?

IKo picture IKo · Feb 11, 2020 · Viewed 9.3k times · Source

In our project we use jacoco-maven-plugin and during the build I get this error:

[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.5:check (jacoco-check) on project my-project: Coverage checks have not been met. See log for details. 

I know that it's better to fix coverage and so on. But sometimes I just need to quickly build a project. Is there some kind of parameter for this purpose? Like mvn clean install -Dskip.jacoco.check=true or other way to quickly skip this check?

Answer

Wlad picture Wlad · Aug 27, 2020

As @wemu commented below OP u can use -Djacoco.skip=true command line option to skip Jacoco code instrumentation and coverage report generation temporarily. Examples:

mvn clean test -Djacoco.skip=true
mvn clean verify -Djacoco.skip=true
mvn clean package -Djacoco.skip=true
mvn clean install -Djacoco.skip=true