-
Notifications
You must be signed in to change notification settings - Fork 26
/
pom.xml
553 lines (509 loc) · 21.7 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
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
<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>
<groupId>org.tsdes</groupId>
<artifactId>tsdes</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Root of TSDES</name>
<modules>
<module>misc</module>
<module>intro</module>
<module>advanced</module>
</modules>
<!--
Maven phases:
https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference
Main ones:
*clean*
compile
process-test-classes
test
package
pre-integration-test
integration-test
post-integration-test
verify
install
deploy
apart from *clean*, when executing one of those phases (eg "mvn test"), all previous
phases are executed as well.
clean: delete everything in the "target" folders
-->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<fs>${file.separator}</fs>
<version.java>11</version.java>
<!-- FIXME: 2.3.6 breaks... but anyway jump directly to 2.4.x once Spring Cloud supports it-->
<version.springboot>2.3.5.RELEASE</version.springboot>
<version.junit>5.7.0</version.junit>
<version.junit.platform>1.5.2</version.junit.platform>
<version.jacoco>0.8.5</version.jacoco>
<!-- FIXME version 1.4.200 breaks tests, eg in JPA-JPQL -->
<version.h2>1.4.197</version.h2>
<version.postgres>42.1.4</version.postgres>
<version.resteasy>3.1.3.Final</version.resteasy>
<version.testcontainers>1.15.1</version.testcontainers>
<version.selenium>3.141.59</version.selenium>
<!--
TODO: cannot update to 4.3+ as conflicts of major versioning
of Groovy runtime
-->
<version.restassured>4.2.0</version.restassured>
<version.surefire-failsafe>3.0.0-M4</version.surefire-failsafe>
</properties>
<dependencies>
<!--
With this code here, we are adding these dependencies automatically
to all sub-modules.
Note that <version> and <scope> are declared inside <dependencyManagement>
-->
<!--
Adding Jupiter to all modules, because we practically always have test cases.
Plus, JUnit breaks name convention on dependencies, and future versions
after Jupiter will likely require changing the dependency
-->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
</dependency>
</dependencies>
<!--
Here we define all third-party dependencies we need in the sub-modules, so that we
do not have to copy&paste each time the <version> and <scope> tags
To check for new versions, use:
mvn versions:display-dependency-updates -DprocessDependencyManagement=false
-->
<dependencyManagement>
<dependencies>
<!-- Our own modules -->
<dependency>
<groupId>org.tsdes.misc</groupId>
<artifactId>test-utils</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<!-- SpringBoot BOM -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>${version.springboot}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${version.springboot}</version>
<scope>test</scope>
<!-- Exclude JUnit 4, which is added by default-->
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Database -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${version.h2}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${version.postgres}</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq</artifactId>
<version>3.12.3</version>
</dependency>
<!-- test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${version.junit}</version>
<scope>test</scope>
</dependency>
<!--
This is needed for some libraries that do not support
JUnit 5 yet, like Arquillian:
https://github.com/arquillian/arquillian-core/issues/137
TODO: remove once Arquillian is supported
-->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${version.junit}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- to test REST APIs -->
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>${version.restassured}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>json-path</artifactId>
<version>${version.restassured}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>xml-path</artifactId>
<version>${version.restassured}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- to mock web services -->
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>2.27.2</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- used to control a browser for system testing -->
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${version.selenium}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- used to control a browser for system testing -->
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>${version.selenium}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- used to control a browser for system testing -->
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>${version.selenium}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- used to control a browser for system testing -->
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>${version.selenium}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- used to control a browser for system testing -->
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>${version.selenium}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- for code coverage -->
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core</artifactId>
<version>${version.jacoco}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- To use Docker from tests -->
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${version.testcontainers}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- To support JUnit 5 -->
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${version.testcontainers}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>selenium</artifactId>
<version>${version.testcontainers}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- For handling waiting of asynchronous events -->
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>4.0.3</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- To mock/stub objects -->
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.2.0</version>
<scope>test</scope>
</dependency>
<!-- Misc -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>28.1-jre</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.11.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.8.9</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.13</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>${version.resteasy}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson-provider</artifactId>
<version>${version.resteasy}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxb-provider</artifactId>
<version>${version.resteasy}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>7.2</version>
</dependency>
<!-- for caching -->
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>2.10.6</version>
</dependency>
<!-- Looks like we cannot use new version, as HttpClient still rely on 2.x-->
<!--<dependency>-->
<!--<groupId>org.ehcache</groupId>-->
<!--<artifactId>ehcache</artifactId>-->
<!--<version>3.5.2</version>-->
<!--</dependency>-->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-cache</artifactId>
<version>4.5.12</version>
</dependency>
</dependencies>
</dependencyManagement>
<!--
Profiles enable you to have custom configurations only in some special occasions.
You can use "-P <id>" to activate a profile with the given <id>, eg
mvn verify -P <id>
To see all available profiles in a project (which could be declared in sub-modules),
user:
mvn help:all-profiles | grep "Profile Id"
-->
<profiles>
</profiles>
<build>
<!--
like dependencyManagement, this only defines which (and how) plugins to use.
to actually activate them, they need to be directly under <plugins> (without
the need to reset all their configurations).
Note: some plugins are default in Maven, like the compiler.
To see what actually executed, you can look at the logs.
WARNING: make sure that in your projects you do have the <version> tags
for your plugins. If you do not, Maven might silently ignore it...
this is very different from forgetting a <version> in an imported library,
as that would usually end up in a compilation error (as some needed classes/methods
would not be found on the classpath)
-->
<pluginManagement>
<plugins>
<!-- Built-in plugin used to compile Java code -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<inherited>true</inherited>
<configuration>
<release>${version.java}</release>
</configuration>
</plugin>
<!-- Built-in plugin used to execute unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.surefire-failsafe}</version>
<configuration>
<forkCount>1</forkCount>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<rerunFailingTestsCount>3</rerunFailingTestsCount>
<argLine>-Xms512m -Xmx2048m</argLine>
</configuration>
</plugin>
<!-- this is needed to run integration tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.surefire-failsafe}</version>
<configuration>
<forkCount>1</forkCount>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<rerunFailingTestsCount>3</rerunFailingTestsCount>
<argLine>-Xms512m -Xmx4096m</argLine>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Need to create self-executable uber/fat jars for SpringBoot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${version.springboot}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
Avoid failing War generation if web.xml is missing, as we ll not
use it in some example modules
-->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<!-- For running ANT tasks, like renaming files/folders -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
</plugin>
<!--
Used to calculate code-coverage of the tests
-->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${version.jacoco}</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<phase>initialize</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-prepare-agent-integration</id>
<phase>package</phase>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
</execution>
<execution>
<id>default-report-integration</id>
<phase>verify</phase>
<goals>
<goal>report-integration</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- For cloud deployment on Heroku -->
<plugin>
<groupId>com.heroku.sdk</groupId>
<artifactId>heroku-maven-plugin</artifactId>
<version>2.0.2</version>
</plugin>
<!-- For scanning dependencies for known security issues -->
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>5.3.1</version>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- To execute external commands, like YARN -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>