maven私有仓库nexus3.5搭建与使用
来源:互联网 发布:淘宝订单险加入条件 编辑:程序博客网 时间:2024/05/05 23:35
maven私有仓库nexus3.5搭建与使用
参考网址:
http://blog.csdn.net/clj198606061111/article/details/52200928
http://www.cnblogs.com/jingmoxukong/p/6050172.html
http://blog.csdn.net/north_eagle/article/details/42428219
环境
- 操作系统 ubuntu16.04
- nexus版本 nexus-3.5.0-02-unix
下载
下载地址:https://www.sonatype.com/download-oss-sonatype
安装
$ sudo tar -zxvf nexus-3.5.0-02-unix.tar.gz -C /usr/local/$ vim ~/.bashrc添加#for nexusexport NEXUS_HOME=/uusr/local/nexus-3.5.0-02export PATH=$NEXUS_HOME/bin:$PATH$ source ~/.bashrc$ nexus start
打开浏览器url http://localhost:8081 用户名admin具有全部权限,默认密码admin123。
配置maven
在$MAVEN_HOME/conf下修改settings.xml
<pluginGroups> <pluginGroup>org.sonatype.plugins</pluginGroup> </pluginGroups> <servers> <server> <id>nexus</id> <username>admin</username> <password>admin123</password> </server> </servers><mirrors> <mirror> <id>nexus</id> <mirrorOf>*</mirrorOf> <url>http://localhost:8081/repository/maven-public/</url> </mirror> </mirrors><profiles><profile> <id>nexus</id> <repositories> <repository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <activeProfile>nexus</activeProfile> </activeProfiles>
使用maven编译会首先从nexus私有仓库中下载依赖包,如果nexus私有仓库没有,会从配置的mirror中maven官方中央仓库central中下载,同时存入到nexus私有仓库。
仓库迁移
nexus2.x 到nexus 2.x迁移
直接拷贝仓库目录进行迁移
当前机器上 ${user.home}/sonatype-work copy到新机器的对应位置。这样所有的数据就可以全部恢复。
nexus2.x 到nexus 3.x迁移
配置nexus-2.x的Upgrade #
Administration–>Capabilities–>New–>Upgrade: Agent–>Access Token–>12345678
上面的流程是登陆nexus-2.x配置Upgrade:Agent和Access Token在此我们配置的是12345678
配置nexus-3.x的Upgrade #
Administration–>System–>Capabilities–>Create capability–>Create Upgrade Capability
通过Task迁移数据 #
Administration–>System–>Upgrade–>Next–>URL&access token–>Next…
URL: nexus2.x的url,例如 http://10.10.3.225:8082/nexus
Access Token: 12345678
数据迁移完毕,验证仓库数据。
nexus3.x 到nexus 3.x迁移
暂时未找到方法,采用直接拷贝仓库目录进行迁移,maven编译时会有一些警告信息,并且有些包无法下载。
- maven私有仓库nexus3.5搭建与使用
- 【Maven】Nexus3搭建Maven私有仓库及使用
- 使用nexus3搭建私有仓库
- Maven 仓库使用与私有仓库搭建
- Nexus3配合Gradle搭建私有仓库
- Android的Nexus搭建Maven私有仓库与使用
- Nexus3搭建Maven私有库(一)
- Nexus3搭建Maven私有库(二)
- Nexus3搭建Maven私有库(三)
- Nexus3搭建Maven私有库(四)
- Nexus3搭建Maven私有库(五)
- Nexus 私有仓库搭建与 Maven 集成
- 使用Archiva搭建Maven私有仓库
- 使用Nexus搭建Maven私有仓库
- centos使用nexus搭建私有maven仓库
- 使用Artifactory搭建私有Maven仓库
- Maven 私有仓库搭建
- 搭建Maven私有仓库
- Hibench使用
- java基础第二十七天 数据库
- IE8,IE7 Javascript获取 classname的方法
- iOS-singleton(单例)三种创建方式
- 基数排序
- maven私有仓库nexus3.5搭建与使用
- 矩-图像处理中的距
- java 异常、断言和日志
- 在Debian上安装Nodejs方法
- Oracle的rownum原理和使用
- 天天学Linux命令7--rmdir命令
- Java基础学习总结——Java主要技术点总结
- CSS
- iOS 开发知识点