使用 Eclipse 的 Maven 2.0 集成时如何禁用 Maven 构建?
如何阻止“Maven 2.0 集成”插件运行 Maven 构建,同时保持选中“自动构建”?
我很确定之前它曾经是一些禁用maven构建的复选框,但是在升级Ubuntu之后; eclipse似乎在这个过程中已经更新了,现在我找不到任何方法来关闭maven构建。 Maven 构建实际上需要几分钟(大约 5 分钟左右),而仅运行 java 构建通常只需几秒钟即可完成。
是不再可能禁用它还是他们只是将其隐藏得很好?
如果不可能,eclipse是否能够在没有插件的情况下编译我的maven项目?
(尝试用谷歌搜索解决方案,最后我得到的答案是 这篇旧文章,其中答案基本上是“您应该能够在项目首选项中禁用 Maven 构建器...”,这并没有真正帮助,因为我在那里找不到任何开/关设置)
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 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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要禁用 Maven 项目生成器,请右键单击您的项目,然后首选项> Builders并取消选中Maven Project Builder(您无法修改默认的maven构建器)。
替代文本 http://www.imagebanana.com/img/fikqaidv/screenshot_010.png< /a>
如果这删除了“太多”的东西,您也许可以创建自己的自定义 Maven 构建器。单击新建,选择Maven Build并根据需要进行配置。
替代文本 http://www.imagebanana.com/img/rwkmm7jb/screenshot_010.png< /a>
我想您必须在项目引用中添加相关项目(或取消选中解决工作区项目的依赖关系)。
我不这么认为。
最后,所有这些调整看起来都像是丑陋的黑客行为。如果您对 m2eclipse 插件不满意,也许您应该使用
maven-eclipse-plugin
(即运行mvn eclipse:eclipse
)来生成.project
和.classpath
文件,并将项目作为现有项目导入到 Eclipse 中。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
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
I guess you would have to add the related projects in the Project References (or to uncheck Resolve dependencies from Workspace projects).
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 the
maven-eclipse-plugin
instead (i.e. runmvn eclipse:eclipse
) instead to generate the.project
and.classpath
files and import your projects as Existing Project into Eclipse.