MAVEN's local repository is a dependency that stores all projects (plug-in jars and other files, which are downloaded by maven) to a local folder.
Very simply, when you build a MAVEN project, all the relevant files will be stored in your MAVEN local repository.
By default, MAVEN's local repository defaults to the. M2 Directory folder:
- Unix/mac OS x–~/.m2
- Windows–c:\documents and SETTINGS\{YOUR-USERNAME}\.M2
1. Update MAVEN's local library
Typically, you can change the default local repository folder under the default. M2 directory to a more meaningful name, for example, Maven-repo
Find {m2_home}\conf\setting.xml, update localrepository to another name.
{M2_home}\conf\setting.xml
<settings><!--localrepository | The path to the local repository maven would use to store artifacts. Default: ~/.m2/repository <localRepository>/path/to/local/repo</localRepository> -->< Localrepository>d:\software\yiibai.com\apache-maven\repository</localrepository>
2. Save the file
After execution, the new Maven local repository is now changed to D:\software\yiibai.com\apache-maven\repository.
Execute command:
C:\worksp> MVN archetype:generate-dgroupid=com.yiibai-dartifactid=numbergenerator-darchetypeartifactid= Maven-archetype-quickstart-dinteractivemode=false
See for example:
Tags: Maven local repository
This site is reproduced in addition to the article, are the original site or compiled
Welcome any form of reprint, but please be sure to indicate the source, respect for the work of others to create excellent examples of the tutorial
Reprint Please specify: Article reprinted from: http://www.yiibai.com/maven/maven-local-repository.html
MAVEN Learning---maven local repository