java - m2e connector buildhelper 与 Eclipse Juno SR1 m2e 1.2 不兼容

标签 java eclipse maven

更新:将解决方案移至答案

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

尝试安装 m2e connector 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]

在我们的 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>

最佳答案

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/

这解决了我的问题。

关于java - m2e connector buildhelper 与 Eclipse Juno SR1 m2e 1.2 不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12685683/

相关文章:

java - 查找元音始终位于末尾的 Anagrams

java - 每当执行应用程序时,它在 android 模拟器中显示为空白

java - 如何在 Eclipse 中搜索特定语句或文本行

java - 将 Spring Boot war 部署到 Jenkins 中

java - 无需xml文件即可与MyBatis连接数据库

java - java中如何检查一个数的指数

java - 如何在Spring Boot Controller 中验证请求体的字段(自定义Jackson)

c++ - 透视在 Eclipse 中消失了

java - 基于Maven的Java应用程序的自动配置,版本控制和部署的可行方法是什么?

java - Maven - 无法激活 webstart