org.codehaus.mojo在Eclipse中不可见

Ale*_*noy 2 java eclipse groovy maven m2e

我的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)
Run Code Online (Sandbox Code Playgroud)

这是我的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>
Run Code Online (Sandbox Code Playgroud)

错误在<execution>标签上.

现在,我很难找到需要Eclipse的插件,但不知何故,我无法找到它.你能帮我吗?

我在Windows XP SP3上使用Eclipse Indigo和Maven 3.0.3,JDK 1.6_22.

Aar*_*lla 5

在问题视图中选择消息,然后按Ctrl+1(或从上下文菜单中选择"快速修复").

这将为您提供忽略此插件的选项.选择此项,m2e将向您的POM添加一些XML,错误将消失.

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

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