咱們下載svn上的android-maven項目,可能配置會報錯以下:android
Plugin execution not covered by lifecycle configuration:windows
com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.8.2:consume-aar (execution:app
default-consume-aar, phase: compile)eclipse
搜了不少解決方案,以爲這個方案最靠譜,以下:maven
首先在eclipse中點 windows-preference-maven-lifecycle mapping ,點擊「open workspace ...mappings metdata」,而後編輯以下內容:svn
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<goals>
<goal>compile</goal>
<goal>generate-sources</goal>
<goal>proguard</goal>
<goal>process-classes</goal>
</goals>
<versionRange>[3.5,)</versionRange>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>spa
groupId 和 artifactId 的內容就是pom.xml報錯的插件名字,而那組goals的內容,就是在報錯信息中一段文本中,如phase: compile,那麼就加一個<goal>compile></goal>,若是還有錯誤如phase:generate-sources,同理再加一個<goal> 而後保存在默認的工做空間的.../.metadata/.plugins/org.eclipse.m2e.core/lifecycle-mapping-metadata.xml最後點擊「reload workspaces lifecycle mappings metdata」插件