Where to download the latest snapshot build?

58 views
Skip to first unread message

David Hoffer

unread,
Sep 7, 2023, 6:16:39 PM9/7/23
to JaCoCo and EclEmma Users
I read here https://www.jacoco.org/jacoco/trunk/doc/changes.html that there is a 0.8.11 snapshot build available.  Where can I download this one or the latest one?

I am having problems in a JDK17 build getting accurate code coverage reports using 0.8.10 so was hoping to try a later build.

-Dave

Marc Hoffmann

unread,
Sep 8, 2023, 7:44:15 AM9/8/23
to JaCoCo and EclEmma Users
Hi David,

we publish the master branch to this Snapshot repository:



But 0.10.0 should support Java 17. What exactly is the problem?

Regards,
-marc



--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/28163b1d-7de3-4eb1-9c86-8b181d7261bbn%40googlegroups.com.

David Hoffer

unread,
Sep 8, 2023, 10:34:26 AM9/8/23
to JaCoCo and EclEmma Users
I tried getting it from that link but I can't view what versions are there as directory listing is disabled.

The problem is we have a multi module Maven building using JDK17 and we have configured JaCoCo to generate a consolidated code coverage report.  I'm using an approach I found on the web that involves coping this:

<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.ant</artifactId>

To each of the modules and then it uses:

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>

With a target configured like this:
<target>
<!-- Execute an ant task within maven -->
<echo message="Generating JaCoCo Reports"/>
<taskdef name="report" classname="org.jacoco.ant.ReportTask">
<classpath path="${basedir}/target/jacoco-jars/org.jacoco.ant.jar"/>
</taskdef>
<mkdir dir="${basedir}/target/coverage-report"/>
<report>
<executiondata>
<fileset dir="${build.directory.projecta}">
<include name="jacoco.exec"/>
</fileset>
<fileset dir="${build.directory.projectb}">
<include name="jacoco.exec"/>
</fileset>
<fileset dir="${build.directory.projectc}">
<include name="jacoco.exec"/>
</fileset>
<fileset dir="${build.directory.projectd}">
<include name="jacoco.exec"/>
</fileset>
<fileset dir="${build.directory.projecte}">
<include name="jacoco.exec"/>
</fileset>
<fileset dir="${build.directory.projectf}">
<include name="jacoco.exec"/>
</fileset>
</executiondata>
<structure name="jacoco-multi Coverage Project">
<group name="jacoco-multi">
<classfiles>
<fileset dir="${classes.directory.projecta}"/>
<fileset dir="${classes.directory.projectb}"/>
<fileset dir="${classes.directory.projectc}"/>
<fileset dir="${classes.directory.projectd}"/>
<fileset dir="${classes.directory.projecte}"/>
<fileset dir="${classes.directory.projectf}"/>
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${sources.directory.projecta}"/>
<fileset dir="${sources.directory.projectb}"/>
<fileset dir="${sources.directory.projectc}"/>
<fileset dir="${sources.directory.projectd}"/>
<fileset dir="${sources.directory.projecte}"/>
<fileset dir="${sources.directory.projectf}"/>
</sourcefiles>
</group>
</structure>
<html destdir="${basedir}/target/coverage-report/html"/>
<xml destfile="${basedir}/target/coverage-report/coverage-report.xml"/>
<csv destfile="${basedir}/target/coverage-report/coverage-report.csv"/>
</report>
</target>

The problem is the resulting report says many of the classes have no unit test coverage when in fact they are fully unit tested.

Also I can't even get the Jacoco plugin to exclude certain folders of source files.

Perhaps there is a better way to configure Jacoco for multimodule projects to get one consolidated report?

So I don't know if the problem is with the approach I am using or if its with JDK17. It does report code coverage on a few of the classes just not on all of them.

Is there a definitive best approach for creating consolidated reports in multi-module Maven builds?

Thanks,
-David


David Hoffer

unread,
Sep 8, 2023, 10:42:37 AM9/8/23
to JaCoCo and EclEmma Users
E.g. my approach is using this https://gist.github.com/maggandalf/3124339 to generate the reports.

Perhaps that's not the best way as we are effectively using ANT instead of Maven to generate the reports yet the Maven plugin is configured like this:

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
</configuration>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
</configuration>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
</configuration>
</execution>
</executions>
</plugin>

It's a pretty confusing setup over all.

David Hoffer

unread,
Sep 12, 2023, 3:05:49 PM9/12/23
to jac...@googlegroups.com
I wanted to provide an update.  It appears this issue was caused by having both junit v4 &v5 in our classpath, we added the following and this seems to work fine now.

<dependency> <groupId>org.junit.vintage</groupId> <artifactId>junit-vintage-engine</artifactId> <version>5.4.0</version> <scope>test</scope> </dependency>

The only issue I have not verified is the file excluding issue but the aggregated tests look correct now.


You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/dz9Rg_wI-Jo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/adbb0c67-c3a3-4c6f-8309-fa538ee542d7n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages