Reputation: 13222
I have some problems with my maven 3 installation.
I have downloaded maven 3.0.3 and extracted it to a folder. I set the following environment variables.
C:\a few folders\apache-maven-3.0.3
%M2_HOME%\bin
C:\Program Files\Java\jdk1.6.0_25
%JAVA_HOME%\bin; %M2%
I get a message that the command is not recognized when i type "mvn" in the command line. Any ideas?
Upvotes: 3
Views: 10480
Reputation: 1
Maven 3.0.3 and later doesn't need the M2_HOME variable. So no need to add that.
I did the following in the Windows System variables and it works:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_31
Path=C:\Program Files\Java\jdk1.8.0_31\bin;C:\Selenium 3\Maven\apache-maven-3.3.3\bin
Upvotes: 0
Reputation: 191
Try this:
Add(create) these new variables at the SYSTEM VARIABLES (M3_HOME and M3):
M3_HOME: C:\maven_installation_folder\
M3: %M3_HOME%\bin
Include at: "CLASSPATH" and "Path" variables
CLASSPATH: other_variables;%M3%;
Path: other_variables;%M3%;
Go to Command Prompt (cmd) and type:
mvn -version
Upvotes: 0
Reputation:
Maven 3.0.3 and later doesn't need the M2_HOME
variable.
The following environment variable changes are sufficient to run Maven from the command-line:
JAVA_HOME
to the Java jdk
directory (eg. C:\Program Files\Java\jdk1.6.0_29
)PATH
to include the Maven bin
directory.Upvotes: 4
Reputation: 9781
Everything looks OK.
%M2%
. This might be your problem.Upvotes: 3