Apache Maven is a Java tool that helps in building and managing the Java project. It is based on the concept of Project Object Modle(POM). It helps the Java developers to manage the project's JAR files in a central repository and those JAR files can be shared across the project.
Maven project has the following objectives
Maven project has the following objectives
- makes the build process easy
- provides a uniform build system
- and many more
In this post, we will learn how to install the Apache Maven on Windows (10).
STEP 1: Download and install Java
Download Java from https://www.java.com/en/download/. and install it.
STEP 2: Download Apache Maven
Download Apache Maven from https://maven.apache.org/download.cgi and extract it on your local machine like I have unzipped it to E:\apache-maven-3.6.2
STEP 3: Set the JAVA_HOME environmental variable
- Right Click This PC -> Properties -> Advanced system settings -> Environmental Variables
Open Environmental Variables |
- Click on New and add the following
Variable Value: Path to your installed Java directory
STEP 4: Add Java bin directory to the path variable
Select path ->Click on Edit -> New
STEP 5: Set M2_HOME (or MAVEN_HOME) variable to environmental variables
- Click on New and add the following
Variable Value : E:\apache-maven-3.6.2 ( set this value to your maven directory)
Note that M2_HOME or MAVEN_HOME can be set as a variable name.
STEP 6: Add maven bin directory to path variable
Select path ->Click on Edit -> New
STEP 7: Open Command Prompt as administrator
Type mvn -version
It displays the Apache Maven version on the console and will confirm the successful installation of Maven on your local PC. If you get the following message, repeat the above steps carefully
mvn is not recognized as an internal or external command,
operable program or batch file.
Conclusion
In this post, we have learned how to install Apache Maven on Windows 10.
Comments
Post a Comment