解決Maven報Plugin execution not covered by lifecycle configuration

來源:互聯網
上載者:User

標籤:blog   http   ar   io   sp   for   strong   on   div   

來自:http://blog.csdn.net/xxd851116/article/details/25197373

 

環境    eclipse 4.3.0    maven 3.0.4    m2e 1.4.0    出現情境    以前的老項目,在我的環境(我的環境較新)下,別人老環境不報錯。 錯誤樣本一個錯誤樣本,子項目引用了父項目,子項目parent標籤處報錯如下:Multiple annotations found at this line:- maven-enforcer-plugin (goal "enforce") is ignored by m2e.- Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.3.1:compile (execution:  default, phase: compile) 解決辦法官網給出解釋及解決辦法:http://wiki.eclipse.org/M2E_plugin_execution_not_covered 這裡有人說下面這樣也可以解決, 即 <plugins> 標籤外再套一個 <pluginManagement> 標籤,我實驗是成功的:http://stackoverflow.com/questions/6352208/how-to-solve-plugin-execution-not-covered-by-lifecycle-configuration-for-sprin<build>
    <pluginManagement>
        <plugins>
            <plugin> ... </plugin>
            <plugin> ... </plugin>
                  ....
        </plugins>
    </pluginManagement>
</build> 但是有時候父項目pom不能被修改,可用官網最後給出的解決辦法: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“按鈕 問題解決。

解決Maven報Plugin execution not covered by lifecycle configuration

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.