Sarang Khajuria
Sarang Khajuria

Reputation: 107

link to local .m2 repository in pom.xml

Can I get a link to the .m2 directory in my pom.xml file. At the moment I am directing it at ${user.home}/.m2/repository but some of the users may have their .m2 folder elsewhere. I have tried ${localRepository} but it just creates that directory in my current directory instead of jumping to it plus it creates a weird structure like id: local url :file/.m2/repository/*. I want to link the .m2 repository directory

Upvotes: 1

Views: 1150

Answers (1)

Steve C
Steve C

Reputation: 19445

I believe that you're looking for:

 ${settings.localRepository}

as described in the List of predefined Maven properties.

Upvotes: 3

Related Questions