Hi Marc,
I updated the "prepare-agent as you suggested but still no reports 
generated.
My current plaugin looks as below, please take a look and tell if you see 
that anything is off
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<executions>
<execution>
<id>jacoco-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<classDumpDir>
${basedir}/mqe-unified-platform-brand-tests/target/jacoco.classDumpDir</
classDumpDir>
<!-- Sets the output directory for the code coverage report. -->
<destFile>
${basedir}/mqe-unified-platform-brand-tests/target/my-reports/jacoco.exec</
destFile>
</configuration>
</execution>
<execution>
<id>jacoco-report</id>
<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>
On Friday, September 1, 2023 at 2:15:27 PM UTC-4 Marc R. Hoffmann wrote:

> 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
>
> Regards,
> -marc
>
>
>
> On 1. Sep 2023, at 16:43, Rostislav Alpin <alp...@gmail.com> 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 jacoco+un...@googlegroups.com.
> 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 jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/6b154e2f-74fd-4040-9dda-6e697fdaadc4n%40googlegroups.com.

Reply via email to