eclipse M2e - 生命周期未涵盖的插件执行
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10229332/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
M2e - plugin execution not covered by lifecycle
提问by Anders Metnik
OS: ubuntu 11.10
操作系统:Ubuntu 11.10
Eclipse: Java EE IDE for Web Developers. Version: Indigo Service Release 2 Build id: 20120216-1857 Java: jdk1.7.0_03 SDK adb :Android Debug Bridge version 1.0.29
Eclipse:面向 Web 开发人员的 Java EE IDE。版本:Indigo Service Release 2 Build id:20120216-1857 Java:jdk1.7.0_03 SDK adb:Android Debug Bridge 版本 1.0.29
Trying to build javaocr in eclipse by using m2e android (2.8.4). it results in project being built with errors in pom.xml:
尝试使用 m2e android (2.8.4) 在 Eclipse 中构建 javaocr。它导致项目构建时在 pom.xml 中出现错误:
Description Resource Path Location Type
Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:maven-android-plugin:2.8.4:generate-sources (execution: default-generate-sources, phase: generate-sources) pom.xml /javaocr-sampler line 20 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:maven-android-plugin:2.8.4:unpack (execution: default-unpack, phase: process-classes) pom.xml /javaocr-sampler line 20 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-resources-plugin:2.5:resources (execution: default-resources, phase: process-resources) pom.xml /javaocr-sampler line 11 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-resources-plugin:2.5:testResources (execution: default-testResources, phase: process-test-resources) pom.xml /javaocr-sampler line 11 Maven Project Build Lifecycle Mapping Problem
pom.xml:
pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sourceforge.javaocr.demos</groupId>
<artifactId>javaocr-demos-parent</artifactId>
<version>1.102-SNAPSHOT</version>
</parent>
<groupId>net.sourceforge.javaocr.demos</groupId>
<artifactId>javaocr-sampler</artifactId>
<packaging>apk</packaging>
<name>Android sampler</name>
<description>
Demo appliocation to gather samples for further training
of matchers
</description>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>maven-android-plugin</artifactId>
<version>2.8.4</version>
<configuration>
<sdk>
<platform>7</platform>
</sdk>
<emulator>
<avd>16</avd>
</emulator>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>net.sourceforge.javaocr</groupId>
<artifactId>javaocr-core</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.javaocr.demos</groupId>
<artifactId>javaocr-android-camera-utils</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>2.1_r1</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
I am completely new to maven, but have looked around for solutions for this, but i come up empty. It is a project developed in IDEA (AFAIK) and it should work perfectly there, i just cant get IDEA to run neither :'-/ It javaocr svn link.
我对 maven 完全陌生,但已经四处寻找解决方案,但我空虚。这是一个在 IDEA (AFAIK) 中开发的项目,它应该在那里完美运行,我只是无法让 IDEA 运行它们:'-/ 它 javaocr svn link。
回答by ThisIsErico
I had the same problem. This is how I solved it. In the pom.xml file, change
我有同样的问题。我就是这样解决的。在 pom.xml 文件中,更改
<artifactId>maven-android-plugin</artifactId>
<version>2.8.3</version>
for
为了
<artifactId>android-maven-plugin</artifactId>
<version>3.4.1</version>
That solves it at least for me :)
这至少对我来说解决了:)
回答by Ricardo Gladwell
Firstly, you're using an old version of the android-maven plugin. You should upgrade to the latest, 3.1.1:
首先,您使用的是旧版本的 android-maven 插件。您应该升级到最新的 3.1.1:
http://code.google.com/p/maven-android-plugin/
http://code.google.com/p/maven-android-plugin/
Secondly, please see section 3 of the instructions for installing the m2e-android plugin for m2e correctly:
其次,请参见正确安装 m2e 的 m2e-android 插件说明的第 3 节:
http://rgladwell.github.com/m2e-android/
http://rgladwell.github.com/m2e-android/
You can install m2e-android by opening your POM and clicking on the "Plugin execution not covered by lifecycle configuration" error. This will give you the option to Discover new m2e connectors.
您可以通过打开 POM 并单击“生命周期配置未涵盖的插件执行”错误来安装 m2e-android。这将为您提供发现新 m2e 连接器的选项。
Select this and you should be automatically prompted to download and install the Android Connector.
选择此项,系统会自动提示您下载并安装 Android 连接器。
回答by idarwin
This problem rears its ugly head again with Keppler when you're trying to use 3.8.2 of android-maven-plugin, perhaps because you need an AAR libray. The solution is documented here https://stackoverflow.com/a/7030657/176859and leads you here: http://wiki.eclipse.org/M2E_plugin_execution_not_covered#ignore_plugin_goal. Or you can just click on the error in the Problems window, Context-Click to get Quick Fix, and select the one to permanently disable this error; the quickfix will generate an ignore element for the consume-aar in pluginManagement, and both Eclipse and Maven will be happy.
当您尝试使用 3.8.2 的 android-maven-plugin 时,这个问题再次出现在 Keppler 上,这可能是因为您需要一个 AAR 库。解决方案记录在此处https://stackoverflow.com/a/7030657/176859并引导您到这里:http: //wiki.eclipse.org/M2E_plugin_execution_not_covered#ignore_plugin_goal。或者您可以在问题窗口中单击错误,上下文单击以获取快速修复,然后选择一个永久禁用此错误;quickfix 将在 pluginManagement 中为消耗 aar 生成一个 ignore 元素,Eclipse 和 Maven 都会很高兴。
回答by Placeholder
I am using MacOSX with Eclipse 4.3 (Krepler). What I originally tried was to install Maven via the terminal using Brew. It installed correctly Maven 3.0.4. However when I tried to import any ready maven projects (File > Import > Maven) it would display the following two errors:
我在 Eclipse 4.3 (Krepler) 上使用 MacOSX。我最初尝试的是使用 Brew 通过终端安装 Maven。它正确安装了 Maven 3.0.4。但是,当我尝试导入任何准备好的 Maven 项目(文件 > 导入 > Maven)时,它会显示以下两个错误:
No marketplace entries found to handle Execution default-testResources
没有找到处理执行默认测试资源的市场条目
What I did is go to Help > Eclipse Marketplace and type "Maven" in the search bar and install the first default Maven client for Eclipse. Everything worked for me from this point.
我所做的是转到 Help > Eclipse Marketplace 并在搜索栏中键入“Maven”并为 Eclipse 安装第一个默认 Maven 客户端。从这一点开始,一切都对我有用。
Hope it helps to you too.
希望对你也有帮助。
回答by David Lakatos
I had a similar issue. Use the embedded Maven in Window / Preferences / Maven / Installations.
我有一个类似的问题。使用 Window / Preferences / Maven / Installations 中的嵌入式 Maven。