1

Hello,

I'm new to maven. I using mvn command to build project:

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

and it generated an android project (but I don't know why android ):

and I import to myeclipse. this is the 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>

but there is an error :

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)

I really have no idea to deal with it.

Does anyone could help ? thank you !!!

Eddy
  • 3,623
  • 37
  • 44
  • Move all plugin into `... ` tags. refer: http://stackoverflow.com/a/13733232/2145360 – Hayi Nukman Jun 25 '14 at 06:53
  • The above said method is not working. I found an article saying it can't be fixed. http://maxrohde.com/2014/08/15/setting-up-eclipse-luna-with-maven-for-android/ . If the error is fixed kindly post the answer – Ranjithkumar Aug 19 '14 at 10:43

0 Answers0