Maven local repository is default to home directory (~/.m2 on Unix/Mac OS X and C:\Documents and Settings\username\.m2 on Windows). Often times, you need to change the default location for maintainability purpose, .m2 is not a meaningful name:).
Maven configuration file
This file is under {M2_HOME}\conf\setting.xml
Location of the local repository is definfed in this file.
Find the following “localRepository” pattern, and define your new Maven local repository inside the “<localRepository>” element.
<settings>
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ~/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
-->
<localRepository>D:/maven_repo</localRepository>Maven will use this local repository location. If maven finds all the libraries on the local drive it will not try to download them from an online repository.
No comments:
Post a Comment