I have created these variables with their respective values, but even after doing this, command prompt is not recognizing mvn
command
System Variables:
M2_HOME
C:\Program Files\apache-maven-3.2.1
M2
%M2_HOME%/bin;
path
%JAVA_HOME%\bin; %M2_HOME%\bin;
From Maven documentation page:
Maven, like many cross-platform tools, can encounter problems when there are space characters in important pathnames. The instructions below will remind you of this for several particular items.
You have Maven installed in C:\Program Files\apache-maven-3.2.1
Try to reinstall it to, for example, C:\maven
, or change your current variable M2_HOME
to C:\PROGRA~1\apache-maven-3.2.1