我是Maven的初学者。请考虑这一点。我想将 Maven 用于我的 Android 项目。为此,我按照以下步骤完成了步骤:
- http://rgladwell.github.com/m2e-android/ 和
- http://code.google.com/a/eclipselabs.org/p/m2eclipse-android-integration/wiki/GettingStarted
我安装了 Eclipse Helios、Android SDK、ADT-plugin rev 20。我还安装了 Maven 到 Eclipse 插件。我正在使用 Windows 7(32 位)。
这是父 Pom.xml:
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<sdk>
<platform>15</platform>
</sdk>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
... 安装 Android Maven 集成插件。
但是对于子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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>GROUPID</groupId>
<artifactId>CHILDID</artifactId>
<version>1.0</version>
<packaging>apklib</packaging>
<parent> <!-- getting error here --->
<groupId>GROUPID</groupId>
<artifactId>ARTIID</artifactId>
<version>1.0</version>
<relativePath>..</relativePath>
</parent>
......
......
<plugins>
<plugin>
<artifactId>ID</artifactId>
<version>1.1</version>
<executions>
<execution>
<!-- getting error here --->
</execution>
</plugin>
</plugins>