In this tutorial, we will setup maven on windows machine.
For this, we need below,
- jdk1.8.0_91
- apache-maven-3.3.9
1. Make sure JDK is installed. Once JDK is installed, set JAVA_HOME environment variable as below,
JAVA_HOME=D:\Java\jdk1.8.0_77
2. Update PATH environment variables and append below highlighted string at start of PATH.
3. Once done, download apache maven from official Apache Maven Download
.
Unzip apache-maven to directory. Assume, its unzipped to below location,
D:\Development_Env\apache-maven-3.3.9-bin\apache-maven-3.3.9
4. Set M2_HOME environment variable as below,
M2_HOME= D:\Development_Env\apache-maven-3.3.9-bin\apache-maven-3.3.9
5. Add Maven bin folder to PATH environment variable
6. Verify the setup:
Run mvn –version command in the common prompt. If all above steps are followed properly then we should get output similar to below,
C:\Users\admin>mvn -version Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T22:11:47+05:30) Maven home: D:\Development_Env\apache-maven-3.3.9-bin\apache-maven-3.3.9 Java version: 1.8.0_77, vendor: Oracle Corporation Java home: D:\Java\jdk1.8.0_77\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "x86", family: "dos"
This shows maven is setup successfully on windows machine.
No comments:
Post a Comment