问题
I created a maven android project from the command line using this archetype:
19: remote -> android-quickstart (-)
I can call "mvn install" on it with success.
When I try to import the same project into Eclipse Indigo, I see this:
No marketplace entries found to handle maven-android-plugin:2.8.3:generate-sources in Eclipse. Please see Help for more information.
and this:
No marketplace entries found to handle maven-android-plugin:2.8.3:unpack in Eclipse. Please see Help for more information.
Note that there is no "Help" button here.
If I Resolve Later on these, the build fails with this:
Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:maven-android-plugin:2.8.3:generate-sources (execution: default-generate-sources, phase: generate-sources) pom.xml /t3 line 22 Maven Project Build Lifecycle Mapping Problem
(and an additional error for the unpack phase)
I'll give my complete install list in a moment, but I noticed this plugin in Eclipse. I think this shouldn't be there(?), since Indigo has M2E built in...
- SonaType, Inc. Maven Integration for Eclipse 0.13.0
Maybe I installed it by accident?
Anyway, here's the rest of my deal:
- Microsoft Windows [Version 6.1.7601]
- Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
- Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
- Android Development Toolkit 11.0.0v201105251008-128486
- Eclipse Version: Indigo Release - Build id: 20110615-0604
回答1:
Thilo-Alexander Ginkel has it right: m2eclipse-android-integration just doesn't work with Indigo Java. I followed this link, http://groups.google.com/group/maven-android-developers/browse_thread/thread/3b463cf80edc41e3, and someone suggested installing Indigo J2EE which does not come with Maven integration. Thus, to get m2Eclipse, Android, and m2Eclipse-Android-Integration it was effectively the same as Helios...you just install everything yourself.
回答2:
I guess that the m2e Android integration plugin is incompatible with the current m2e plugin release. For details, see: http://code.google.com/a/eclipselabs.org/p/m2eclipse-android-integration/issues/detail?id=57
You may try building the plugin from source as the incompatibility has already been fixed on source-level (at least that's what I am trying to do right now).
Edit: Manually building m2eclipse-android-integration seems to be a little tricky, but I prepared some detailed information how to get the plugin running under Eclipse Helios (did not test Indigo) by installing an older plugin version: http://www.tgbyte.de/en/2011/07/building-android-maven-projects-with-eclipse/
回答3:
As Thilo-Alexandar says, the Maven Android Integration plugin is incompatible with the new m2e plugin release due to the move from Sonatype to eclipse, which required a full package re-name breaking all previous code.
A compatible version of the plugin will be released as soon as issue 23 is resolved:
http://code.google.com/a/eclipselabs.org/p/m2eclipse-android-integration/issues/detail?id=23
来源:https://stackoverflow.com/questions/6526741/eclipse-indigo-cannot-import-maven-android-that-builds-ok-on-command-line