1.下载nexus,下载oss版本
2.更改下载的nexus-xxx.war为nexus.war
3.拷贝到tomcat的webapp目录下
4.运行tomcat,进入nexus起始页
5.用admin/admin123登录
6. 点击Administration菜单下面的Repositories,将这三个仓库Apache Snapshots,Codehaus Snapshots,Maven Central的Download Remote Indexes修改为true。然后在这三个仓库上分别右键,选择Repair-index,这样Nexus就会去下载远程的索引文件。
7.修改maven对应本地库的setting.xml,添加如下内容
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>nexus</id>
<name>Nexus</name>
<url>http://localhost:8081/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>Nexus</name>
<url>http://localhost:8081/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
原文地址:http://8757576.blog.51cto.com/8747576/1548360