com.jayway.maven.plugins.android.generation2:插件执行未涵盖的生命周期配置? [英] com.jayway.maven.plugins.android.generation2: Plugin execution not covered by lifecycle configuration?

查看:154
本文介绍了com.jayway.maven.plugins.android.generation2:插件执行未涵盖的生命周期配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我难倒。我们最近转换我们的Andr​​oid项目到Maven项目。我的合作伙伴正在使用的IntelliJ,我使用Eclipse。他说,这将构建精细与他设置。

我是很新的Maven和遵循的教程和读取刚才的一切我能找到,试图解决这个问题。

我在我的pom.xml文件中的以下错误:

 在这一行找到多个注释:
 - 插件执行不属于生命周期配置:com.jayway.maven.plugins.android.generation2:Android的Maven的插件:3.3.2:ProGuard的(执行:默认情况下,ProGuard的,
 阶段:加工类)
 - 插件执行不属于生命周期配置:com.jayway.maven.plugins.android.generation2:Android的Maven的插件:3.3.2:产生-源(执行:默认 - 
 生成,消息人士透露,相:生成-源)
 

下面是我的pom.xml

 < XML版本=1.0编码=UTF-8&GT?;
<项目的xmlns =htt​​p://maven.apache.org/POM/4.0.0的xmlns:XSI =htt​​p://www.w3.org/2001/XMLSchema-instance
     XSI:的schemaLocation =htt​​p://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
< modelVersion> 4.0.0< / modelVersion>
<的groupId> com.groupmd.clientandroid< /的groupId>
< artifactId的> clientandroid< / artifactId的>
<版> 1.0.0  - 快照 -  LT; /版本>
<包装> APK< /包装>
<名称>&GroupMD LT; /名称>

<依赖>
    <依赖>
        <的groupId> com.google.android< /的groupId>
        < artifactId的>支持-V4< / artifactId的>
        <版> R7< /版本>
    < /依赖性>
    <依赖>
        <的groupId> com.google code.gson< /的groupId>
        < artifactId的> GSON< / artifactId的>
        <版> 2.2.2< /版本>
        <范围>编译< /范围>
    < /依赖性>
    <依赖>
        <的groupId> com.actionbarsherlock< /的groupId>
        < artifactId的> actionbarsherlock< / artifactId的>
        <版> 4.2.0< /版本>
        <类型> apklib< /类型>
    < /依赖性>
< /依赖性>
<建立>
    < finalName> $ {project.artifactId}< / finalName>
    < sourceDirectory> SRC< / sourceDirectory>
    < pluginManagement>
        <插件>
            <插件>
                <的groupId> com.jayway.maven.plugins.android.generation2< /的groupId>
                < artifactId的> Android的行家,插件和LT; / artifactId的>
                <版> 3.3.2< /版本>
                <扩展>真< /扩展>
            < /插件>
        < /插件>
    < / pluginManagement>
    <插件>
        <插件>
            <的groupId> com.jayway.maven.plugins.android.generation2< /的groupId>
            < artifactId的> Android的行家,插件和LT; / artifactId的>
            <结构>
                < SDK>
                    <! - 平台或API级(API级别4 = 1.6平台) -  GT;
                    <平台> 14< /平台>
                < / SDK>
            < /结构>
        < /插件>
    < /插件>
< /编译>
< /项目>
 

我在想什么?

解决方案

这是因为Maven插件用于Eclipse(M2E),默认情况下,知道该怎么做就经常插件执行(编译,测试过程中,资源,等),但它不知道做什么与这些Android插件执行。

有时候,例如当配置Maven的战争插件,Maven的入耳式插件等,可以增强M2E所提供的,通过下载从Eclipse Marketplace中所谓的M2E型连接的基本功能。在此之后,M2E知道该怎么办了一些非标插件的执行和停止展示这些错误。

在这种特殊情况下(安卓插件),你是幸运的,有连接器安装固定的问题。

选项1:(简单)

  

转到Eclipse的市场和寻找Android的配置为M2E并安装它。

如果由于某种原因,你不能使用/访问的市场(例如,如果你使用Spring工具套件-STS-),你仍然可以安装连接器:

选项2:

  

帮助 - >安装新软件... - >工作,并粘贴以下(完全,因为它是不ommiting任何东西)

 的Maven集成为Android开发工具的依赖网站 -  http://rgladwell.github.com/m2e-android/updates/
 

和preSS ENTER键。它会弹出一个确认对话框,preSS一次ENTER,你应该可以看到可用的软件,该更新站点。只要勾选所有的人(NDK插件是唯一可选的),就是这样,经过完全重建,你的问题已经不复存在了。

希望这有助于。

I'm stumped. We recently converted our Android project to a Maven project. My partner is using IntelliJ and I'm using Eclipse. He says this builds fine with his setup.

I'm very new to Maven and have followed the tutorials and read just about everything I can find to try to resolve this.

I have the following error in my pom.xml file:

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

Here's my pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>com.groupmd.clientandroid</groupId>
<artifactId>clientandroid</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>apk</packaging>
<name>GroupMD</name>

<dependencies>
    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>support-v4</artifactId>
        <version>r7</version>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.2.2</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>com.actionbarsherlock</groupId>
        <artifactId>actionbarsherlock</artifactId>
        <version>4.2.0</version>
        <type>apklib</type>
    </dependency>
</dependencies>
<build>
    <finalName>${project.artifactId}</finalName>
    <sourceDirectory>src</sourceDirectory>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                <artifactId>android-maven-plugin</artifactId>
                <version>3.3.2</version>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </pluginManagement>
    <plugins>
        <plugin>
            <groupId>com.jayway.maven.plugins.android.generation2</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <configuration>
                <sdk>
                    <!-- platform or api level (api level 4 = platform 1.6)-->
                    <platform>14</platform>
                </sdk>
            </configuration>
        </plugin>
    </plugins>
</build>
</project>

What am I missing?

解决方案

This happens because the Maven plugin for Eclipse (m2e), by default, knows what to do on the regular plugin executions (compile, test, process-resources, etc.) but it doesn't know "what to do" with these Android plugin executions.

Sometimes, for example when configuring maven-war-plugin, maven-ear-plugin, etc., you can enhance the basic functionality provided by m2e, by downloading the so-called "m2e-connectors" from the Eclipse Marketplace. After that, m2e knows what to do on some "non-standard" plugin executions and stops showing these errors.

In this particular case (Android plugins) you are lucky and there are connectors to be installed for fixing the problem.

option 1: (simpler)

Go to the Eclipse Marketplace and look for "Android Configurator for M2E" and install it.

If, for some reason, you cannot use/access the Marketplace (e.g. if you are using Spring Tool Suite -STS-) you can still install the connector:

option 2:

Help --> Install New Software... --> Work with and paste the following (exactly as it is, without ommiting anything)

Maven Integration for Android Development Tools Dependency Sites - http://rgladwell.github.com/m2e-android/updates/

and press ENTER. It will pop up a confirmation dialog, press ENTER again and you should be able to see the software available at that update site. Just tick all of them ("NDK plugins" is the only optional) and that's it, after a full rebuild, your problems should be gone.

Hope this helps.

这篇关于com.jayway.maven.plugins.android.generation2:插件执行未涵盖的生命周期配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆