I want to run JaCoCo from the command line on a Maven project without including JaCoCo configuration into the pom.xml.
How do I configure and invoke JaCoCo from the command line like:
$ mvn test <JaCoCo - config params>
In essence, I am looking to get a coverage report for a Maven project without having to manually edit its pom.xml. Invoking JaCoCo directly on the Maven project (without invoking the mvn
command would work to.
You can use:
mvn clean org.jacoco:jacoco-maven-plugin:0.8.8:prepare-agent verify org.jacoco:jacoco-maven-plugin:0.8.8:report
to call jacoco generation directly from command line without any change in your pom file.
You can replace verify
by test
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With