2013-08-21 78 views
1

我正在爲Android應用程序編寫POM.xml文件,並且經常遇到錯誤。在Eclipse中使用Maven插件(Project-> properties-> Configure-> Convert to Maven)後出現。我在代碼下面輸入了一個錯誤。Eclipse中的Maven插件錯誤

<build> 
    <finalName>${project.artifactId}</finalName> 

    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-resources-plugin</artifactId> 
      <executions> 
       <execution> 
        <!-- use the copy resources instead of resources, which adds it to 
         the eclipse buildpath --> 
        <phase>initialize</phase> 
        <goals> 
         <goal>copy-resources</goal> 
        </goals> 
        <configuration> 
         <outputDirectory>${project.basedir}/res</outputDirectory> 
         <resources> 
          <resource> 
           <directory>${project.basedir}/src/templates/res</directory> 
           <targetPath>${project.basedir}/res</targetPath> 
           <filtering>true</filtering> 
          </resource> 
         </resources> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 
     <plugin> <!----- Error here ----------> 
      <groupId>com.jayway.maven.plugins.android.generation2</groupId> 
      <artifactId>android-maven-plugin</artifactId> 
      <extensions>true</extensions> 
      <configuration> 
       <manifest> 
        <debuggable>true</debuggable> 
       </manifest> 
      </configuration> 
      <executions> 
       <execution> 
        <id>manifestUpdate</id> 
        <phase>process-resources</phase> 
        <goals> 
         <goal>manifest-update</goal> 
        </goals> 
       </execution> 
       <execution> 
        <id>alignApk</id> 
        <phase>package</phase> 
        <goals> 
         <goal>zipalign</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
    </plugins> 
</build> 

錯誤:

Multiple annotations found at this line: 
- Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.1:proguard (execution: default-proguard, phase: process-classes) 
- Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.1:generate-sources (execution: default-generate-sources, phase: generate- 
sources) 
+1

總是很高興知道發生了什麼錯誤。一般來說,對於非指定的錯誤只需要一個非指定的解決方案。 – sschrass

+0

這是真的,但Eclipse沒有返回錯誤,這就是問題所在。 –

+0

那麼,你怎麼知道這個錯誤存在? – sschrass

回答