I always see this error in my pom.xml in Eclipse. The project builds
fine on the command line, but this is really distracting. Any idea
what could be causing this?
Here is my POM:
<?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.qype.radar</groupId>
<artifactId>qype-radar</artifactId>
<packaging>pom</packaging>
<name>Qype Radar</name>
<version>2.3</version>
<modules>
<module>radar-app</module>
<module>radar-tests</module>
</modules>
<properties>
<androidVersion>1.6</androidVersion>
<mavenAndroidPluginVersion>2.2.2</mavenAndroidPluginVersion>
</properties>
<prerequisites>
<maven>2.2.1</maven>
</prerequisites>
<dependencies>
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>${androidVersion}_r2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.droidfu</groupId>
<artifactId>droid-fu</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>oauth.signpost</groupId>
<artifactId>signpost-commonshttp4</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>apache-mime4j</artifactId>
<version>0.6</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.0.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</
groupId>
<artifactId>maven-android-plugin</artifactId>
<version>${mavenAndroidPluginVersion}</version>
<configuration>
<jvmArguments>
<!-- the dexer breaks with OutOfMemory, so let's double
the fucking heap -->
<jvmArgument>-Xmx256m</jvmArgument>
</jvmArguments>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</
groupId>
<artifactId>maven-android-plugin</artifactId>
<version>${mavenAndroidPluginVersion}</version>
<configuration>
<sdk>
<path>${env.ANDROID_HOME}</path>
<platform>${androidVersion}</platform>
</sdk>
<deleteConflictingFiles>true</deleteConflictingFiles>
</configuration>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Thanks,
Matthias
Does this work for you? Which versions of the m2eclipse plugin and
Maven are you using along with maven-android-plugin?
manfred
I actually configured m2eclipse to NOT use the embedded version, but
my local Maven 2.2.1 installation. Still, no luck.
I meanwhile extracted the offending piece in the POM, it's the maven-
android-plugin configuration in the pluginManagement section:
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</
groupId>
<artifactId>maven-android-plugin</artifactId>
<version>${mavenAndroidPluginVersion}</version>
<configuration>
<sdk>
<path>${env.ANDROID_HOME}</path>
<platform>${androidVersion}</platform>
</sdk>
<deleteConflictingFiles>true</deleteConflictingFiles>
</configuration>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
if I remove that, the POM builds fine.
I don't really understand what's going on here. Why would I need Maven
3.x in Eclipse, while everything works using 2.2.1 on the command
line? That doesn't seem to make much sense.
Thanks,
Matthias
I am a bit stumped by this too. Does it work if you just have the
plugin in the build section (not that it should make a difference..)?
manfred
To fix this, I have committed a fix which specifies our Maven
requirement like this instead:
<prerequisites>
<maven>[2.2.1,)</maven>
</prerequisites>
This way of specifying it should mean any versions equal to, or
greater than, 2.2.1.
Please try <version>2.2.3-SNAPSHOT</version> of maven-android-plugin,
according to these instructions (EASY!):
http://code.google.com/p/maven-android-plugin/wiki/SnapshotRepo
Let us know how it works for you.
Thanks,
Hugo