Is there any tool in eclipse to run maven commands directly?

倖福魔咒の 提交于 2019-12-11 07:49:17

问题


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

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.

  • 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

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

NOTE:

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

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

Thanks in advance!

Regards, Baji


回答1:


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.

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



来源:https://stackoverflow.com/questions/27384628/is-there-any-tool-in-eclipse-to-run-maven-commands-directly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!