Maven 3平行Gmaven零星失败

时间:2012-03-26 09:55:44

标签: maven-3 parallel-builds gmaven

My Maven 3.0.4并行构建在以下错误上间歇性失败:

  

[错误]无法执行目标org.codehaus.gmaven:gmaven-plugin:1.2:在项目opcenter上编译(默认):没有提供商找到匹配的选择:1.7 - > [帮助1]   org.apache.maven.lifecycle.LifecycleExecutionException:无法执行目标org.codehaus.gmaven:gmaven-plugin:1.2:在项目opcenter上编译(默认):没有提供商找到匹配的选择:1.7       在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)       在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)       在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)       在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)       在org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder $ 1.call(LifecycleThreadedBuilder.java:167)       在org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder $ 1.call(LifecycleThreadedBuilder.java:163)       at java.util.concurrent.FutureTask $ Sync.innerRun(FutureTask.java:303)       在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)       在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)       在java.lang.Thread.run(Thread.java:662)   引起:org.apache.maven.plugin.MojoExecutionException:没有提供者找到匹配的选择:1.7       在org.codehaus.gmaven.plugin.MojoSupport.execute(MojoSupport.java:85)       在org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)       在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)       ......还有13个   引起:org.codehaus.gmaven.feature.ProviderException:没有提供者找到匹配的选择:1.7       在org.codehaus.gmaven.runtime.loader.DefaultProviderManager.select(DefaultProviderManager.java:109)       在org.codehaus.gmaven.plugin.ProviderMojoSupport.provider(ProviderMojoSupport.java:120)       at org.codehaus.gmaven.plugin.ComponentMojoSupport.feature(ComponentMojoSupport.java:49)       在org.codehaus.gmaven.plugin.ComponentMojoSupport.feature(ComponentMojoSupport.java:42)       在org.codehaus.gmaven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:53)       在org.codehaus.gmaven.plugin.MojoSupport.execute(MojoSupport.java:69)       ......还有15个

我的父pom.xml定义了gmaven插件,如下所示:

<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>

请注意当我运行'mvn groovy:providers'命令时,我看到安装了运行时,当我使用单个线程构建时,构建成功

1 个答案:

答案 0 :(得分:2)

目前gmaven不支持并行构建。

让我们投票给这个http://jira.codehaus.org/browse/GMAVEN-87 此更改应解决问题。