myeclipse中的maven android项目:生命周期配置未涵盖插件执行

时间:2014-03-31 08:50:01

标签: android maven

您好,

我是maven的新手。我使用mvn命令来构建项目:

mvn archetype:generate \
    -DgroupId=com.helloworld.test \
    -DartifactId=hello \
    -DpackageName=com.helloworld.test \
    -Dpackage=com.helloworld.test  

它生成了一个android项目(但我不知道为什么android):

我导入myeclipse。这是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.nodebook.test</groupId>
    <artifactId>helloworld</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>apk</packaging>
    <name>helloworld</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <platform.version> 4.1.1.4
            </platform.version>
        <android.plugin.version>3.8.2</android.plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.android</groupId>
            <artifactId>android</artifactId>
            <version>${platform.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <build>
        <finalName>${project.artifactId}</finalName>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                    <artifactId>android-maven-plugin</artifactId>
                    <version>${android.plugin.version}</version>
                    <extensions>true</extensions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- here is an error -->
            <plugin>
                <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                <artifactId>android-maven-plugin</artifactId>
                <configuration>
                    <sdk>
                        <platform>16</platform>
                    </sdk>
                                    </configuration>
            </plugin>
        </plugins>
    </build>
</project>

但是有一个错误:

Plugin execution not covered by lifecycle configuration: 
 com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.8.2:consume-aar (execution: default-consume-aar, phase: compile)

我真的不知道要处理它。

有人可以提供帮助吗?谢谢!!!

0 个答案:

没有答案