Skip to content

Commit 24e48e4

Browse files
committed
Authenticate with artifactory.
See #2208.
1 parent 7abe41b commit 24e48e4

File tree

3 files changed

+45
-7
lines changed

3 files changed

+45
-7
lines changed

Jenkinsfile

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ pipeline {
2727
}
2828
}
2929
options { timeout(time: 30, unit: 'MINUTES') }
30+
environment {
31+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
32+
}
3033
steps {
3134
sh 'rm -rf ?'
32-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw clean dependency:list verify -Dsort -U -B'
35+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean dependency:list verify -Dsort -U -B'
3336
}
3437
}
3538

@@ -50,9 +53,12 @@ pipeline {
5053
}
5154
}
5255
options { timeout(time: 30, unit: 'MINUTES') }
56+
environment {
57+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
58+
}
5359
steps {
5460
sh 'rm -rf ?'
55-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pjava11 clean dependency:list verify -Dsort -U -B'
61+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pjava11 clean dependency:list verify -Dsort -U -B'
5662
}
5763
}
5864

@@ -65,9 +71,12 @@ pipeline {
6571
}
6672
}
6773
options { timeout(time: 30, unit: 'MINUTES') }
74+
environment {
75+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
76+
}
6877
steps {
6978
sh 'rm -rf ?'
70-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pjava11 clean dependency:list verify -Dsort -U -B'
79+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pjava11 clean dependency:list verify -Dsort -U -B'
7180
}
7281
}
7382
}
@@ -95,7 +104,7 @@ pipeline {
95104

96105
steps {
97106
sh 'rm -rf ?'
98-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' +
107+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory ' +
99108
'-Dartifactory.server=https://repo.spring.io ' +
100109
"-Dartifactory.username=${ARTIFACTORY_USR} " +
101110
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
@@ -124,7 +133,7 @@ pipeline {
124133
}
125134

126135
steps {
127-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,distribute ' +
136+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute ' +
128137
'-Dartifactory.server=https://repo.spring.io ' +
129138
"-Dartifactory.username=${ARTIFACTORY_USR} " +
130139
"-Dartifactory.password=${ARTIFACTORY_PSW} " +

LICENSE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@
179179
APPENDIX: How to apply the Apache License to your work.
180180

181181
To apply the Apache License to your work, attach the following
182-
boilerplate notice, with the fields enclosed by brackets "[]"
182+
boilerplate notice, with the fields enclosed by brackets "{}"
183183
replaced with your own identifying information. (Don't include
184184
the brackets!) The text should be enclosed in the appropriate
185185
comment syntax for the file format. We also recommend that a
186186
file or class name and description of purpose be included on the
187187
same "printed page" as the copyright notice for easier
188188
identification within third-party archives.
189189

190-
Copyright [yyyy] [name of copyright owner]
190+
Copyright {yyyy} {name of copyright owner}
191191

192192
Licensed under the Apache License, Version 2.0 (the "License");
193193
you may not use this file except in compliance with the License.

settings.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
https://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
6+
<servers>
7+
<server>
8+
<id>spring-plugins-release</id>
9+
<username>${env.ARTIFACTORY_USR}</username>
10+
<password>${env.ARTIFACTORY_PSW}</password>
11+
</server>
12+
<server>
13+
<id>spring-libs-snapshot</id>
14+
<username>${env.ARTIFACTORY_USR}</username>
15+
<password>${env.ARTIFACTORY_PSW}</password>
16+
</server>
17+
<server>
18+
<id>spring-libs-milestone</id>
19+
<username>${env.ARTIFACTORY_USR}</username>
20+
<password>${env.ARTIFACTORY_PSW}</password>
21+
</server>
22+
<server>
23+
<id>spring-libs-release</id>
24+
<username>${env.ARTIFACTORY_USR}</username>
25+
<password>${env.ARTIFACTORY_PSW}</password>
26+
</server>
27+
</servers>
28+
29+
</settings>

0 commit comments

Comments
 (0)