Can't find the correct syntax for <dataFileIncludes> parameter in jacoco:report-aggregate

905 views
Skip to first unread message

chris....@gmail.com

unread,
Oct 13, 2016, 11:49:01 AM10/13/16
to JaCoCo and EclEmma Users
Hello,

As described in http://www.eclemma.org/jacoco/trunk/doc/report-aggregate-mojo.html, I'm trying to use the <dataFileIncludes> parameter in jacoco:report-aggregate:

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.7.201606060606</version>
<executions>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
<configuration>
<dataFileIncludes>**/*.exec</dataFileIncludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Maven replies:
"[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.7.7.201606060606:report-aggregate (report-aggregate) on project virtualization-jacoco-aggregate: Unable to parse configuration of mojo org.jacoco:jacoco-maven-plugin:0.7.7.201606060606:report-aggregate for parameter dataFileIncludes: Cannot assign configuration entry 'dataFileIncludes' with value '**/*.exec' of type java.lang.String to property of type java.util.List -> [Help 1]

Please, can someone explain what's the right syntax to use this parameter?
Thanks.

Chris

Marc R. Hoffmann

unread,
Oct 14, 2016, 2:04:10 AM10/14/16
to jac...@googlegroups.com

chris....@gmail.com

unread,
Oct 14, 2016, 5:50:48 AM10/14/16
to JaCoCo and EclEmma Users
Hi,

Thanks for the examples!

In fact, my real problem is: some of our integration tests run in a OSGI context. We use the "maven-bundle-plugin" to build each module bundle and the "maven-ipojo-plugin" because ... we use iPojo :). This plugin modifies some classes of the bundle to add some byte code. When the report-aggregate runs, it displays that it can manage these modified classes because they do not match to execution data.
I've added the "classDumpDir" in the root project:
<jacoco.classDumpDir>${project.build.directory}/classdumps</jacoco.classDumpDir>
but it has not changed the result. It seems that the aggregate-report don't use the dumped classes. Did I forget something?
Thanks for all.

Chris

chris....@gmail.com

unread,
Oct 14, 2016, 7:54:45 AM10/14/16
to JaCoCo and EclEmma Users, chris....@gmail.com
Marc,

I've decompiled a iPojo-modified class from the JaCoCo dumped classes and it contains iPojo code. If the report-aggregate uses the 'dumped classes' to build the report then that means that it compares the iPojo-modified classes to the ones located in the target/classes directory of the related project (these classes are not modified).
Is it possible to force the aggregate-report plugin to use the project bundles (OSGI jar) instead of its classes?
Regards.

Chris

Marc R. Hoffmann

unread,
Oct 19, 2016, 3:35:06 PM10/19/16
to jac...@googlegroups.com
Hi,

the classDumpDir option only applies to the prepare-agent goal. The
aggregate report goal simply uses the projects output directory (e.g.
target/classes). This behaviour currently can't be configured.

Cheers,
-marc

chris....@gmail.com

unread,
Oct 20, 2016, 3:56:53 AM10/20/16
to JaCoCo and EclEmma Users
Hello Marc,

So it is not recommended to use the aggregate-report with classes modified by iPojo. Do I create an issue ticket as "Add a 'useJar' option to the 'aggregate-report'"?

Thanks.
Chris

Marc Hoffmann

unread,
Oct 21, 2016, 7:05:57 AM10/21/16
to jac...@googlegroups.com
Hi,

'useJar' is a bit unspecific, depending on the type of build the name
can be different, there can be even multiple JARs. So I don't think we
would add such a feature.

Regards,
-marc

chris....@gmail.com

unread,
Oct 24, 2016, 7:40:22 AM10/24/16
to JaCoCo and EclEmma Users
Hi Marc,

Maybe the 'aggregate-report' could use the imported classes instead of the project output directories when the classDumpDir variable is defined?

Chris

Le vendredi 21 octobre 2016 13:05:57 UTC+2, Marc R. Hoffmann a écrit :
> Hi,
>

Marc R. Hoffmann

unread,
Oct 24, 2016, 4:37:26 PM10/24/16
to jac...@googlegroups.com
Hi Chris,

only those classes which are actually loaded are dumped. All other
(uncovered!) classes would be missed.

Regards,
-marc
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages