Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.3.

Eclipse prompts an error in one of its POM files as follows:

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.3.1:compile (execution: default, phase: compile)

 This means that m2e does not define the plug-in when it executes maven 's life cycle management, so it prompts an error. In fact, m2e provides an extension mechanism for this. We can eliminate this error prompt by doing the following:

1. Enter Window—>Preferences—>Maven Configuration, and enter the Lifecycle Mapping setting item, as shown below:

   

 

   As can be seen from the above figure , the file name of the m2e management maven life cycle is lifecycle-mapping-metadata.xml , and the storage path of the file

2. In the next step, we will go to the corresponding path to modify the lifecycle-mapping-metadata.xml file, but we will find that this file does not exist in the location indicated in the above figure, then go to the plugins in the eclipse installation directory at this time . Find this file in the org.eclipse.m2e.lifecyclemapping.defaults_xxxxxx.jar file (as shown below):

 

 

Through the decompression software, you can find that the lifecycle-mapping-metadata.xml file is indeed in the jar package, extract it from the jar package and place it in the path shown in the previous figure.

3. Open the lifecycle-mapping-metadata.xml file and add the unrecognized plugins to the file:



4. After the modification is completed , right- click on the project -->maven-->update project ....

 

 Remark:

1, the error message :

Description Resource Path Location Type

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.3.1:compile (execution: default, phase: compile) pom.xml /cas-server-integration-jboss line 21 Maven Project Build Lifecycle Mapping Problem

 

2, xml add content

<pluginExecution>

      <pluginExecutionFilter>

        <groupId>org.codehaus.mojo</groupId>

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

        <versionRange>[1.3.1,)</versionRange>

        <goals>

          <goal>compile</goal>

        </goals>

      </pluginExecutionFilter>

      <action>

        <ignore />

      </action>

</pluginExecution>

 

 

 


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325996080&siteId=291194637