From f4ca5d61918ab1802c49bd37386184504284beef Mon Sep 17 00:00:00 2001 From: "Greg L. Turnquist" Date: Thu, 22 Apr 2021 12:36:00 -0500 Subject: [PATCH] Authenticate with artifactory. See #367. --- Jenkinsfile | 9 ++++++--- LICENSE.txt | 4 ++-- pom.xml | 9 ++++++--- settings.xml | 29 +++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 settings.xml diff --git a/Jenkinsfile b/Jenkinsfile index 82ab2d5..752359f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,9 +29,12 @@ pipeline { } } options { timeout(time: 30, unit: 'MINUTES') } + environment { + ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') + } steps { sh 'rm -rf ?' - sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw clean dependency:list test -Dsort -U -B' + sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean dependency:list test -Dsort -U -B' } } } @@ -58,7 +61,7 @@ pipeline { steps { sh 'rm -rf ?' - sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' + + sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory ' + '-Dartifactory.server=https://repo.spring.io ' + "-Dartifactory.username=${ARTIFACTORY_USR} " + "-Dartifactory.password=${ARTIFACTORY_PSW} " + @@ -86,7 +89,7 @@ pipeline { } steps { - sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,distribute ' + + sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute ' + '-Dartifactory.server=https://repo.spring.io ' + "-Dartifactory.username=${ARTIFACTORY_USR} " + "-Dartifactory.password=${ARTIFACTORY_PSW} " + diff --git a/LICENSE.txt b/LICENSE.txt index 62589ed..ff77379 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -179,7 +179,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" + boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pom.xml b/pom.xml index 413ccac..bbe550b 100644 --- a/pom.xml +++ b/pom.xml @@ -118,9 +118,12 @@ - bintray-plugins - bintray-plugins - https://jcenter.bintray.com + spring-plugins-release + https://repo.spring.io/plugins-release + + + spring-libs-milestone + https://repo.spring.io/libs-milestone diff --git a/settings.xml b/settings.xml new file mode 100644 index 0000000..b3227cc --- /dev/null +++ b/settings.xml @@ -0,0 +1,29 @@ + + + + + spring-plugins-release + ${env.ARTIFACTORY_USR} + ${env.ARTIFACTORY_PSW} + + + spring-libs-snapshot + ${env.ARTIFACTORY_USR} + ${env.ARTIFACTORY_PSW} + + + spring-libs-milestone + ${env.ARTIFACTORY_USR} + ${env.ARTIFACTORY_PSW} + + + spring-libs-release + ${env.ARTIFACTORY_USR} + ${env.ARTIFACTORY_PSW} + + + + \ No newline at end of file