2012-10-02 99 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