Plugin execution not covered by lifecycle configuration: aspectj-maven-plugin:1.8

现象:

eclipse导入existing maven project,(父项目包含很多子项目),子项目的pom.xml报错:

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

(execution: default,phase:compile)

解决方法一:

enclose all the plugin tags inside a <pluginManagement> tag, like this:

<build>
    <pluginManagement>
        <plugins>
            <plugin> ... </plugin>
            <plugin> ... </plugin>
                  ....
        </plugins>
    </pluginManagement>
</build>
尝试该方法后:在pom.xml文件中前部分的<parent>标签处报同样的错误,无法解决。
解决方法二:

  Quickest way to solve this is:

  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. After that just replace the <ignore/> or <ignore></ignore>tag with <execute/> tag in the generated configuration and you're done:

   <action>

      <execute/>
  </action>

尝试该方法后,红叉消失。
解决方法三:
配置eclipse
 Window-Perferences-Maven-Lifecycle Mapping
保存如下内容:
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
    <pluginExecutions>
    
        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <goals>
                    <goal>compile</goal>
                </goals>
                <versionRange>[1.3,)</versionRange>
            </pluginExecutionFilter>
            <action>
                <ignore />
            </action>
        </pluginExecution>
        
    </pluginExecutions>
</lifecycleMappingMetadata>
记得点击 ”Reload workspace lifecycle mappings metadata“按钮.
 
refer to :
http://stackoverflow.com/questions/6352208/how-to-solve-plugin-execution-not-covered-by-lifecycle-configuration-for-sprin
http://blog.csdn.net/xxd851116/article/details/25197373
 

 

posted on 2016-10-07 22:37  kira+  阅读(339)  评论(0编辑  收藏  举报