我的 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 上使用 Eclipse Indigo 和 Maven 3.0.3,以及 JDK 1.6_22。
最佳答案
在问题 View 中选择消息并按 Ctrl+1(或从上下文菜单中选择“快速修复”)。
您可以选择忽略此插件。选择此项,m2e 将向您的 POM 添加一些 XML,错误将消失。
如果您显式调用该插件,它仍然可以工作!
参见 M2E plugin execution not covered了解详情。
关于java - org.codehaus.mojo 在 Eclipse 中不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9263992/