我的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。
答案 0 :(得分:5)
在问题视图中选择消息,然后按 Ctrl + 1 (或从上下文菜单中选择“快速修复”)。
这将为您提供忽略此插件的选项。选择此项,m2e将向您的POM添加一些XML,错误将消失。
如果你明确地调用它,该插件仍然有效!
有关详细信息,请参阅M2E plugin execution not covered。
答案 1 :(得分:2)
似乎build-helper m2e连接器解决了这个问题:build-helper-maven-plugin