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

前端 未结 30 2544
小蘑菇
小蘑菇 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:35
    1. Go to Help > Install New Software...
    2. Use this software repository

      Make sure "Contact all update sites during install to find required software" is checked.

    3. Install the AJDT m2e Configurator

    Source: Upgrading Maven integration for SpringSource Tool Suite 2.8.0 (Andrew Eisenberg)

    This should automatically install ADJT if you don't have it installed, but if it doesn't, install AspectJ Development Tools (ADJT) first from "Indigo update site" (according to your Eclipse version).

    More info on AspectJ Development Tools site.

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

    Suggested solution from Eclipse m2e documentation:

    1. Use quick-fix on the error in pom.xml and select Permanently mark goal run in pom.xml as ignored in Eclipse build - this will generate the required boilerplate code for you.

    2. To instruct Eclipse to run your plugin during build - just replace the <ignore/> tag with <execute/> tag in the generated configuration:

      <action>
          <execute/>
      </action>
      

      Alternatively you can instruct Eclipse to run the plugin on incremental builds as well:

      <action>
          <execute>
              <runOnIncremental>true</runOnIncremental>
          </execute >
      </action>
      
    0 讨论(0)
  • 2020-11-21 15:36

    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.

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

    This error happens also on neon because of missing m2e connector. Solution: hover error and select - Discover new m2e connectors.

    It will install new connector and that is it.

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

    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.

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

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

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