Issues with Clover on maven parallel builds

Does Clover support parallel builds for maven?  This is clover 4.1.1 (I just downloaded it today) and maven version info is:

mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_74, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.3", arch: "x86_64", family: "mac"

If I do: mvn -T 1C clean clover:setup test clover:aggregate clover:clover

I get various issues depending on the run such as:

  • Failed to execute goal com.atlassian.maven.plugins:clover-maven-plugin:4.1.1:setup (default-cli) on project woozle: Execution default-cli of goal com.atlassian.maven.plugins:clover-maven-plugin:4.1.1:setup failed. ConcurrentModificationException
  • Failed to execute goal com.atlassian.maven.plugins:clover-maven-plugin:4.1.1:setup (default-cli) on project woozle: Execution default-cli of goal com.atlassian.maven.plugins:clover-maven-plugin:4.1.1:setup failed. ArrayIndexOutOfBoundsException


     
A little more info with the maven debug flag turned on:
[ERROR] Failed to execute goal com.atlassian.maven.plugins:clover-maven-plugin:4.1.1:setup (default-cli) on project woozle: Execution default-cli of goal com.atlassian.maven.plugins:clover-maven-plugin:4.1.1:setup failed: 3 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.atlassian.maven.plugins:clover-maven-plugin:4.1.1:setup (default-cli) on project woozle: Execution default-cli of goal com.atlassian.maven.plugins:clover-maven-plugin:4.1.1:setup failed: 3
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
 at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:185)
 at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:181)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal com.atlassian.maven.plugins:clover-maven-plugin:4.1.1:setup failed: 3
 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
 ... 11 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
 at java.util.ArrayList.add(ArrayList.java:459)
 at org.apache.maven.model.BuildBase.addResource(BuildBase.java:94)
 at org.apache.maven.project.MavenProject.addResource(MavenProject.java:663)
 at com.atlassian.maven.plugin.clover.CloverInstrumentInternalMojo.injectGrover(CloverInstrumentInternalMojo.java:374)
 at com.atlassian.maven.plugin.clover.CloverInstrumentInternalMojo.execute(CloverInstrumentInternalMojo.java:311)
 at com.atlassian.maven.plugin.clover.CloverSetupMojo.execute(CloverSetupMojo.java:31)
 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
 ... 12 more
 

1 answer

This widget could not be displayed.

Hi Nathan,

 

Clover does not support parallel compilation. So you can not use any of:

  • parallel build option in Maven,
  • <parallel> task in Ant or
  • parallel build in IDEA 12+ (Settings > Build > Compiler)

 

There are few technical issues which are blockers now:

  • locking the same database file by multiple threads/processes
  • parallel writing to the same database file
  • tracking per-test code coverage for tests executing in parallel

 

References:

 

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Statuspage

What are your best incident management tips and stories? #HugOps

 👋Community members! Downtime happens. And great incident response takes a village. Teams like Support, Dev, SRE, Ops, IT, and Marketing have to come together to resolve the problem while keep...

32 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you