1. nexus 3.25版本maven仓库,同步依赖
上传本地依赖仓库压缩包至服务器,Linux 服务器新建sh脚本,内容填充以下内容,脚本位置在解压依赖的目录下,与各种依赖包同级。
运行命令: ./nexusImport.sh -u admin -p admin123 -r http://xxxxx:8280/repository/self-repo/
```java
#!/bin/bash
# copy and run this script to the root of the repository directory containing files
# this script attempts to exclude uploading itself explicitly so the script name is important
# Get command line params
#运行指令 依赖同级文件夹下运行 ./nexusImport.sh -u admin -p admin123 -r http://xxxxx:8280/repository/self-repo/
while getopts ":r:u:p:" opt; do
case $opt in
r) REPO_URL="$OPTARG"
;;
u) USERNAME="$OPTARG"
;;
p) PASSWORD="$OPTARG"
;;
esac
done
find . -type f -not -path './mavenUpload\.sh*' -not -path '*/\.*' -not -path '*/\^archetype\-catalog\.xml*' -not -path '*/\^maven\-metadata\-local*\.xml' -not -path '*/\^

本文介绍了如何在Linux服务器上使用sh脚本同步本地Maven仓库到Nexus 3.25版本,并处理远程仓库依赖冲突。重点讲述了遇到的依赖问题,即本地存在但远端未上传的依赖导致构建失败,以及解决方法——删除_local.repositories文件以避免远程下载。
最低0.47元/天 解锁文章
1899

被折叠的 条评论
为什么被折叠?



