How to Install Maven on Windows

In the tutorial, we show how to install Maven on Windows.

Environment:
– Windows 10
– Java 10
– Lastest Maven 3.5.4

Related posts:
Maven Introduction – Part 1
Maven Introduction – Part 2: Maven Repositories and Plugins
Part 3: Maven Dependency Mechanism
Maven Introduction – Part 4: Maven Build LifeCycle
Unit Test – Maven skip test with SpringBoot

Installed Java

Maven is written in Java -> Make sure you had installed Java.
Check it by cmd: java -version

Install-Maven-in-Windows +check-Java-version

Install Maven on Windows

Before install maven, check cmd mvn -v ->

Install-Maven-in-Windows +check-maven-cmd-before-install

Download Maven

Go to https://maven.apache.org/download.cgi

-> Download latest Maven apache-maven-3.5.4-bin.zip

Install-Maven-in-Windows +download-maven-3.5.4

Install Maven

Extract it, we get a folder apache-maven-3.5.4 ->

Install-Maven-in-Windows +extract-maven-3.5.4

Copy whole folder apache-maven-3.5.4 to C:\Program Files ->

Install-Maven-in-Windows +copy-maven-to-c-folder

Go to Control Panel\All Control Panel Items\System, choose Advanced system settings.
Then add C:\Program Files\apache-maven-3.5.4\bin to Path variable ->

install-maven-on-windows-add-maven-bin-folder-to-path-variable

Finish the setup by press OK to apply all settings.

Check mvn -v ->

Install-Maven-in-Windows +maven-install-successfully

Now Maven is installed successfully!

By grokonez | August 20, 2018.



Related Posts


Got Something To Say:

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

*