Get the App
SLTechnology News&Howtos  ›  Servers  › 

Install maven on windows

Shulou Source: shulou.com Published: 2022-06-03 07:59:14 12月06日 Update

I. installation

To install Apache Maven on a Windows system, download the Maven zip file, unzip it to the directory you want to install, and configure the Windows environment variable.

1. Required tools

JDK 1.8

Maven 3.3.9

Windows 7

2. JDK and Java_home

Make sure the jdk is set and the java_home is set

3. Download maven

Address: http://maven.apache.org/download.cgi

4. Installation

Extract the downloaded zip file to your preset directory: d:\ maven

5. Add M2_HOME and MAVEN_HOME

Add the M2_HOME and MAVEN_HOME environment variables to the Windows environment variable and point it to your Maven folder.

Note:

Maven says it's just adding M2_HOME, but some projects still reference Maven's folder MAVEN_HOME, so add it for security.

6. Add to the environment variable-PATH

Update the PATH variable and add the Maven bin folder to the end of the PATH, such as:% M2steps home%\ bin, so that you can run the Maven command in any directory in the command.

7. Verification

Execute mvn version in the command window

It means success!

Tags: Variables files environment commands folders directories and will security success just address tool point system project update run configure verify Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Information MariaDB NVidia Redmi