0

I'm having a problem with a maven environmnet, if I try to execute the command mvn --version I see maven installed, but in eclipse (Indigo) I can't execute maven commands.

I've downloaded the plugin m2e - Maven Integration for Eclipse and restarted eclipse, but I got no changes.

Then, my question is: I have to uninstall all environment and re-install, or just configure something, or something else?

PS.: I'm using Windows7

guisantogui
  • 4,017
  • 9
  • 49
  • 93

1 Answers1

0

you need to add maven to your path variable

The route on Windows 7 is:

Control Panel -> System -> Advanced system settings -> Advanced Tab -> Environment Variables -> The path variable is right on the system variables area

The path variable specifies a group of directories and/or paths that Windows searches for commands definitions. You should append to the end of this variable value the value ;%M2% (note the semi-colon, different paths should be separated by them) in order for Windows to be able to find the Maven command definitions.

Appending ;%M2 at the end of the path environment variables is the same as appending ;C:\apache-maven-2.2.1\bin

To test that everything is ok, type mvn --version, if everything is right then the current Maven version you're using should be displayed on the screen.

source

Community
  • 1
  • 1
Philipp Sander
  • 10,139
  • 6
  • 45
  • 78