您的位置:首页 > 其它

搭建maven nexus私服教程

2016-12-12 16:12 405 查看
一、安装

1、下载最新的nexus安装包
下载地址:http://www.sonatype.org/nexus/go
csdn下载地址:http://download.csdn.net/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>










                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: