Using maven console with m2eclipse

给你一囗甜甜゛ 提交于 2019-12-20 20:31:09

问题


Maven newb here.. Is there any way to open a console in eclipse and execute maven commands on the M2Eclipse plugin? It's a pretty nice plugin but I'm looking around and not finding some of the functionalities that I want. Thanks!


回答1:


If you want to run a specific maven plugin, You can do this

==> Right click on pom.xml ==> Run as ==> Maven build ==> It will open a pop up

You can type the goal that you want run, Type your goal in the Goals: input box

Goal : compile ==> Run

This will run compile goal.




回答2:


maybe you have same question to it

How to get access to (embedded in) Maven console in Eclipse?

you can use "external tools" function to do it.

see:

  1. In Eclipse, choose “Run -> External Tools -> External Tools Configurations
  2. In "Program", click “New Launch Configuration”
  3. Config your console name, location, working directory
  4. "run"

sorry for no images, because my reputation is below 10.




回答3:


You could just use maven from your operating system's console, and if you make changes that affect your eclipse project run the mvn eclipse:eclipse goal

Then right click on project in Eclipse and click Refresh



来源:https://stackoverflow.com/questions/6848002/using-maven-console-with-m2eclipse

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