How to solve “Plugin execution not covered by life

2018-12-31 02:17发布

I am trying to work with Spring Data and Neo4j. I started by trying to follow this guide linked to by the main site. In particular I based my pom.xml off of the "Hello, World!" example file. Here is a snip from my pom.xml for the plugin that is causing the issues...

<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>

The error I am seeing is:

 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)

I am running Eclipse 3.6.2 and m2e 0.13. I'm not a Maven expert, so please be very explanatory in your answers if possible.

I've also tried m2e 1.0.0 via this update site and still get the same error.

30条回答
一个人的天荒地老
2楼-- · 2018-12-31 03:05

If you are using Eclipse Juno, it could be the issue of Maven Integration For Eclipse WTP . So install the same from Eclipse Market Place.

In Eclipse IDE Help>>Eclipse Market Place >> type the query wtp and it will show maven integration for eclipse WTP for Juno, install it and update the maven dependencies and enjoy

查看更多
忆尘夕之涩
3楼-- · 2018-12-31 03:08

Changing

<artifactId>aspectj-maven-plugin</artifactId>
<version>1.2</version>

into

<artifactId>aspectj-maven-plugin</artifactId>
<version>1.3</version>

solved the problem for me.

查看更多
零度萤火
4楼-- · 2018-12-31 03:10

I encountered this using Eclipse v4.3 (Kepler) and Maven 3.1.

The solution is to use a JDK and not a JRE for your Eclipse project. Make sure to try maven clean and test from Eclipse just to download missing JAR files.

查看更多
裙下三千臣
5楼-- · 2018-12-31 03:12

Where find WTP:

Mouse down on < plugin > in pom.xml and 'Discover new m2e connectors'.

I installed them all what are default checked and it works.

查看更多
残风、尘缘若梦
6楼-- · 2018-12-31 03:13

I encountered exact the same problem with maven thrift plugin. Here's my solution which requires no need to mess up your pom.xml:

  1. Use command line maven utility mvn

    mvn eclipse:eclipse

    to create a eclipse project

  2. Import the project in eclipse. Remember to use

    File > Import > General > Existing Projects into Workspace

    to add the project into your workspace.

This should fix the problem.

查看更多
琉璃瓶的回忆
7楼-- · 2018-12-31 03:13

For me this was caused by AspectJ classes. I could not find a plugin under Discovery that could help. So, I fixed this by copying the org.maven.ide.eclipse.ajdt files, under plugin and feature folders, of an existing STS installation.

I know, very rude approach.

查看更多
登录 后发表回答