赞
踩
maven-central:maven中央库,默认从https://repo1.maven.org/maven2/拉取jar
maven-releases:私库发行版jar
maven-snapshots:私库快照(调试版本)jar
maven-public:仓库分组,把上面三个仓库组合在一起对外提供服务,在本地maven基础配置settings.xml中使用。

批量导入命令如下
./mavenimport.sh -u 你的nexus用户名 -p 你的nexus密码 -r http://127.0.0.1:8081/repository/my_repo/
- # 执行命令下面导入
- # ./mavenimport.sh -u 你的nexus用户名 -p 你的nexus密码 -r http://127.0.0.1:8081/repository/my_repo/
-
-
- #!/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}/{} ;

mavenimport.sh文件下载地址在百度网盘
链接:https://pan.baidu.com/s/1si8AMoNTWM4pqOYLu2wtqw?pwd=ceeh
提取码:ceeh
--来自百度网盘超级会员V8的分享
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。