Maven私服Nexus3.13搭建
1、私服搭建教程 www.cnblogs.com/aqicheng/p/…
2、从nexus下载jar包到本地配置 www.eryajf.net/1851.html
3、从本地上传nexus私服配置 www.cnblogs.com/jichi/p/116…
本地jar包批量上传私服nexus blog.csdn.net/libusi001/a…
在repo目录下执行相应的脚本 ./mavenimport.sh -u admin -p admin123 -r http://ip:8081/repository/sru_upload_repo ./mavenimport.sh -u admin -p admin123 -r http://ip:8081/repository/sru_upload_repo ./mavenimport.sh -u admin -p admin123 -r http://ip:8081/repository/my_repo/ ./mavenimport.sh -u admin -p admin123 -r http://ip:8081/repository/maven-releases
mavenimport.sh 文件
#!/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
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 './mavenimport\.sh*' -not -path '*/\.*' -not -path '*/\^archetype\-catalog\.xml*' -not -path '*/\^maven\-metadata\-local*\.xml' -not -path '*/\^maven\-metadata\-deployment*\.xml' | sed "s|^\./||" | xargs -I '{}' curl -u "$USERNAME:$PASSWORD" -X PUT -v -T {} ${REPO_URL}/{} ;