Below are the steps to be followed for setting up Maven Environment
Step1: Verify Java Installation on your machine.
Open the command prompt and type java -version. It should return us the Java version
we are using.
If the JDK is not installed on your machine, get it from Oracle downloads page.
Step2: Set JAVA_HOME env variable to point to the installation directory of Java.
In windows, open the computer -> properties-> Advanced System Settings ->
Click on Env variables.
JAVA_HOME = C:\Program Files\Java\jdk1.8.0_40
Step3: Append the path to the JDK bin directory to the PATH env variable.
Open the env variables tab, and append C:\Program Files\Java\jdk1.8.0_40\bin to PATH.
Step4: Extract the Maven Archive to the local directory.
Step5: Set the Env variable M2_HOME to the Maven directory
M2_HOME = D:\apache-maven-3.3.3
Step6: Append Maven bin directory (D:\apache-maven-3.3.3\bin) to the PATH env variable.
Step7: Verify Maven Installation. Open the command prompt and type in mvn --version.
It should give us the version details.
With this, the maven environment setup is done.
Step1: Verify Java Installation on your machine.
Open the command prompt and type java -version. It should return us the Java version
we are using.
If the JDK is not installed on your machine, get it from Oracle downloads page.
Step2: Set JAVA_HOME env variable to point to the installation directory of Java.
In windows, open the computer -> properties-> Advanced System Settings ->
Click on Env variables.
JAVA_HOME = C:\Program Files\Java\jdk1.8.0_40
Step3: Append the path to the JDK bin directory to the PATH env variable.
Open the env variables tab, and append C:\Program Files\Java\jdk1.8.0_40\bin to PATH.
Step4: Extract the Maven Archive to the local directory.
Step5: Set the Env variable M2_HOME to the Maven directory
M2_HOME = D:\apache-maven-3.3.3
Step6: Append Maven bin directory (D:\apache-maven-3.3.3\bin) to the PATH env variable.
Step7: Verify Maven Installation. Open the command prompt and type in mvn --version.
It should give us the version details.
With this, the maven environment setup is done.