From 6a7668fec89998c4764ca5ed52dff64e9fda1b2a Mon Sep 17 00:00:00 2001 From: gongquanlin <1025081659@qq.com> Date: Thu, 16 Feb 2023 15:16:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E9=80=81maven=E5=88=B0=E7=A7=81?= =?UTF-8?q?=E6=9C=89=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 ++++ mavenimport.sh | 16 +++++++++++ pom.xml | 76 ++++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 89 insertions(+), 8 deletions(-) create mode 100644 mavenimport.sh diff --git a/README.md b/README.md index 792471d7..29bd281e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # sims-order-sdenergy +### 导入jar包到山能私有maven +```shell +sh ./mavenimport.sh -u admin -p Sdnydt@2022 -r http://172.31.32.53:8081/repository/maven-public/ +``` + ### 部署注意事项 >1.公司本地开发环境,bootstrap.yaml active:dev diff --git a/mavenimport.sh b/mavenimport.sh new file mode 100644 index 00000000..e3b8fab4 --- /dev/null +++ b/mavenimport.sh @@ -0,0 +1,16 @@ +#!/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}/{} ; diff --git a/pom.xml b/pom.xml index 41a7ad5c..8ea00fe4 100644 --- a/pom.xml +++ b/pom.xml @@ -125,14 +125,6 @@ 6.1.6.Final - http://10.1.20.6:8081/nexus/content/groups/public - http://10.1.20.6:8081/nexus/content/groups/public - - http://10.1.20.6:8081/nexus/content/repositories/releases - - http://10.1.20.6:8081/nexus/content/repositories/snapshots - - @@ -544,6 +536,13 @@ dxhy Dxhy@123 + http://10.1.20.6:8081/nexus/content/groups/public + http://10.1.20.6:8081/nexus/content/groups/public + + http://10.1.20.6:8081/nexus/content/repositories/releases + + http://10.1.20.6:8081/nexus/content/repositories/snapshots + @@ -561,6 +560,13 @@ dxhy Dxhy@123 + http://10.1.20.6:8081/nexus/content/groups/public + http://10.1.20.6:8081/nexus/content/groups/public + + http://10.1.20.6:8081/nexus/content/repositories/releases + + http://10.1.20.6:8081/nexus/content/repositories/snapshots + @@ -574,6 +580,13 @@ dxhy Dxhy@123 + http://10.1.20.6:8081/nexus/content/groups/public + http://10.1.20.6:8081/nexus/content/groups/public + + http://10.1.20.6:8081/nexus/content/repositories/releases + + http://10.1.20.6:8081/nexus/content/repositories/snapshots + @@ -587,6 +600,13 @@ dxhy Dxhy@123 + http://10.1.20.6:8081/nexus/content/groups/public + http://10.1.20.6:8081/nexus/content/groups/public + + http://10.1.20.6:8081/nexus/content/repositories/releases + + http://10.1.20.6:8081/nexus/content/repositories/snapshots + @@ -600,6 +620,13 @@ dxhy Dxhy@123 + http://10.1.20.6:8081/nexus/content/groups/public + http://10.1.20.6:8081/nexus/content/groups/public + + http://10.1.20.6:8081/nexus/content/repositories/releases + + http://10.1.20.6:8081/nexus/content/repositories/snapshots + @@ -613,6 +640,13 @@ dxhy Dxhy@123 + http://10.1.20.6:8081/nexus/content/groups/public + http://10.1.20.6:8081/nexus/content/groups/public + + http://10.1.20.6:8081/nexus/content/repositories/releases + + http://10.1.20.6:8081/nexus/content/repositories/snapshots + @@ -626,6 +660,32 @@ sales_manager HApbG7#Ka7#vzADq + http://10.1.20.6:8081/nexus/content/groups/public + http://10.1.20.6:8081/nexus/content/groups/public + + http://10.1.20.6:8081/nexus/content/repositories/releases + + http://10.1.20.6:8081/nexus/content/repositories/snapshots + + + + + sdny + + dev + /data/logs/ + debug + + + dxhy + Dxhy@123 + http://10.1.20.6:8081/nexus/content/groups/public + http://10.1.20.6:8081/nexus/content/groups/public + + http://10.1.20.6:8081/nexus/content/repositories/releases + + http://10.1.20.6:8081/nexus/content/repositories/snapshots +