gpt4 book ai didi

android - Eclipse 中的 Maven 插件错误

转载 作者:行者123 更新时间:2023-11-29 16:06:01 24 4
gpt4 key购买 nike

我正在为 Android 应用程序编写 POM.xml 文件,但我经常遇到错误。它出现在我在 Eclipse 中使用 Maven 插件后(项目->属性->配置->转换为 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)

最佳答案

包装你的 <plugins><pluginManagement>像这样:

<pluginManagement>
<plugins>
<plugin>
...
</plugin>
<plugin>
...
</plugin>
</plugins>
</pluginManagement>

进一步阅读:How to solve "Plugin execution not covered by lifecycle configuration" for Spring Data Maven Builds

关于android - Eclipse 中的 Maven 插件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18353782/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com