Search code examples
eclipsemaven

Run "mvn clean install" in Eclipse


Title says it all.

I want to run the console command mvn clean install on my project in question directly in Eclipse, not from the command line.

It would just be more convenient for me to do this, as I already have the project open in Eclipse. It would save me time if I would not have to navigate to the folder in Windows Explorer.

Not a big deal if I can't do this... but can I? And if so, how?

It would be great if I could just right click my project, then click "mvn clean install" from the context menu.


Solution

  • I use eclipse STS, so the maven plugin comes pre-installed. However, if you aren't using STS (Springsource Tool Suite), you can still install the m2Eclipse plugin. Here is the link:

    http://www.eclipse.org/m2e/

    Once you have this installed, you should be able to run all the maven commands. To do so, from the package explorer, you would right click on either the maven project or the pom.xml in the maven project, highlight Run As, then click Maven Install.

    Hope this helped.