1

I am not able to install maven on my 32 bit windows.I followed assistance on internet but still it is not working.

error :C:\Users\LAXMON>mvn -version 'mvn' is not recognized as an internal or external command, operable program or batch file.

I also get below when i do echo

PATH was C:=======

\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%

\System32\WindowsPowerShell\v1.0\C:\xampp\php\ZendFramework\library";C:\Program Files\nodejs\;C:\Program Files

\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\;C:\Program Files\MySQL\MySQL Fabric 1.5 & MySQL Utilities

1.5\Doctrine extensions for PHP\

JAVA_HOME:========

C:\Program Files\Java\jdk1.7.0_40

MAVEN_HOME=======

C:\Program Files\apache-maven-3.3.9

C:\Users\LAXMON>echo $MAVEN_HOME%

$MAVEN_HOME%

Not sure where i am going wrong.

Vy Do
  • 46,709
  • 59
  • 215
  • 313
  • 1
    You need to add the folder that the mvn executable is in onto the system path, and *then open a new command window*. See this question: http://stackoverflow.com/a/28545224/1254208 - Adding it to the system path won't update any already open cmd windows. Also the syntax for echo command should be echo %MAVEN_HOME% - Windows doesn't use the $ sign. – GregHNZ Apr 16 '16 at 05:41
  • It worked when i opened a new command window. Thank you for the help – Laxmon Philip Apr 16 '16 at 10:02

2 Answers2

0

This is offical tutorial from Apache Maven homepage: https://maven.apache.org/install.html

It will help you install Maven correctly.

Vy Do
  • 46,709
  • 59
  • 215
  • 313
0

Follow the following steps to configure maven on windows machine :

  • Download maven binary (apache-maven-X.X.X-bin.zip) from http://maven.apache.org/download.html and extract the zip file to a folder say D:\maven3

  • Configure environment variables (The installation directories of JDK and Maven might differ in your case.)

    JAVA_HOME >> C:\Program Files (x86)\Java\jdk1.7.0\

    MAVEN_HOME >> D:\maven3\

  • Add Paths

    %MAVEN_HOME%\bin ; %JAVA_HOME%\bin;

  • Verify : To verify it, in command prompt, type “mvn –version” to verify the installation detail.

Source : http://ganeshtiwaridotcomdotnp.blogspot.com/2012/01/configure-maven-project-in-eclipse.html

gtiwari333
  • 24,554
  • 15
  • 75
  • 102