How to disable m2e build in Eclipse Indigo?

2019-03-01 15:14发布

I'm currently using Eclipse Indigo in an Android project that I'm working on and am running into problems with the built-in Maven (m2e) builder. I use the ADT plug-in to build the project, but I also have a Maven pom.xml that's used to build the project from the command line. Once I switched from Helios to Indigo, I started seeing these errors:

Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:maven-android-plugin:2.9.0-beta-5:generate-sources (execution: default-generate-sources, phase: generate-sources)

Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:maven-android-plugin:2.9.0-beta-5:unpack (execution: default-unpack, phase: process-classes)

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (execution: default-jar, phase: process-classes)

My goal is to keep the Maven build separate from the ADT Eclipse build so I'd like to simply disable m2e for the project but I can't figure out how to do that.

Is there a way to disable the m2e builder? Alternatively, is there a way to fix the above errors?

4条回答
Explosion°爆炸
2楼-- · 2019-03-01 15:44

I am using MacOSX with Eclipse 4.3 (Krepler). What I originally tried was to install Maven via the terminal using Brew. It installed correctly Maven 3.0.4. However when I tried to import any ready maven projects (File > Import > Maven) it would display the following two errors:

No marketplace entries found to handle Execution default-testResources

What I did is go to Help > Eclipse Marketplace and type "Maven" in the search bar and install the first default Maven client for Eclipse. Everything worked for me from this point.

Hope it helps to you too.

查看更多
时光不老,我们不散
3楼-- · 2019-03-01 15:52

Open your POM and click on the "Plugin execution not covered by lifecycle configuration" error. This will give you the option to Discover new m2e connectors.

Select this and you should be automatically prompted to download and install the Android Connector.

Installing this should resolve your problems. You should probably uninstall the old 0.2.4 m2eclipse-android-integration as well in favour of the new 0.3.0 m2e-android version.

Please see the new site for more information:

http://rgladwell.github.com/m2e-android/

查看更多
迷人小祖宗
4楼-- · 2019-03-01 15:56

M2E official wiki documents this issue

I think you can use lifecycle-mapping plugin from m2e to silently ignore the execution for these plugins

查看更多
我欲成王,谁敢阻挡
5楼-- · 2019-03-01 16:00

I went into my install directory for Eclipse and manually removed all the references to m2e. There were multiples in the "Plugin" directory and the "features" directory. After that my android project was back to behaving like normal and I could use mvn from the command line to build.

查看更多
登录 后发表回答