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

0 votes

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
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

243 views 4 1
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