Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Learn how to request and manage app requests in the Marketplace

G’day everyone! Super exciting news coming from the Marketplace. We have now fully rolled out the ability for end-users to submit app requests to admins directly from within the product! No longer ...

9 views 0 2
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you