You can have a look on below pom.xml configuration. Can you please help me in identifying the root cause of the problem?
<properties>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.jacoco.reportPath>target/jacoco.exec</sonar.jacoco.reportPath>
<sonar.language>java</sonar.language>
</properties>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<forkCount>1</forkCount>
<reuseForks>true</reuseForks>
<argLine>${jacoco.agent.argLine}</argLine>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.2</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.1</version>
<configuration>
<append>true</append>
</configuration>
<executions>
<execution>
<id>jacoco-initialize</id>
<phase>initialize</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<propertyName>jacoco.agent.argLine</propertyName>
<destFile>target/jacoco.exec</destFile>
</configuration>
</execution>
<execution>
<id>jacoco-report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
I am getting "Skipping JaCoCo execution due to missing execution data file" message and Jacoco test report is not generated.You can have a look on below pom.xml configuration. Can you please help me in identifying the root cause of the problem?
I am thankful to you for replying on my query. At least it's better to get stupid questions rather than getting none.
To help you further more,
1. The Jacoco is supposed to generate "sites" folder in my target directory which(sites) contains the tests report. I have used the same configuration in my other project modules there it's worked fine for me. However it's not working in 1-2 modules :(
2. When I run "mvn clean install" or "mvn clean verify" or "mvn -U clean install jacoco:report -Dmaven.test.failure.ignore=true" command I can see there are 51 tests executed successfully without any error.
3. I thought not to confuse you with bulky pom.xml but yeah if you need it I can provide it to you for sure.
I am trying to send you the whole "pom.xml" file but the movement I click on post button the message is getting deleted automatically. Maybe because of it's line size I am unable to send it.
I have shared the whole "pom.xml" file on GitHub. Please have a look on it.
I can understand your viewpoint that it's difficult to guess about the cause from the partial snippet but I too have my hands tied as it's a private/personal code of the organization.
I have observed one new thing while execution of "maven-surefire-plugin" i.e. when I keep forkCount as 0(zero) in my surefire plugin it executes the tests but gives message as "Skipping JaCoCo execution due to missing execution data file".
However, when I give the forkCount as 1 then it gives me the below error,
[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
--
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/ef0919fa-de67-4067-8d98-e6a9ffceff0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I have observed one new thing while execution of "maven-surefire-plugin" i.e. when I keep forkCount as 0(zero) in my surefire plugin it executes the tests but gives message as "Skipping JaCoCo execution due to missing execution data file".
However, when I give the forkCount as 1 then it gives me the below error,
[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
However, I didn't understand one thing if the same configuration is working on my newly created sample example why the same configuration is not working in my project module?