Maven does not need to be installed on windows as a service component. You only need to download, decompress, and configure the environment variable.
1. JDK and JAVA_HOME
Make sure that JDK has been installed, and the JAVA_HOME variable has been added to the windows environment variable, pointing to the jdk Directory
Maven-java-home
2. Download Maven
Go to the Maven homepage, select a version, and click Download
3. Extract
Decompress and rename the downloaded zip file, for example, the Maven directory on drive D.
4. Add the MAVEN_HOME environment variable
Add a new environment variable MAVEN_HOME to the environment variable, pointing to the Maven Directory
Maven-home
5. Add the path variable.
Update the Path variable and add the Maven bin directory so that the mvn command can be executed anywhere.
Maven-Path
6. Verify
Open the command line and enter
Mvn-version
If you see
C: Documents and Settingsmkyong> mvn-versionApache Maven 2.2.1 (r801777; 03:16:01 + 0800) Java version: 1.6.0 _ 13 Java home: C: Program FilesJavajdk1.6.0 _ 13 jreDefault locale: en_US, platform encoding: Cp1252OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
Maven has been successfully installed and configured.