Maven (the word maven means Accumulator of Knowledge) is a build and dependency management tool for java- based applications. It provides a uniform way to build the project and a standard way to do the project release. Here I am providing step by step installation guide to install Maven and test it:
Step by Step Maven Installation
Step 1: You would have Java installed already if you are reading an article on Maven, but still in case not, you need to install Java, as Maven is a Java Tool. I am sharing the location of Oracle website from where you can download and install JDK 7 or 8. For this article, I have JDK 7 installed on my machine.
Step 2: Next step is to add/update the JAVA_HOME variable in Environment variables which can be found at the below path:
Control Panel\System and Security\System\Advance System Settings\ Environment Variables
Step 3: Now we need to download the Maven. I have Windows operating system and for that I need to download apache-maven-3.2.3-bin.zip from http://maven.apache.org/download.cgi
Save the downloaded zip file on your local machine.
Step 4: Once downloaded, extract it to the location where you would like to make its home. For example: C:\Data\apache-maven-3.2.3
Step 5: Now, set the MAVEN_HOME variable just like we did for JAVA_HOME in environment variables (Control Panel\System and Security\System\Advance System Settings\ Environment Variables):
Step 6: Next we need to update another environment variable PATH to Maven’s “bin” directory:
Step 7: Once all the above steps are done, we need to test the Maven Installation. To do so, open a new command prompt (press window+r button together, type cmd and then press enter) window and write
mvn –version command. It must show you the Maven version and the home location on your system.
Once you see the above screen, it means that you have installed Maven successfully. Don’t forget to share if you experience any troubles or if the installation steps above helped to do it quickly.