How to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven Builds

前端 未结 30 2702
小蘑菇
小蘑菇 2020-11-21 15:10

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

相关标签:
30条回答
  • 2020-11-21 15:27

    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

    0 讨论(0)
  • 2020-11-21 15:27

    you can suppress this error in eclipse: Window -> Preferences -> Maven -> Error/Warnings

    0 讨论(0)
  • 2020-11-21 15:29

    In my case of a similar problem, instead of using Andrew's suggestion for the fix, it worked simply after I introduced <pluginManagement> tag to the pom.xml in question. Looks like that error is due to a missing <pluginManagement> tag. So, in order to avoid the exceptions in Eclipse, one needs to simply enclose all the plugin tags inside a <pluginManagement> tag, like so:

    <build>
        <pluginManagement>
            <plugins>
                <plugin> ... </plugin>
                <plugin> ... </plugin>
                      ....
            </plugins>
        </pluginManagement>
    </build>
    

    Once this structure is in place, the error goes away.

    0 讨论(0)
  • 2020-11-21 15:29

    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.

    0 讨论(0)
  • 2020-11-21 15:30

    I had the exact same problem after updating m2e and solved it by reinstalling Maven Integration for Eclipse WTP.

    As it turns out, I uninstalled it trying to update m2e from version 0.x to 1.x

    0 讨论(0)
  • 2020-11-21 15:31

    What a mess. I don't remember where I found this but I had to add the following to get M2Eclipse to be happy. Even more sad is that it isn't exactly easy to understand why this tag is needed.

    <build>
          ... various plugins ...
    
          <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse 
                    m2e settings only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>aspectj-maven-plugin</artifactId>
                                        <versionRange>[1.0,)</versionRange>
                                        <goals>
                                            <goal>test-compile</goal>
                                            <goal>compile</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    

    There were a number of other issues with the M2Eclipse plug-in that simply didn't work with Spring Data. In the end I disabled M2Eclipse in favor of the Apache Eclipse plug-in.

    0 讨论(0)
提交回复
热议问题