我正在尝试使用Spring Data和Neo4j。我开始尝试遵循这个由主站点链接的指南。特别地,我基于“Hello, World!”示例文件创建了pom.xml。这是从我的pom.xml中截取的导致问题的插件…

<plugin>
<!-- Required to resolve aspectj-enhanced class features -->
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>aspectj-maven-plugin</artifactId>
    <version>1.0</version>
    <configuration>
        <outxml>true</outxml>
        <aspectLibraries>
            <aspectLibrary>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aspects</artifactId>
            </aspectLibrary>
            <aspectLibrary>
                <groupId>org.springframework.data</groupId>
                <artifactId>spring-data-neo4j</artifactId>
            </aspectLibrary>
        </aspectLibraries>
        <source>1.6</source>
        <target>1.6</target>
    </configuration>
    <executions>
        <!-- ERROR HERE IN ECLIPSE SEE BELOW FOR FULL MESSAGE -->
        <execution>
            <goals>
                <goal>compile</goal>
                <goal>test-compile</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>${aspectj.version}</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <version>${aspectj.version}</version>
        </dependency>
    </dependencies>
</plugin>

我看到的错误是:

 Multiple annotations found at this line:
    - Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.0:compile (execution: default, phase: process-classes)
    - Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.0:test-compile (execution: default, phase: process-classes)

我运行的是Eclipse 3.6.2和m2e 0.13。我不是Maven专家,所以如果可能的话,请在您的回答中说明清楚。

我也尝试了m2e 1.0.0通过这个更新网站,仍然得到相同的错误。


当前回答

我在更新m2e后遇到了完全相同的问题,并通过重新安装Maven Integration for Eclipse WTP解决了这个问题。

事实证明,我卸载它时试图从版本0更新m2e。X到1.x

其他回答

见https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html。

To solve some long-standing issues, m2e 1.0 requires explicit instructions what to do with all Maven plugins bound to "interesting" phases of project build lifecycle. We call these instructions "project build lifecycle mapping" or simply "lifecycle mapping" because they define how m2e maps information from project pom.xml file to Eclipse workspace project configuration and behaviour during Eclipse workspace build. Project build lifecycle mapping configuration can be specified in project pom.xml, contributed by Eclipse plugins and there is also default configuration for some commonly used Maven plugins shipped with m2e. We call these "lifecycle mapping metadata sources". m2e will create error marker like below for all plugin executions that do not have lifecycle mapping in any of the mapping metadata sources. Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-antrun-plugin:1.3:run (execution: generate-sources-input, phase: generate-sources) m2e matches plugin executions to actions using combination of plugin groupId, artifactId, version range and goal. There are three basic actions that m2e can be instructed to do with a plugin execution -- ignore, execute and delegate to a project configurator.

多年来我一直遇到这个问题……eclipse的耻辱。如果你的应用程序被分割成maven模块,那么你可以考虑从IDE中删除受影响的模块,无论何时你需要重新生成/运行插件使用maven命令行安装,eclipse都很乐意在你的本地存储库中提供准备好的工件。不需要耍花招。

m2e 0.13引入了m2e连接器和m2e市场,扩展了m2e功能。 它就像旧的m2e-extras存储库。

您可以从首选项访问m2e市场:首选项>Maven>Discovery>Open Catalog。 安装WTP集成为我解决了大多数插件问题。

如果您正在使用Eclipse Juno,则可能是Eclipse WTP的Maven集成问题。所以从Eclipse Market Place安装同样的程序。

在Eclipse IDE中 帮助>>Eclipse Market Place >>键入查询wtp,它将显示maven集成Eclipse wtp为Juno,安装它并更新maven依赖项和享受

我得到了同样的错误。做了下面这些之后,它就消失了。

右键单击项目。 选择Maven >更新项目…