3

我的 pom.xml 中出现错误,说:

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.4:add-source (execution: add-generated-sources, phase: process-sources)

这是我的 pom.xml 的摘录:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <executions>
      <execution>
        <id>add-generated-sources</id>
        <phase>process-sources</phase>
        <goals>
          <goal>add-source</goal>
        </goals>
        <configuration>
          <sources>
            <source>${project.build.directory}/generated-sources/entitygenerator</source>
            <source>${basedir}/src/main/groovy</source>
          </sources>
        </configuration>
      </execution>
    </executions>
</plugin>

错误在<execution>标签上。

现在,我正在努力寻找需要的 Eclipse 插件,但不知何故,我找不到它。你能帮我吗?

我在 Windows XP SP3 上使用带有 JDK 1.6_22 的 Eclipse Indigo 和 Maven 3.0.3。

4

2 回答 2

5

在问题视图中选择消息并按下Ctrl+1(或从上下文菜单中选择“快速修复”)。

这将使您可以选择忽略此插件。选择此项,m2e 将向您的 POM 添加一些 XML,错误将消失。

如果您明确调用它,该插件仍然可以工作!

有关详细信息,请参阅未涵盖的 M2E 插件执行。

于 2012-02-13T16:58:38.517 回答
2

似乎 build-helper m2e 连接器解决了这个问题:build-helper-maven-plugin

于 2013-11-27T19:44:02.130 回答