How to disable m2e build in Eclipse Indigo?

孤街浪徒 提交于 2019-12-02 11:10:49

问题


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?


回答1:


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/




回答2:


M2E official wiki documents this issue

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




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/7028881/how-to-disable-m2e-build-in-eclipse-indigo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!