You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.scoverage:scoverage-maven-plugin:2.1.0:test failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:193)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:180)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:539)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:833)
Caused by: java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.putVal (ConcurrentHashMap.java:1011)
at java.util.concurrent.ConcurrentHashMap.put (ConcurrentHashMap.java:1006)
at java.util.Properties.put (Properties.java:1301)
at org.scoverage.plugin.SCoverageForkedLifecycleConfigurator.afterForkedLifecycleExit (SCoverageForkedLifecycleConfigurator.java:143)
at org.scoverage.plugin.SCoverageIntegrationTestMojo.execute (SCoverageIntegrationTestMojo.java:87)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:193)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:180)
Temporary Solution
**I got this error because my reactor project pom.xml is like this
As reactor project output directory could be empty depends on its POM.
We are getting null as forkedOutputDirectory = reactorProject.getBuild().getOutputDirectory(); and when we are putting null in concurrentHashMap, it is giving NPE reactorProject.getProperties().put( PROP_FORKED_OUTPUT_DIRECTORY, forkedOutputDirectory );
we could resolved it by putting it only when forkedOutputDirectory is not null.
@jozic thanks for reply. Yes in readme file, it is mentioned that this plugin is not thread safe. But when i was going through this link, it is mentioned that scoverage:test goal is thread safe and supports parallel build.
reference link : https://scoverage.github.io/scoverage-maven-plugin/2.1.0/test-mojo.html
Please let me know if my understanding is not correct. I am trying to use scoverage:test goal in parallel mode.
It could be that this doc is obsolete, I need to check the history and probably fix the doc until the main issue is fixed. But overall I believe it's not thread-safe.
Maven Module Setup
Run Command
mvn -T 1C clean install
mvn -T 1C -P scoverage scoverage:test
Error
Temporary Solution
**I got this error because my reactor project pom.xml is like this
If you see here, we are not having any src folder in reactor project and not having maven-jar-plugin or any plugin which can create output directory. thats why it is giving NPE at SCoverageForkedLifecycleConfigurator.afterForkedLifecycleExit (SCoverageForkedLifecycleConfigurator.java:143)
https://github.com/scoverage/scoverage-maven-plugin/blob/main/src/main/java/org/scoverage/plugin/SCoverageForkedLifecycleConfigurator.java#L143
**Solution
Add this in your ReactorModule1
Permanent Solution
As reactor project output directory could be empty depends on its POM.
We are getting null as forkedOutputDirectory = reactorProject.getBuild().getOutputDirectory(); and when we are putting null in concurrentHashMap, it is giving NPE
reactorProject.getProperties().put( PROP_FORKED_OUTPUT_DIRECTORY, forkedOutputDirectory );
we could resolved it by putting it only when forkedOutputDirectory is not null.
The text was updated successfully, but these errors were encountered: