-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathpom.xml
411 lines (398 loc) · 17.3 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2022 Red Hat, Inc., and individual contributors
~ as indicated by the @author tags.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.wildfly.cloud-tests</groupId>
<artifactId>wildfly-cloud-tests-parent</artifactId>
<version>1.0.0.Alpha3-SNAPSHOT</version>
</parent>
<artifactId>wildfly-cloud-tests</artifactId>
<packaging>pom</packaging>
<properties>
<!--
Set some properties here to not have to specify those on the command line when we want to write tests.
-->
<!--
This needs to be true for Kubernetes. For OpenShift false is better.
Openshift will actually work with this as true, but it results in the annotation processors pushing up an
image for an unused s2i build to OpenShift, which takes extra time. Since this happens during test
compilation, it means images are pushed up for tests not targeting OpenShift as well.
-->
<dekorate.push>true</dekorate.push>
<!-- Individual tests will need to set this property -->
<wildfly.cloud.test.base.image.name></wildfly.cloud.test.base.image.name>
<!-- Only used for OpenShift, and users need to specify this on the command line -->
<dekorate.docker.group></dekorate.docker.group>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.cloud-tests</groupId>
<artifactId>test-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Other dependencies -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>annotation-processor</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>junit-extension</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.dekorate</groupId>
<artifactId>kubernetes-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.dekorate</groupId>
<artifactId>kubernetes-junit</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.dekorate</groupId>
<artifactId>openshift-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.dekorate</groupId>
<artifactId>openshift-junit</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>commons-logging-jboss-logging</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-dmr</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk7</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>ROOT</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<!--
If you need to debug the annotation processor, use the following configuration, and pass in
-Ddekorate.docker.registry=localhost:5000
-Ddekorate.push=true
-Dwildfly.cloud.test.base.image.name=<base image name>
manually when running mvnDebug clean install.
For OpenShift you will need to adjust -Ddekorate.docker.registry, and additionally pass in
-Dwildfly.cloud.test.docker.group to point to your OpenShift project.
-->
<!--
<configuration>
</configuration>
-->
<configuration>
<fork>true</fork>
<compilerArgs>
<arg>-J-Dwildfly.cloud.test.base.image.name=${wildfly.cloud.test.base.image.name}</arg>
<!--
Dekorate allows specifying these with -D on the command-line.
in order to not HAVE to do that, we pass them in explicitly here.
-->
<arg>-J-Ddekorate.docker.registry=${dekorate.docker.registry}</arg>
<arg>-J-Ddekorate.push=${dekorate.push}</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>default-test</id>
<goals>
<goal>test</goal>
</goals>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module>framework</module>
<module>core</module>
<module>clustering</module>
<module>datasources</module>
<module>elytron-oidc-client</module>
<module>manual</module>
<module>microprofile</module>
<module>observability</module>
</modules>
<profiles>
<profile>
<id>kubernetes-tests</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<phase>integration-test</phase>
<configuration>
<groups>Kubernetes</groups>
<includes>
<include>**/*IT.class</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!--
Profile to reduce disk space when running on CI with a local minikube instance. Thus, this is only
relevant for the tests which have the KUBERNETES tag.
It disables and enables the Kubernetes registry between each test. This essentially
cleans out all the images stored in the Kubernetes registry, resulting in space savings.
-->
<id>kubernetes-ci</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>minikube-addons-enable-registry</id>
<phase>test-compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./.github/scripts/start-registry.sh</executable>
<arguments>
<argument>${project.basedir}</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>minikube-addons-disable-registry</id>
<phase>verify</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./.github/scripts/stop-registry.sh</executable>
<arguments>
<argument>${project.basedir}</argument>
<arguments>${dekorate.docker.registry}/${user.name}/${project.artifactId}:${project.version}</arguments>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!--
Profile to reduce disk space when running on CI whether against OpenShift or Kubernetes.
It deletes the test image and the base image after each test.
Before each test, it determines the base image required by the test, and builds that.
Then the test itself builds the test image (base image + test deployment) as usual.
-->
<id>docker-cleanup</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>docker-build-image</id>
<phase>test-compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./.github/scripts/build-docker-image.sh</executable>
<arguments>
<argument>${project.basedir}</argument>
<argument>${wildfly.cloud.test.base.image.name}</argument>
<argument>${version.wildfly}</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>minikube-addons-disable-registry</id>
<phase>verify</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./.github/scripts/clean-docker.sh</executable>
<arguments>
<argument>${project.basedir}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>openshift-tests</id>
<properties>
<!--
This will work with true
-->
<dekorate.push>false</dekorate.push>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<fork>true</fork>
<compilerArgs>
<arg>-J-Dwildfly.cloud.test.base.image.name=${wildfly.cloud.test.base.image.name}</arg>
<arg>-J-Ddekorate.docker.group=${dekorate.docker.group}</arg>
<!--
Dekorate allows specifying these with -D on the command-line.
in order to not HAVE to do that, we pass them in explicitly here.
-->
<arg>-J-Ddekorate.docker.registry=${dekorate.docker.registry}</arg>
<arg>-J-Ddekorate.push=${dekorate.push}</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<phase>integration-test</phase>
<configuration>
<groups>OpenShift</groups>
<includes>
<include>**/*IT.class</include>
</includes>
<systemProperties>
<dekorate.docker.group>${dekorate.docker.group}</dekorate.docker.group>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>