Tuesday 14 June 2011

Maven Command Line from Eclipse

Eclipse comes with a bunch of maven support but if you want to avoid going back to the command line to type in your particularly obscure command you can use external tools configuration to get a prompt in Eclipse.

In Eclipse click External tools -> External Tools Configurations then add a new launch configuration. Then simply add:
  • the location of your maven installation
  • use ${project_loc} as your working directory
  • use ${string_prompt} in arguments
Here's what my configuration looks like:
Now you can run that from the external tools drop down menu and you'll get a command prompt. Then just type in your favourite maven command.



Enjoy!