Hi,

hard to tell from this snippet what is going on here. My first guess is that 
when you configure a different location for the report goal you must also 
specify that locaton on the prepare-agent goal (“destfile”). See documentation: 
https://www.jacoco.org/jacoco/trunk/doc/prepare-agent-mojo.html 
<https://www.jacoco.org/jacoco/trunk/doc/prepare-agent-mojo.html>

Regards,
-marc



> On 1. Sep 2023, at 16:43, Rostislav Alpin <[email protected]> wrote:
> 
> Good day!
> I am getting the error "Skipping JaCoCo execution due to missing execution 
> data file."
> This is the message I am getting during test executions; hence, reports are 
> not generated.
> I have tried multiple variations of plugins. Below is one of the basic 
> plugins:
> <plugin>
> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> 
> <version>0.8.10</version> <executions> <execution> <goals> 
> <goal>prepare-agent</goal> </goals> </execution> <!-- attached to Maven test 
> phase --> <execution> <id>report</id> <phase>test</phase> <goals> 
> <goal>report</goal> </goals> <configuration> <!-- Sets the path to the file 
> which contains the execution data. --> 
> <dataFile>${basedir}/mqe-unified-platform-brand-tests/target/jacoco.exec</dataFile>
>  <!-- Sets the output directory for the code coverage report. --> 
> <outputDirectory>${basedir}/mqe-unified-platform-brand-tests/target/my-reports</outputDirectory>
>  </configuration> </execution> </executions> </plugin>
> 
> After adding the plugin, executed the tests using Maven.
> The below command is used to run a particular test by specifying the test 
> case ID.
> `mvn clean test -pl mqe-unified-platform-brand-tests -am -Dgroups=22623656`
> Even if the data "file path" is provided explicitly in the plugin, I was 
> getting the same message in the terminal.
> Please advise.
> 
> 
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/00524f7e-ff2e-4fcb-9dc5-130160e48e31n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/00524f7e-ff2e-4fcb-9dc5-130160e48e31n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/5D8781BB-FDB9-4862-821C-C86924CF1059%40mountainminds.com.

Reply via email to