Oct 27, 2015

How to change the location of Maven repository



By default the maven repository is created in C:\Users\username\.m2\repository
Below are the steps to change the location of Maven repository.

1. Edit the settings.xml file in location C:\Users\<user-name>\.m2\settings.xml

2. Add the line highlighted below.

  <settings>
  <localRepository>D:/Softs/mvnrepo/repository</localRepository>
  <servers>
    <server>
      <id>maven.gtk.com</id>
      <username>domain\username</username>
      <password>pass1</password>     
    </server>
  </servers>
</settings>

No comments:

Post a Comment