解決Maven報錯"Plugin execution not covered by lifecycle configuration"

來源:互聯網
上載者:User

匯入Myabtis源碼後,POM檔案會報出如下異常:

Plugin execution not covered by lifecycle configuration org.sonatype.plugins:jarjar-maven-plugin

Plugin execution not covered by lifecycle configuration org.apache.felix:maven-bundle-plugin


在這裡找到了問題的原因和解決辦法:

http://wiki.eclipse.org/M2E_plugin_execution_not_covered

m2e在eclipse中執行maven生命週期構建,配置完畢後執行Maven構建後的項目。這是被多個不同Maven目標控制的。有些目標在workspace層面控制,有些在project/.setting下控制。

但是在特殊情況下還是會有異常。主要原因有2個:1、workspace外部的資源修改了,使得Maven外掛程式構建workspace出現異常。2、在不同的JVM和系統下,maven外掛程式可能會導致記憶體泄露。

為瞭解決這些長期存在的問題,m2e外掛程式需要知道每個Maven外掛程式的生命週期。這就需要用到"project build lifecycle mapping" 或者 "lifecycle mapping"。


由於Mybatis的牛人們都不用m2e外掛程式,而是自己用指令控制Maven操作。所以有些外掛程式對於m2e來說是沒有用到的。現在只需要告訴m2e外掛程式忽略檢查這些外掛程式的生命週期就好。


在文章的結尾我也找到瞭解決辦法:

Window-Perferences-Maven-Lifecycle Mapping

點擊Open workspace lifecycle mappings metadata。加入如下內容:

<lifecycleMappingMetadata><pluginExecutions><pluginExecution><pluginExecutionFilter><groupId>org.sonatype.plugins</groupId><artifactId>jarjar-maven-plugin</artifactId><versionRange>[1.7,)</versionRange><goals><goal>jarjar</goal></goals></pluginExecutionFilter><action><ignore /></action></pluginExecution><pluginExecution><pluginExecutionFilter><groupId>org.apache.felix</groupId><artifactId>maven-bundle-plugin</artifactId><versionRange>[2.3.7,)</versionRange><goals><goal>manifest</goal></goals></pluginExecutionFilter><action><ignore /></action></pluginExecution><pluginExecution><pluginExecutionFilter><groupId>org.apache.maven.plugins</groupId><artifactId>maven-enforcer-plugin</artifactId><versionRange>[1.0.0,)</versionRange><goals><goal>enforce</goal></goals></pluginExecutionFilter><action><ignore /></action></pluginExecution></pluginExecutions></lifecycleMappingMetadata>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.