Maven Installation on Windows

Today we will discuss , How to install maven in Windwos .
1. First of all we need to download maven from apache maven site –
2. Now extract compressed file to local drive , say example – “E:\apache\apache-maven-3.2.1”
3. Set up the enviornmental variable M2_HOME = E:\apache\apache-maven-3.2.1

Env Variable

And same way you need to add : M2= %M2_HOME%\bin

Env Variable

And include the M2 in pathe variable as well.

Env Variable

4. If you want to change “localRepository” then open the settings file of conf folder (example – E:\apache\apache-maven-3.2.1\conf and uncomment

< ! -- localRepository | The path to the local repository maven will use to store artifacts. | Default: ${user.home}/.m2/repository /path/to/local/repo
-- >

and modify it as : E:\apache\maven_local_repo

5. Now Open cmd and run the following command.
mvn –version
Now you will get the following information of the maven which you have just installed.

CMD Window

Now we are succefully able to complete maven installation in our windows system.

Related posts:

Leave a Reply

Your email address will not be published. Required fields are marked *