m2e 连接器构建帮助器与 Eclipse Juno SR1 m2e 1.2 不兼容
更新:将解决方案移至答案
Eclipse Juno SR1 安装 m2e 插件版本 1.2。Eclipse市场提供的m2e连接器与此版本的m2e插件不兼容。我一直在浏览各种邮件列表,但我找不到找到更新的构建助手的位置。buildhelper
尝试安装 m2e 连接器构建帮助程序时,会发生以下错误:
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]
在我们的 pom 文件中,我们使用 buildhelper 将包含生成的源代码的目录添加到 Eclipse 中:
<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>