Fresh Eclipse / optaplanner 7.12 examples “new project via Maven” fails

自作多情 提交于 2019-12-23 05:13:46

问题


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)

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)

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>

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

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?


回答1:


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.

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



来源:https://stackoverflow.com/questions/52789506/fresh-eclipse-optaplanner-7-12-examples-new-project-via-maven-fails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!