一、安装
1、下载最新的nexus安装包
下载地址:http://www.sonatype.org/nexus/go
csdn下载地址:http://download.youkuaiyun.com/detail/javaee1234/9709046
2、运行nexus.bat 安装nexus服务。
3、启动该服务。
4、访问地址:http://localhost:8081/nexus/
5、默认管理员:admin 密码:admin123
6、默认部署用户名:deployment 密码:deployment123
7、从私服下载的jar包与插件 同样会在本地仓库中
二、配置nexus 从阿里云服务器下载架包
主要配置:
Remote
Storage Location:http://maven.aliyun.com/nexus/content/groups/public/
Download
Remote Indexes:true
三、配置项目pom
项目pom中配置如下,可从私服下载包和插件
<project>
<repositories>
<repository>
<id>local-nexus</id>
<url>http://localhost::8081/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
四、测试是否成功
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>apache-velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.5</version>
</project>