2012-10-02 75 views
13

更新:移动解决方案来回答M2E连接器buildhelper与Eclipse不朱诺SR1 M2E兼容1.2

的Eclipse朱诺SR1安装M2E插件版本1.2。 Eclipse市场提供的m2e连接器buildhelper与此版本的m2e插件不兼容。我一直在寻找各种邮件列表,但我找不到找到更新的buildhelper的位置。

Operation details 
Cannot complete the install because of a conflicting dependency. 
Software being installed: m2e connector for build-helper-maven-plugin 0.15.0.201109282249 (org.sonatype.m2e.buildhelper.feature.feature.group 0.15.0.201109282249) 
Software currently installed: m2e - Maven Integration for Eclipse 1.2.0.20120903-1050  (org.eclipse.m2e.feature.feature.group 1.2.0.20120903-1050) 
Only one of the following can be installed at once: 
    Maven Integration for Eclipse JDT 1.2.0.20120903-1050 (org.eclipse.m2e.jdt 1.2.0.20120903-1050) 
    Maven Integration for Eclipse JDT 1.1.0.20120530-0009 (org.eclipse.m2e.jdt 1.1.0.20120530-0009) 
Cannot satisfy dependency: 
    From: m2e - Maven Integration for Eclipse 1.2.0.20120903-1050 (org.eclipse.m2e.feature.feature.group 1.2.0.20120903-1050) 
    To: org.eclipse.m2e.jdt [1.2.0.20120903-1050] 
Cannot satisfy dependency: 
    From: m2e connector for build-helper-maven-plugin 0.15.0.201109282249 (org.sonatype.m2e.buildhelper 0.15.0.201109282249) 
    To: bundle org.eclipse.m2e.jdt [1.1.0,1.2.0) 
Cannot satisfy dependency: 
    From: m2e connector for build-helper-maven-plugin 0.15.0.201109282249 (org.sonatype.m2e.buildhelper.feature.feature.group 0.15.0.201109282249) 
    To: org.sonatype.m2e.buildhelper [0.15.0.201109282249] 

在我们使用buildhelper与生成的源目录添加到Eclipse我们的POM文件:

<plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>build-helper-maven-plugin</artifactId> 
    <version>1.5</version> 
    <executions> 
     <!-- Fix this eclipse error by discovering the plugin in the marketplace --> 
     <execution> 
      <id>add-source</id> 
      <phase>generate-sources</phase> 
      <goals> 
       <goal>add-source</goal> 
      </goals> 
      <configuration> 
       <sources> 
         <source>${project.build.directory}/generated-sources/cxf</source> 
       </sources> 
      </configuration> 
     </execution> 
    </executions> 
</plugin> 
+1

感谢您的支持。您应该添加解决方案作为答案并接受它。 – artbristol

+3

您应该将解决方案放入答案中,并将问题标记为已回答,以便很明显问题已解决。 – FrVaBe

+0

感谢您的意见。我将解决方案移至下面的答案。我需要等两天才能将自己的答案标记为解决方案。 – Denis

回答

21

注释要安装的M2E连接器buildhelper时出现

以下错误在pom建议使用Eclipse市场来安装buildhelper:

<!-- Fix this eclipse error by discovering the plugin in the marketplace --> 

这不会,因为Eclipse市场中的buildhelper版本已过时。

我没有使用Eclipse Marketplace,而是使用Eclipse安装新软件菜单选项直接从Sonatype存储库安装buildhelper。与(当前)最新版本的Sonatype存储库在这里: https://repository.sonatype.org/content/repositories/forge-sites/m2e-extras/0.15.0/N/0.15.0.201206251206/

这解决了我的问题。

+0

+1适用于我。 – Stephan202