This example show you how to install Apache Maven in Windows.
1. System Requirement
Please take note that Maven require JDK 1.5 and above to run. A simple way to check java version installed in windows is to issue command Windows Key + R , type cmd to start a Command prompt. Type : java -version and hit enter in the Command Prompt
2. Maven require JAVA_HOME variable to be define in Windows Environment Variable. (Right click “My Computer” -> “Properties”).
In most case, Java is installed in C:\Program Files\Java\…., choose the one with jdk. Example : C:\Program Files\Java\jrockit-jdk1.6.0_33-R28.2.4-4.1.0\ ,
Other example : C:\Program Files\Java\jdk1.6.0_13
Click “New” to create a new System Variable “JAVA_HOME”.
3. Download maven from http://maven.apache.org/download.cgi
Most of the time you only require the binary. So you can just click on the link for binary. (approximate 3~5Mb file size)
4. Unzip/Extract the zip file into c:\maven
5. Add MAVEN_HOME to Windows Environment Variable. (Right click “My Computer” -> “Properties”)
6. Add %MAVEN_HOME%\bin to PATH variable.
(By doing this, you may then invoke command inside bin globally.)
Issue a mvn -version in Command Prompt to verify. You should be getting something like this.
That it for install Apache Maven in Windows. Thank you for reading
If you encounter Error : JAVA_HOME not found in your environment. Please set the JAVA_HOME variable in your environment to match the location of your Java Installation. Please check back step 2 in this example.