简体   繁体   中英

Maven changing the maven repository from {user}/.m2/repository to projectfolder using pom.xml

I am just wondering is it possible to change the repository from m2 to my project folder using pom.xml setting?

Or is there another self contained way to do it, except using settings.xml from maven??

Cheers, Andrei

Based on the comment, it appears that you want the dependencies to be downloaded once, checked into version control system and never updated again.

While this is possible, this would defeat the purpose of using maven - like handling updates to dependencies. Also, it would bloat your SCM needlessly and cause performance issues during checkouts.

Why don't you look at using a repository manager (like nexus or artifactory ), which can mirror required repositories in your local network, so that developers can access it instead of downloading it from internet?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM