【发布时间】:2013-08-21 09:30:19
【问题描述】:
我正在为 Android 应用程序编写 POM.xml 文件,但我经常遇到错误。它出现在我在 Eclipse 中使用 Maven 插件(Project->properties->Configure->Convert to 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)
【问题讨论】:
-
知道发生了什么错误总是好的。一般来说,对于未指定的错误,只需采取未指定的解决方案即可。
-
没错,但是Eclipse没有返回错误,这就是问题所在。
-
那么,你怎么知道错误存在呢?
-
通过在文本字段附近提供带有红十字的灯泡。但我刚刚发现错误输出。编辑主帖。
-
尝试用
包装 有帮助可能对stackoverflow.com/questions/6352208/…