0

Im trying to setup maven but I cant make him work. I tried all solutions i found and none of them helped.

For command

mvn --version

CMD answers 'mvn' is not recognized... etc.

Here is my Enviroment variables config:

Key Name:          HKEY_CURRENT_USER\Environment
Class Name:        <NO CLASS>
Last Write Time:   06-05-2015 - 12:41
Value 0
  Name:            CATALINA_HOME
  Type:            REG_SZ
  Data:            C:\Apache\Tomcat8

Value 1
  Name:            JAVA_HOME
  Type:            REG_EXPAND_SZ
  Data:            %JAVA_7_HOME%

Value 2
  Name:            M2
  Type:            REG_SZ
  Data:            C:\Apache\Maven3

Value 3
  Name:            M2_HOME
  Type:            REG_SZ
  Data:            C:\Apache\Maven3

Value 4
  Name:            MAVEN
  Type:            REG_SZ
  Data:            C:\Apache\Maven3

Value 5
  Name:            MAVEN_HOME
  Type:            REG_SZ
  Data:            C:\Apache\Maven3

Value 6
  Name:            PATH
  Type:            REG_EXPAND_SZ
  Data:            %JAVA_HOME%\bin; %CATALINA_HOME%\bin; %MAVEN_HOME%\bin

Value 7
  Name:            TEMP
  Type:            REG_EXPAND_SZ
  Data:            %USERPROFILE%\AppData\Local\Temp

Value 8
  Name:            TMP
  Type:            REG_EXPAND_SZ
  Data:            %USERPROFILE%\AppData\Local\Temp

When i call

%MAVEN_HOME%\bin\mvn --version

cmd answers fine.

  • You need to add Maven to the PATH variable which you obvisously didn't done. – khmarbaise May 06 '15 at 10:55
  • @khmarbaise wrong, look at the "Value 6" : Value 6 Name: PATH Type: REG_EXPAND_SZ Data: %JAVA_HOME%\bin; %CATALINA_HOME%\bin; %MAVEN_HOME%\bin But could the problem be due to the blank spaces after the ';' ? – Fabien May 06 '15 at 11:02
  • Have you checked on command line via `echo %PATH%` ? – khmarbaise May 06 '15 at 11:02
  • Did you check this question : http://stackoverflow.com/questions/8685699/windows-7-environment-variable-not-working-in-path – Fabien May 06 '15 at 11:09
  • MAVEN_HOME is used for Maven 1 and M2_HOME is used for Maven 2 and later. which maven version r u using? – Bacteria May 06 '15 at 16:03
  • OK. ok probably it was not working because of blank spaces.... BTW im using Maven 3. – Mariusz May 11 '15 at 09:22

0 Answers0