批量上传Maven仓库jar包到Nexus私服
1.先将本地maven/localrepository仓库打一个完整的zip压缩包
2.上传到linux目录,如:/opt
3.解压localrepository.zip到/opt路径下
4.进入解压后的/opt/localrepository目录
5.1-4步,可以通过FTP/SFTP工具,直接将本地localrepository上传到/opt/localrepository
6.在/opt/localrepository目录下创建touch 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 o p t i n r ) R E P O U R L = " opt