eclipse中是否有任何工具可以直接运行maven命令? [英] Is there any tool in eclipse to run maven commands directly?

查看:132
本文介绍了eclipse中是否有任何工具可以直接运行maven命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有用于Eclipse的工具/插件可以直接从Eclipse运行maven命令?

Is there any tool/plugin for eclipse which allows to run the maven commands directly from the eclipse?

我已经在eclipse中添加了M2E插件,这使我可以创建/导入,甚至可以通过运行方式"配置在Eclipse中运行Maven项目.例如,如果我已将tomact7插件添加到我的项目中,然后在我的项目上执行"mvn tomcat:run"命令,则必须在运行方式"中配置此新命令,因此同样,对于每个新命令,我都必须配置一个 Run AS 选项.

I have already added the M2E plugin to my eclipse which is allowing me to create/import and even able to run the Maven projects in Eclipse through the "Run As" configuration. For example, If I have added tomact7 plugin to my project then to execute "mvn tomcat:run" command on my project I must configure this new command in "Run As" so likewise for each new command I must configure a Run AS option.

  • 但是在 IntelliJ 中,我们有 Maven工具窗口,我们可以在项目上直接运行任何maven命令,而无需任何配置
  • But whereas in IntelliJ we have the Maven tool window where we can run any maven command directly on the project instead of any configuration

因此,在Eclipse中,我也想直接执行/运行maven命令,而不是为每个新命令配置运行方式

So in Eclipse also I want to execute/run maven commands directly instead of configuring the Run As for each new command

注意:

1)我们可以通过运行方式"选项配置maven命令,但我不想这样做

1)We can configure the maven commands by "Run As" option but I don't want to do that

2)即使我也不想通过外部工具在Eclipse中使用MS Dos cmd.exe配置选项

2)Even I don't want to use MS Dos cmd.exe configuration option in Eclipse by external tools also

提前谢谢!

此致 巴吉

推荐答案

将m2e(对Eclipse的maven)插件添加到您的eclipse中.它可以直接从Eclipse中运行Maven命令,例如Run As-> Mavenclean,也可以运行Run As-> maven安装.如果要一次完成所有操作,请转到Run AS-> maven Build,然后在目标中键入"clean install",以便清理并安装您的项目.

Add m2e (maven to eclipse ) plugin to your eclipse. It will give the ability to run maven commands directly from eclipse like Run As -> Mavenclean or you can do Run As-> maven install. If you want to do it all in one just goto Run AS-> maven Build and in the goals type " clean install" so that your project will be cleaned and installed.

如果您不想使用它,则可以使用Eclipse控制台.在最右边的角落,您可以看到一个新图标,单击它,您可以看到m2e控制台.通过使用控制台,您可以直接从Eclipse中针对特定项目使用命令

If you don,t want to use this.. you can go for eclipse console.in the right most corner you can see a new icon click it ,you can see m2e console. by using the console you can use commands directly from the eclipse for the particular project

这篇关于eclipse中是否有任何工具可以直接运行maven命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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