Maven jar上传Nexus教程
上传jar教程
1. 找到对应的仓库上传路径
release和snapshot版本的路径,没有则创建
稳定版本:http://ip:port/repository/maven-release
快照版本:http://ip:port/repository/maven-snapshot

2.切换到repository仓库目录下执行命令
上传快照:
mavenimport.sh -u 账号 -p 密码 -r http://ip:port/repository/maven-snapshot/
上传稳定版本:
mavenimport.sh -u 账号 -p 密码 -r http://ip:port/repository/maven-release/


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}{} ;
本文来自博客园,作者:咔咔皮卡丘,转载请注明原文链接:https://www.cnblogs.com/anquing/p/19033182

浙公网安备 33010602011771号