zcaudate
zcaudate

Reputation: 14258

Where is the maven local repo path specified in environments?

I'm looking to programmatically determine where my .m2 directory when inside the JVM. Is there a properties value or an environment key that is avaliable?

Upvotes: 0

Views: 455

Answers (2)

unknown
unknown

Reputation: 5017

If you are using Windows Machine :

Maven Directory Path :- C:\Users\[user-name]\.m2

If you are using Linux Machine :

Maven Directory Path :- \home\[user-name]\.m2

Upvotes: 1

loknath
loknath

Reputation: 1372

check inside your maven install directory

Maven\conf\setting.xml

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

you can change it to your own directory

Upvotes: 2

Related Questions