Install maven in windows

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

check_java_version

2. Maven require JAVA_HOME variable to be define in Windows Environment Variable. (Right click “My Computer” -> “Properties”).

windows_environment_variable

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

java_path

Click “New” to create a new System Variable “JAVA_HOME”.

java_path_variable

 

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)maven_download_link

 

4. Unzip/Extract the zip file into c:\maven

maven_install_folder

5. Add MAVEN_HOME to Windows Environment Variable. (Right click “My Computer” -> “Properties”)

maven_home

6. Add %MAVEN_HOME%\bin to PATH variable.

(By doing this, you may then invoke command inside bin globally.)

maven_bin_path

7. Verification

Issue a mvn -version in Command Prompt to verify. You should be getting something like this.

verify_maven

 

That it for install Apache Maven in Windows. Thank you for reading

Troubleshooting

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.missing_java_path

 

4 thoughts on “Install maven in windows

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">