
maven私服的配置使用
发布日期:2021-05-09 03:55:32
浏览次数:18
分类:技术文章
本文共 2060 字,大约阅读时间需要 6 分钟。
maven的仓库分为本地仓库,远程仓库和私服仓库。
私服仓库一般是公司内部私有的,内部进行维护的。公司员工连接私服,从私服中下载jar,或者将自身的jar传到私服上。私服还可以从中央仓库下载jar,当私服中没用jar的时候,就会从中央仓库下载。搭建私服
下载
下载 Nexus,下载地址: 。
可以选择zip和tar,分别对应windows和linux。安装
将下载的zip解压,使用cmd进入bin目录,执行命令:
nexus.bat install
卸载
执行命令:
nexus.bat uninstall
启动
1、cmd进入目录,执行命令
nexus.bat start
2、在服务中找到nexus,右键启动
nexus配置文件详细
查看 nexus 的配置文件conf/nexus.properties
application-port=8081 # nexus 的访问端口配置application-host=0.0.0.0 # nexus 主机监听配置(不用修改)nexus-webapp=${bundleBasedir}/nexus # nexus 工程目录nexus-webapp-context-path=/nexus # nexus 的 web 访问路径nexus-work=${bundleBasedir}/../sonatype-work/nexus # nexus 仓库目录runtime=${bundleBasedir}/nexus/WEB-INF # nexus 运行程序目录访问私服
点击右上角log in,输入用户名和密码默认是admin/admin123登录完毕上传jar包到私服
在maven的setting.xml中配置
releases admin admin123 snapshots admin admin123
配置项目的pom文件
releases http://localhost:8081/nexus/content/repositories/releases/ snapshots http://localhost:8081/nexus/content/repositories/snapshots/
使用deploy命令即可将jar发布到私服,发布工程中的version,如果以snapshot结尾,则可以发布到快照仓库,如果以release结尾,则可以发布到releases版本。
从私服下载jar包
在setting中配置私服仓库
dev nexus http://localhost:8081/nexus/content/groups/public/ true true public Public Repositories http://localhost:8081/nexus/content/groups/public/
激活
dev
发表评论
最新留言
感谢大佬
[***.8.128.20]2025年05月10日 11时56分46秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
Centos 5.3 ADSL拨号组建中小型企业网络
2025-03-31
Centos 5.8 安装后不能使用ifconfig
2025-03-31
Centos 6 & 7 LVM 逻辑盘卷管理
2025-03-31
CentOS 6 时间,时区,设置修改及时间同步
2025-03-31
Centos 6.3 64bit安装KVM总结
2025-03-31
CentOS 6.4 yum安装chrome
2025-03-31
CentOS 6.4下编译安装MySQL 5.6.14
2025-03-31
Centos 6.4搭建网络源
2025-03-31
CentOS 6.5 Zabbix-server安装
2025-03-31
CentOS 6.5 伪分布式 安装 hadoop 2.6.0
2025-03-31
CentOS 6.5 配置IP地址的三种方法
2025-03-31
CentOS 6.9 yum 和源码安装htop,适用于centOS 7
2025-03-31
centos 64位 hadoop编译
2025-03-31
CentOS 7 / RHEL 7 上安装 LAMP + phpMyAdmin
2025-03-31
CentOS 7更换yum源
2025-03-31
CentOS 7 安装 postgreSQL 9.4
2025-03-31
centos 7安装docker
2025-03-31
CentOS 7 巨大变动之 systemd 取代 SysV的Init
2025-03-31
Centos 7 快速安装FTP服务
2025-03-31
centos 7 静态IP,指定DNS
2025-03-31