How do I disable maven build when using Maven 2.0 integration for eclipse

来源:互联网 发布:linux软件 编辑:程序博客网 时间:2024/04/28 16:29

http://stackoverflow.com/questions/2865803/how-do-i-disable-maven-build-when-using-maven-2-0-integration-for-eclipse

How do I stop the "Maven 2.0 integration" plugin from running maven build, while keeping "build automatically" checked?

I'm pretty sure it used to be some check box to disable maven build before, but after upgrading Ubuntu; eclipse seems to have been updated in the process, and now I cannot find any way to turn off the maven build. The maven build takes literally minutes (about 5 minutes or so), while just running java build used to finish in seconds.

Is it no longer possible to disable it or have they just hidden it well?

If it's not possible, will eclipse be able to compile my maven project without the plugin?

(Trying to google for a solution the closes I got to an answer was several archives ofthis old post where the answer essentially were "You should be able to disable Maven builder in project preferences..." which doesn't really help because I cannot find any on/off settings there)

share|improve this question

 
2 
A slow build wouldn't be so annoying if Eclipse did not block and pop an "waiting to complete" etc. dialog if I try to save again before the autobuild has completed... – Stein G. Strindhaug May 19 '10 at 13:23
feedback

1 Answer

activeoldest votes
up vote 2 down vote accepted

To disable the Maven Project Builder, right-click on your project thenPreferences > Builders and uncheck the Maven Project Builder (you cannot modify the default maven builder).

alt text

If this removes "too much" things, you can maybe create your own custom Maven builder. ClickNew, select Maven Build and configure it as you want.

alt text


Disabling it seems to stop eclipse from knowing about the related projects causing the java build to fail. Is there a some sort of dummy, no-operation goal I can use for auto build goals?

I guess you would have to add the related projects in the Project References (or to uncheckResolve dependencies from Workspace projects).

Is there a way to disable it for all 6 related projects in the workspace simultaneously?

I don't think so.


At the end, all this tweaks looks like ugly hacks. If you're not satisfied by the m2eclipse plugin, maybe you should use themaven-eclipse-plugin instead (i.e. run mvn eclipse:eclipse) instead to generate the.project and .classpath files and import your projects asExisting Project into Eclipse.

share|improve this answer
 
Disabling it seems to stop eclipse from knowing about the related projects causing the java build to fail. Is there a some sort of dummy, no-operation goal I can use for auto build goals? – Stein G. Strindhaug May 19 '10 at 13:42
 
Leaving it blank doesn't seem to work. – Stein G. StrindhaugMay 19 '10 at 13:49
 
Is there a way to disable it for all 6 related projects in the workspace simultaneously? – Stein G. StrindhaugMay 19 '10 at 13:50

 

原创粉丝点击