新鲜的Eclipse/optaplanner 7.12示例“通过Maven创建新项目"失败了 [英] Fresh Eclipse / optaplanner 7.12 examples "new project via Maven" fails

查看:97
本文介绍了新鲜的Eclipse/optaplanner 7.12示例“通过Maven创建新项目"失败了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过全新安装Eclipse 4.9.0(2018-09)并在Eclipse中安装m2e,我下载了Optaplanner 7.12.0版,解压缩了zip,然后按照文档说明的第一步来构建示例( 将文件examples/sources/pom.xml作为一个新项目打开,maven集成将处理其余的工作.")通过以下方式进行: 1)文件/从文件系统打开项目.../显示其他专门的导入向导/Maven/现有的Maven项目 2)选择optaplanner-distribution-7.12.0.Final/examples/sources作为根目录 (用于7.12.0.final的pom.xml作为预期的可选项目出现了)

With a fresh install of Eclipse 4.9.0 (2018-09), and m2e installed in Eclipse, I downloaded Optaplanner release 7.12.0, extracted the zip, and followed the first steps of the documentation instructions toward building the examples ("Open the file examples/sources/pom.xml as a new project, the maven integration will take care of the rest.") via: 1) File / Open Projects from File System... / Show other specialized import wizards / Maven / Existing Maven Projects 2) Selected the optaplanner-distribution-7.12.0.Final / examples / sources as the root directory (pom.xml for 7.12.0.final appeared as expected as a selectable project)

但是,选择的POM和点击完成时,将发生错误:

However, when selecting the pom and clicking Finish, an error occurs:

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-antrun-plugin:1.8:run (execution: create-default-i18n-resource, phase: process-resources)

这似乎与祖先pom org.kie:kie-parent:7.12.0.Final.pom有关,

This appears to be related to the ancestor pom org.kie:kie-parent:7.12.0.Final.pom which has

<plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <executions>
      <execution>
        <!-- Temporary workaround for https://issues.jboss.org/browse/ERRAI-1101. Needs to stay here until
        we find a general solution (e.g. moving all localized code to Errai TranslationService. -->
        <id>create-default-i18n-resource</id>
        <phase>process-resources</phase>
        <configuration>
          <target>
            <copy todir="${project.build.directory}/classes"
                  includeemptydirs="false" failonerror="false" quiet="true">
                <fileset dir="${project.build.directory}/classes"/>
                <globmapper from="*Constants.properties" to="*Constants_default.properties"/>
            </copy>
          </target>
        </configuration>
        <goals>
          <goal>run</goal>
        </goals>
      </execution>
    </executions>
</plugin>

但是,由于发现m2e连接器"报告没有市场条目",我不知道如何解决该错误.

However, I do not know how to resolve the error as "discover m2e connectors" reports "No marketplace entries".

我的目标是扩展一个示例,以创建Optaplanner报告的问题的可复制示例.由于第一步是最新版本的现成版本,因此我认为它应该可以工作-我想念的是什么?

My goal is to extend an example to create a reproduce-able example of an issue reported with Optaplanner. As this first step is an out of the box build of a recent release, I'm thinking it should work - what am I missing please?

推荐答案

这是M2Eclipse插件的功能"(缺陷?).在最新版本的m2e中,可以使用生命周期映射存储在Eclipse工作区中.为此,请打开问题"选项卡,右键单击"maven-antrun-plugin"执行错误,然后选择快速修复".然后选择在Eclipse偏好设置中将目标运行标记为忽略",然后单击完成".该错误将消失,并且可以使用该项目.

This is a "feature" (deficiency?) of the M2Eclipse plugin. In the latest version of m2e, Antrun plugin can be ignored using lifecycle mapping stored in the Eclipse workspace. To do that, open the Problems tab, right-click the maven-antrun-plugin execution error and select Quick Fix. Then select "Mark goal run as ignored in eclipse preferences" and click Finish. The error will disappear and it's possible to work with the project.

以下视频说明了该过程: https://youtu.be/TVRAtMx2XyE .

Following video illustrates the process: https://youtu.be/TVRAtMx2XyE.

这篇关于新鲜的Eclipse/optaplanner 7.12示例“通过Maven创建新项目"失败了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆