Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.0:generate-sources

后端 未结 1 663
迷失自我
迷失自我 2021-01-04 02:03

I have an Android application, which is built using pom.xml file given below. mvn clean install works without errors, but in Eclipse I get followi

相关标签:
1条回答
  • 2021-01-04 02:48

    One way to solve it is by adding the following section to your pom.xml (or parent pom.xml):

    <plugin>
       <groupId>org.eclipse.m2e</groupId>
       <artifactId>lifecycle-mapping</artifactId>
       <version>1.0.0</version>
       <configuration>
          <lifecycleMappingMetadata>
             <pluginExecutions>
                <pluginExecution>
                   <pluginExecutionFilter>
                      <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                      <artifactId>android-maven-plugin</artifactId>
                      <versionRange>[3.5.0,)</versionRange>
                      <goals>                                                               
                         <goal>generate-sources</goal>      
                         <goal>proguard</goal>
                         <goal>emma</goal>
                         <goal>dex</goal>
                         <goal>apk</goal>
                         <goal>internal-pre-integration-test</goal>
                         <goal>internal-integration-test</goal>                                         
                      </goals>
                   </pluginExecutionFilter>
                   <action>
                      <execute />
                   </action>
                </pluginExecution>
             </pluginExecutions>
          </lifecycleMappingMetadata>
       </configuration>
    </plugin>
    
    0 讨论(0)
提交回复
热议问题