Using maven console with m2eclipse

24,659

Solution 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.

Solution 2

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

Solution 3

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.

Share:
24,659
Admin
Author by

Admin

Updated on July 16, 2022

Comments

  • Admin
    Admin almost 2 years

    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!

  • Admin
    Admin almost 13 years
    I don't have Maven installed fully or added to my path (just have the plugin installed) so when I use the console that I added as an external tool it doesn't recognize any mvn commands.
  • Goibniu
    Goibniu almost 13 years
    I'd recommend that you install it. But if you don't I think most of the commands can be run from the m2eclipse plugins directly, unfortunatly I'm out, I can't help you with your original problem, because I can't stand using the plugins (although one of them does provide a pretty cool dependency graph, can't remember which one it was)
  • AKS
    AKS almost 9 years
    This is about "Using maven console with m2eclipse" so no standalone maven installation. now where to find pom.xml in plugin installation, there are many subfolders with maven created under plugins. how to simply check maven version using console in plugin? like mvn --version. There is an option in eclipse with window > show view > console. Under console windows, on top icons, the last one with hover name "open console" > the last option is Maven console. select to open but not sure how it works. This looks the way to resolve the question asked.