Problems setting up Maven [duplicate] Problems setting up Maven [duplicate] windows windows

Problems setting up Maven [duplicate]


Check that you don't have an M2_HOME environment variable.


I ended up on this question with the same problem, however, I had committed an elementary mistake of downloading the apache-maven-..*-src.zip instead of the apache-maven-..*-bin.zip

Once I realised that mistake, it was smooth sailing as soon as I corrected it. I suppose the instructions on the download page should be more than adequate


All you should need to do to install and use maven:

1) Download maven 3. The ZIP should be fine. Install it in a known place; I use c:\tools\ as the parent directory but your mileage may vary.

2) Set your PATH to point to the bin directory in the installation directory. If Maven is in c:\tools\maven-3.0.3 (as it is on my system), you'd add c:\tools\maven-3.0.3\bin to PATH:

set PATH=%PATH%;c:\tools\maven-3.0.3

You may also want to set MVN_HOME:

set MVN_HOME=c:\tools\maven-3.0.3

3) start a new command shell (cmd.exe). mvn should work; if not, you've skipped something here or something's badly wrong in your configuration.