I ran into this problem because the Android-Maven-plugin in Eclipse was apparently not recognizing transitive references and references referenced twice from a couple of projects (including an Android library project), and including them more than once. I had to use hocus-pocus to get everything included only once, even though Maven is supposed to take care of all this.
For example, I had a core library globalmentor-core, that was also used by globalmentor-google and globalmentor-android (the latter of which is an Android library). In the globalmentor-android pom.xml
I had to mark the dependency as "provided" as well as excluded from other libraries in which it was transitively included:
<dependency>
<groupId>com.globalmentor</groupId>
<artifactId>globalmentor-core</artifactId>
<version>1.0-SNAPSHOT</version>
<!-- android-maven-plugin can't seem to automatically keep this from being
included twice; it must therefore be included manually (either explicitly
or transitively) in dependent projects -->
<scope>provided</scope>
</dependency>
Then in the final application pom.xml
I had to use the right trickery to allow only one inclusion path---as well as not explicitly including the core library:
<!-- android-maven-plugin can't seem to automatically keep this from being
included twice -->
<!-- <dependency> -->
<!-- <groupId>com.globalmentor</groupId> -->
<!-- <artifactId>globalmentor-core</artifactId> -->
<!-- <version>1.0-SNAPSHOT</version> -->
<!-- </dependency> -->
<dependency>
<groupId>com.globalmentor</groupId>
<artifactId>globalmentor-google</artifactId>
<version>1.0-SNAPSHOT</version>
<exclusions>
<!-- android-maven-plugin can't seem to automatically keep this from
being included twice -->
<exclusion>
<groupId>com.globalmentor</groupId>
<artifactId>globalmentor-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.globalmentor</groupId>
<artifactId>globalmentor-android</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>