在Eclipse中为菜单添加新的maven运行配置 [英] add new maven run configuration to menu in Eclipse

查看:854
本文介绍了在Eclipse中为菜单添加新的maven运行配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在Eclipse中的运行 - >运行方式中的运行配置菜单中添加现有的maven配置?
我想将我常用的目标,如集成测试添加到现有的maven build等。



我使用变量$ {project_loc}作为基本目录,但是如何将新配置放在maven运行配置菜单中?我没有在首选项或任何地方看到该选项。

解决方案

简单的答案是你不能。 Eclipse通常鼓励不要混淆上下文菜单。



然而,当使用 m2eclipse ,您可以使用运行方式... / Maven Build ... 菜单为您的Maven构建创建启动配置。之后,您可以使用运行方式... / Maven Build (或Alt-Shift-X,M快捷方式)来调用先前创建的配置,因此如果存在多于一个已创建,您将看到一个选择对话框。


Is there some way to add to the existing maven configurations in the "run configuration menu", available in "Run -> Run as" in Eclipse? I'd like to add my commonly used goals, like "integration-test", to the existing ones, like "maven build" etc.

I used the variable "${project_loc}" for base directory, but how can I place the new configuration in the maven run configuration menu? I don't see the option in the preferences or anywhere.

解决方案

Short answer is you can't. Eclipse generally encouraging to not clutter context menus.

However when using m2eclipse you can use Run As... / Maven Build... menu to create launch configurations for your Maven builds. After that you can use Run As... / Maven Build (or Alt-Shift-X, M shortcut) to invoke previously created configurations, so if there is more then one been created you'll see a selection dialog.

这篇关于在Eclipse中为菜单添加新的maven运行配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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