Background
Bought a surface, brought to the company as a development machine to use, various environments need to reinstall, write a note to record the MAVEN installation steps, although very simple, but my brain, easy to forget, write down to spare
Start
Install Maven
Visit maven's download page: http://maven.apache.org/download.html, which contains various versions of Maven download files for different platforms, and the version I downloaded here is 3.0.5:http:// Pan.baidu.com/s/1kt5gyav
After the download is complete, extract to: C:\career\tools\maven\apache-maven-3.0.5
Add environment variable: Mvn_homme to c:/career/tools/maven/apache-maven-3.0.5, set bin to path, add at end of path:;%mvn_home%/bin
Create local warehouse location, build directory: C:\career\tools\maven\repositories\A-repository\repo
To modify the Maven/conf/settings.xml file:
Search for Localrepository and update the warehouse address for step 4th, where the jar packs will be stored:
<localRepository>C:/career/tools/maven/repositories/oecs-repository/repo</localRepository>
Search profiles, add a profile inside:
<profile> <id>develop</id> <repositories> <repository> <id>re Mote-nexus</id> <name>remote-nexus</name> <url>http://192.168.200.203:9090/nexus/content
/groups/public</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> < /repositories> <pluginRepositories> <pluginRepository> <id>remote-nexus</id>
; <name>remote-nexus</name> <url>http://192.168.200.203:9090/nexus/content/groups/public</
url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginrepositories>
; </Profile>
Search servers to add snapshots and releases login Nexus username and password, which will be used when packaging and uploading to servers:
<server>
<id>nexus-releases</id>
<username>admin</username>
< password>admin123</password>
</server>
<server>
<id>nexus-snapshots< /id>
<username>admin</username>
<password>admin123</password>
</ Server>