使用Maven 2.0集成eclipse时如何禁用maven构建? [英] How do I disable maven build when using Maven 2.0 integration for eclipse?

查看:162
本文介绍了使用Maven 2.0集成eclipse时如何禁用maven构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何停止运行maven构建的Maven 2.0集成插件,同时保持自动构建?

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

我很确定它曾经有一些复选框禁用maven构建之前,但升级Ubuntu后; eclipse似乎已经在更新过程中,现在我找不到任何方法来关闭maven构建。 maven构建需要几分钟(约5分钟左右),而只需运行java构建即可在几秒钟内完成。

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?

如果不可能eclipse可以编译我的maven项目吗?

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

(尝试使用谷歌解决方案关闭我得到一个答案是几个档案的这个老帖子,答案基本上是你应该能够在项目偏好设置中禁用Maven构建器...这不是真的有帮助,因为我找不到任何开/关设置)

(Trying to google for a solution the closes I got to an answer was several archives of this 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)

推荐答案

要禁用Maven项目构建器,请在项目中右键单击,然后单击首选项>构建器,然后取消选中 Maven项目构建器您不能修改默认的maven构建器。)

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

alt text http://www.imagebanana.com/img/fikqaidv/screenshot_010.png

如果这样删除了太多的东西,您可以创建自己的自定义Maven构建器。点击新建,选择 Maven Build ,然后根据需要进行配置。

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

alt text http://www.imagebanana.com/img/rwkmm7jb/screenshot_010.png


禁止它似乎阻止eclipse了解相关项目导致java构建失败。是否有一些虚拟的,无操作的目标,我可以用于自动构建目标?

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?

我想你必须添加项目参考中的相关项目(或取消选中从Workspace项目中解析依赖项

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


/ p>

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

我不这么认为是这样吗?

I don't think so.

最后,所有这些调整看起来都像丑陋的黑客。如果你不满意m2eclipse插件,也许你应该使用 maven-eclipse-plugin 而不是(即运行 mvn eclipse:eclipse ),而不是生成 .project .classpath 文件,并将您的项目导入为现有项目进入Eclipse。

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

这篇关于使用Maven 2.0集成eclipse时如何禁用maven构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆