一、Nexus搭建maven仓库
(略)
二、重启
[root@MiWiFi-R3600-srv bin]# pwd
/usr/local/nexus-2.11.4-01/bin
[root@MiWiFi-R3600-srv bin]# ll
总用量 20
drwxr-xr-x. 15 root root 272 7月 10 2015 jsw
-rwxr-xr-x. 1 root root 14629 6月 16 2021 nexus
-rwxr-xr-x. 1 root root 2334 7月 10 2015 nexus.bat
[root@MiWiFi-R3600-srv bin]# ./nexus restart
****************************************
WARNING - NOT RECOMMENDED TO RUN AS ROOT
****************************************
Stopping Nexus OSS...
Stopped Nexus OSS.
Starting Nexus OSS...
Started Nexus OSS.
访问:http://192.168.31.218:8081/nexus/
若启动正常,访问失败,把防火墙关闭一下,systemctl stop firewalld 再试即可
三、本地jar包导入maven仓库
https://blog.csdn.net/weixin_46137815/article/details/107083718
cmd运行,确定本地jar位置就可以开始了…… mvn install:install-file -Dfile=/Users/fxl/Documents/cn/...XX.jar -DgroupId=cn.com.XX -DartifactId=XX -Dversion=1.6.0.RELEASE -Dpackaging=jar 四、本地jar包导入到远程maven仓库 mvn deploy:deploy-file -Dfile=/Users/fxl/Documents/cn/...XX.jar -DgroupId=cn.com.XX -DartifactId=XX -Dversion=1.6.0.RELEASE -Dpackaging=jar -DrepositoryId=nexus -Durl=http://192.168.31.218:8081/nexus/content/repositories/releases/ 说明:deploy的时候,如果报401错误,检查一下url、账号密码等是否正确


