-
Notifications
You must be signed in to change notification settings - Fork 18
/
pom.xml
531 lines (484 loc) · 15.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
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mastercard.test.flow</groupId>
<artifactId>parent</artifactId>
<version>1.1.7-SNAPSHOT</version>
<packaging>pom</packaging>
<name>flow</name>
<description>Testing framework</description>
<url>https://github.com/Mastercard/flow</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://opensource.org/licenses/Apache-2.0</url>
</license>
</licenses>
<developers>
<developer>
<organization>Mastercard</organization>
<organizationUrl>https://mastercard.com</organizationUrl>
</developer>
</developers>
<modules>
<module>api</module>
<module>message</module>
<module>builder</module>
<module>model</module>
<module>validation</module>
<module>assert</module>
<module>report</module>
<module>bom</module>
<module>aggregator</module>
<module>example</module>
<module>doc</module>
</modules>
<scm>
<connection>scm:git:https://github.com/Mastercard/flow.git</connection>
<developerConnection>scm:git:https://github.com/Mastercard/flow.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/Mastercard/flow</url>
</scm>
<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jline.version>3.23.0</jline.version>
<sonar.organization>mastercard</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<!-- The health of the example project is not terribly interesting, and
it seems a little unfair to be dinged for code that sonar can't
exercise due to living in a headless environment, so... -->
<sonar.exclusions>**/example/**/*.java,
**/com/mastercard/test/flow/assrt/filter/gui/*.java,
**/com/mastercard/test/flow/validation/coppice/**/*.java,
**/com/mastercard/test/flow/report/duct/SystrayGui.java</sonar.exclusions>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<!-- JSON support -->
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.18.1</version>
</dependency>
<dependency>
<!-- formatter for SQL queries -->
<groupId>com.github.vertical-blank</groupId>
<artifactId>sql-formatter</artifactId>
<version>2.0.5</version>
</dependency>
<dependency>
<!-- testing -->
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.11.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<!-- assert components for junit 4 -->
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
<dependency>
<!-- Mocks for testing -->
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
</dependency>
<dependency>
<!-- cli input -->
<groupId>org.jline</groupId>
<artifactId>jline-reader</artifactId>
<version>${jline.version}</version>
</dependency>
<dependency>
<!-- ANSI code support for jline -->
<groupId>org.jline</groupId>
<artifactId>jline-terminal-jansi</artifactId>
<version>${jline.version}</version>
</dependency>
<dependency>
<!-- web browser automation -->
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.13.0</version>
</dependency>
<dependency>
<!-- We use a headless chrome instance to test the report, this
provides automatic management of the drivers for that -->
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.9.2</version>
</dependency>
<dependency>
<!-- text diffs -->
<groupId>io.github.java-diff-utils</groupId>
<artifactId>java-diff-utils</artifactId>
<version>4.15</version>
</dependency>
<dependency>
<!-- REST framework -->
<groupId>com.sparkjava</groupId>
<artifactId>spark-core</artifactId>
<version>2.9.4</version>
</dependency>
<dependency>
<!-- Logging support -->
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.16</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<!-- junit5 support -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
</plugin>
<plugin>
<!-- `mvn formatter:format` to apply the format -->
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.16.0</version>
<configuration>
<!-- This plugin only executes in the child modules, so we need to
step one dir up and then back down to the format file. If we end up with
deeper-nested projects then they'll need to step commensurately further up -->
<configFile>${project.basedir}/../src/main/eclipse/mctf_format.xml</configFile>
<lineEnding>LF</lineEnding>
</configuration>
<executions>
<execution>
<goals>
<!-- Fails builds on non-compliant formatting -->
<goal>validate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- `mvn sortpom:sort` to format the pom files -->
<groupId>com.github.ekryd.sortpom</groupId>
<artifactId>sortpom-maven-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<lineSeparator>\n</lineSeparator>
<nrOfIndentSpace>-1</nrOfIndentSpace>
<createBackupFile>false</createBackupFile>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
</configuration>
</plugin>
<plugin>
<!-- `mvn -Paggregate clean test org.pitest:pitest-maven:mutationCoverage package`
to generate target/pit-reports in each module and then collate them in aggregator -->
<!-- Alternatively you can create a 'target/mutate' file in a given
project to have mutation testing performed for a single project only on
a `mvn test-compile` invocation -->
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.17.1</version>
<configuration>
<timestampedReports>false</timestampedReports>
<exportLineCoverage>true</exportLineCoverage>
<outputFormats>
<value>HTML</value>
<value>XML</value>
</outputFormats>
<threads>8</threads>
</configuration>
<dependencies>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>1.2.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<!-- `mvn javadoc:aggregate` to generate target/site/apidocs in the
parent -->
<!-- `mvn javadoc:javadoc` to generate target/site/apidocs in each module -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.1</version>
</plugin>
<plugin>
<!-- Building the report apps without tools installed -->
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.15.1</version>
</plugin>
<plugin>
<!-- building the report apps with installed tools -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>generate-javadoc</id>
<goals>
<goal>jar</goal>
</goals>
<phase>package</phase>
<configuration>
<nodeprecated>true</nodeprecated>
<additionalOptions>-Xdoclint:none</additionalOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<arguments>-Dnode=system</arguments>
<autoVersionSubmodules>true</autoVersionSubmodules>
<lineSeparator>lf</lineSeparator>
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- Mutation testing can take a while to run, so it's tedious to have
to invoke it on every module when you're iterating on one of them. This profile
runs mutation testing for those projects that have a file called 'mutate'
in their target directory in the test-compile phase -->
<!-- Hence to mutate a single project, from the parent project do: -->
<!-- touch <module>/target/mutate -->
<!-- mvn test-compile -->
<id>mutate</id>
<activation>
<file>
<exists>target/mutate</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<executions>
<execution>
<goals>
<goal>mutationCoverage</goal>
</goals>
<phase>test-compile</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- By default mutation testing will be started from fresh on every invocation, but
when you're working on a single class this can slow down your iteration cycle.
Activating this profile with `-Piterate` will cause pitest to take account of
historic results and only exercise the changes since last time. This is much
faster, but can sometimes give erroneous results -->
<id>iterate</id>
<build>
<plugins>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<configuration>
<historyInputFile>target/pit_hist</historyInputFile>
<historyOutputFile>target/pit_hist</historyOutputFile>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Sets some convenient plugin configuration when we're doing a full mutation testing run -->
<id>aggregate</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Skip the filter gui tests - they won't run in headless env and they're
annoying to sit through due to the mouse-stealing behaviour -->
<excludedGroups>gui</excludedGroups>
<systemPropertyVariables>
<!-- Skips the selenium tests - they don't contribute to java coverage
and they're a bit slow -->
<browser.skip>true</browser.skip>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Sonar doesn't understand pitest output, so we fall back to jacoco to get test coverage metrics into sonar -->
<!-- Looking to exclude a class from coverage? Check out the `sonar.exclusions` property above! -->
<id>coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<formats>
<format>XML</format>
<format>HTML</format>
</formats>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Skip the filter gui tests - they won't run in headless env and they're
annoying to sit through due to the mouse-stealing behaviour -->
<excludedGroups>gui</excludedGroups>
<systemPropertyVariables>
<!-- Skips the selenium tests - they don't contribute to java coverage
and they're a bit slow -->
<browser.skip>true</browser.skip>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Runs the example application integration test. -->
<!-- Invoke with `mkdir -p target; mvn -Peait test` -->
<id>eait</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- We only want the example app integration test -->
<test>com.mastercard.test.flow.example.app.itest.IntegrationTest</test>
<!-- don't fail projects that don't contain the integration test -->
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
<!-- Runs the tests in maven's JVM, so we can interact with the CLI
from the terminal -->
<forkCount>0</forkCount>
<systemPropertyVariables>
<!-- Triggers the filter interface -->
<mctf.filter.update>true</mctf.filter.update>
<!-- Default to the same filters as last time -->
<mctf.filter.repeat>true</mctf.filter.repeat>
<!-- Causes the report to be presented in a browser -->
<mctf.report.serve>true</mctf.report.serve>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Signs artifacts for release -->
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<executions>
<execution>
<id>sign-artifacts</id>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Skips the slow-running tests that are probably exercising stuff you didn't change -->
<!-- Invoke with `mvn -Push test` -->
<id>ush</id>
<properties>
<!-- skip the filter gui tests -->
<excludedGroups>gui</excludedGroups>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<!-- Skips the browser tests -->
<browser.skip>true</browser.skip>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>