JaCoCo, Maven and NetBeans 8 integration

May 22, 2014 by Michael

I was looking for a nice solution to measure the code coverage in my Spring Boot biking project.

It should support Java 8, Maven and for added bonus, my IDE.

I ended up using JaCoCo respectively the Maven plugin.

If you expect a lengthier post, i must disappoint you. All that was need to turn this:


into this


and also having a nice report like this (right click in NetBeans 8 on the project and choose “Code Coverage > Show Report…”)


was the following plugin declaration in maven:

		<!-- Application starter -->
		<!-- Configuration -->
			<!--  implmentation is needed only for Maven 2  -->
			<rule implementation="org.jacoco.maven.RuleConfiguration">
				<limit implementation="org.jacoco.report.check.Limit">
				<!--  implmentation is needed only for Maven 2  -->
				<limit implementation="org.jacoco.report.check.Limit">

That’s it. NetBeans 8 recognizes JaCoCo immediately and everything works (except for my project not reaching my self set limits). No additional installs, no weird maven problems. Awesome.

Also i had no problems with JaCoCo and Java 8 features of any kind.


  1. Merlin Thomas wrote:

    Thanks for the post. Did exactly what I needed real quick.

    Posted on December 16, 2014 at 4:32 PM | Permalink
  2. Henrik wrote:

    Brilliant. Got it working in 2 minutes. Thank you!

    Posted on June 1, 2015 at 3:21 PM | Permalink
  3. Michael wrote:

    You’re welcome!

    Posted on June 8, 2015 at 9:42 AM | Permalink
Post a Comment

Your email is never published. We need your name and email address only for verifying a legitimate comment. For more information, a copy of your saved data or a request to delete any data under this address, please send a short notice to michael@simons.ac from the address you used to comment on this entry.
By entering and submitting a comment, wether with or without name or email address, you'll agree that all data you have entered including your IP address will be checked and stored for a limited time by Automattic Inc., 60 29th Street #343, San Francisco, CA 94110-4929, USA. only for the purpose of avoiding spam. You can deny further storage of your data by sending an email to support@wordpress.com, with subject “Deletion of Data stored by Akismet”.
Required fields are marked *