<execution>
<id>merge</id>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<fileSet dir="${project.build.directory}/jacoco-execs">
<includes>
<include>*.exec</include>
</includes>
</fileSet>
<destFile>${project.build.directory}/coverage-merged/jacoco.exec</destFile>
</configuration>
</execution>
However, when I run 'mvn -e jacoco:merge' from a command line, I get the following error message
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: org.jacoco:jacoco-maven-plugin. Reason: Invalid or missing parameters: [Mojo parameter [name: 'fileSets'; alias: 'null']] for mojo: org.jacoco:jacoco-maven-plugin:0.6.4-SNAPSHOT:merge
I suspect that my settings are wrong, but I was unable to find any examples whatsoever anywhere on the internet. So I'd like to ask, how do I merge the execution files? Right now, I'm trying to at least make the whole process work step by step from a command line before tying it more closely with my build process.
Thanks,
Jan
--
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.
For more options, visit https://groups.google.com/groups/opt_out.
Meanwhile, I tried maven 3. This fails with the message "Skipping JaCoCo merge execution due to missing execution data files". This is odd since I have two exec files in the target/jacoco-execs/ directory. By looking at JaCoCo's code, I suspect that the syntax is still wrong and the files don't reach their destination. Any ideas?
Thanks,
Jan
Thanks,
Jan
--
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.
For more options, visit https://groups.google.com/groups/opt_out.
Hello,
Henrik is right, for Maven 2 please use implementation hints (see the referred github source link, the online documentation is not up to date :-)).
When you want to specify configuration parameters in an execution element for one goal only and invoke it from the CLI instead of executing the goal during a phase of the build, please use the id default-GOALNAME, i.e. default-merge. Or use default-cli for configurations concerning all CLI invocations.
Regards Mirko
--
Sent from my mobile
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.4-SNAPSHOT</version>
<configuration>
<fileSets>
<!-- Implementation attribute not needed in Maven 3 -->
<fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
<directory>${project.build.directory}/jacoco-execs/</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
</fileSets>
<!-- File containing the merged data -->
<destFile>${project.build.directory}/jacoco-merged/merged.exec</destFile>
</configuration>
<executions>
<execution>
...
</execution>
...
</executions>
</plugin>
Thank you, I'm happy with what I've got right now, but could you tell me what should the 'execution' part of the POM look like? I'm quite new to Maven and perhaps other people who find this post would be more interested in doing this automatically.
Hi ,
can you please send the POM file for merging the different .exec files.
I am facing a similar situation , i have 3 modules which generates 3 different .exec files , so i need to merge all the coverage reports and create a new aggregated file.
can you please post POM files , that you tried with.
where to keep the merge goal in, parent POM or any module ?