Maven 3 Parallel Gmaven Sporadic failure

1.5k views Asked by At

My Maven 3.0.4 parallel build fails intermittently on the following error:

[ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.2:compile (default) on project opcenter: No providers found matching selection: 1.7 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.2:compile (default) on project opcenter: No providers found matching selection: 1.7 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) 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:84) at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167) at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:163) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: org.apache.maven.plugin.MojoExecutionException: No providers found matching selection: 1.7 at org.codehaus.gmaven.plugin.MojoSupport.execute(MojoSupport.java:85) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 13 more Caused by: org.codehaus.gmaven.feature.ProviderException: No providers found matching selection: 1.7 at org.codehaus.gmaven.runtime.loader.DefaultProviderManager.select(DefaultProviderManager.java:109) at org.codehaus.gmaven.plugin.ProviderMojoSupport.provider(ProviderMojoSupport.java:120) at org.codehaus.gmaven.plugin.ComponentMojoSupport.feature(ComponentMojoSupport.java:49) at org.codehaus.gmaven.plugin.ComponentMojoSupport.feature(ComponentMojoSupport.java:42) at org.codehaus.gmaven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:53) at org.codehaus.gmaven.plugin.MojoSupport.execute(MojoSupport.java:69) ... 15 more

My parent pom.xml defines the gmaven plugin as follows:

<plugin>
                      <groupId>org.codehaus.gmaven</groupId>
                      <artifactId>gmaven-plugin</artifactId>
                      <version>1.2</version>
                      <configuration> 
                        <providerSelection>1.7</providerSelection> 
                      </configuration> 
                      <dependencies>
                          <dependency>
                            <groupId>org.codehaus.gmaven.runtime</groupId>
                            <artifactId>gmaven-runtime-1.7</artifactId>
                            <version>1.2</version>
                            <exclusions>
                              <exclusion>
                                <groupId>org.codehaus.groovy</groupId>
                                <artifactId>groovy-all</artifactId>
                              </exclusion>
                            </exclusions>




                      </dependency>
                          <dependency>
                            <groupId>org.codehaus.groovy</groupId>
                            <artifactId>groovy-all</artifactId>
                            <version>1.7.0</version>
                          </dependency>
                      </dependencies>
                      <executions>
                          <execution>
                              <goals>
                                      <goal>compile</goal>
                                  <goal>testCompile</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>

Please note that when I ran the 'mvn groovy:providers' command I see the runtime installed and when I build with a single thread the build succeeds

1

There are 1 answers

0
Anton On

Currently gmaven does not support parallel builds.

Let's vote for this http://jira.codehaus.org/browse/GMAVEN-87 This change should fix the issue.