-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpom.xml
403 lines (377 loc) · 13.1 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
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.github.bordertech.common</groupId>
<artifactId>bordertech-parent</artifactId>
<version>1.0.22-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>qa-parent</artifactId>
<packaging>pom</packaging>
<properties>
<!-- SKIP QA -->
<bt.qa.skip>true</bt.qa.skip>
<checkstyle.skip>${bt.qa.skip}</checkstyle.skip>
<pmd.skip>${bt.qa.skip}</pmd.skip>
<cpd.skip>${bt.qa.skip}</cpd.skip>
<spotbugs.skip>${bt.qa.skip}</spotbugs.skip>
<dependency-check.skip>${bt.qa.skip}</dependency-check.skip>
<bt.convergence.check.skip>${bt.qa.skip}</bt.convergence.check.skip>
<!-- FAIL QA -->
<bt.qa.fail>true</bt.qa.fail>
<checkstyle.failOnViolation>${bt.qa.fail}</checkstyle.failOnViolation>
<pmd.failOnViolation>${bt.qa.fail}</pmd.failOnViolation>
<spotbugs.failOnError>${bt.qa.fail}</spotbugs.failOnError>
<!-- OWASP -->
<failOnError>${bt.qa.fail}</failOnError>
<!-- Convergence Check -->
<bt.convergence.check.fail>${bt.qa.fail}</bt.convergence.check.fail>
<!-- CPD (Default to report only) -->
<cpd.failOnViolation>false</cpd.failOnViolation>
<!--
These plugin settings are set as properties instead of being included in the default configuration to make it easier for projects to override.
Property values are ignored if a default value is set in a configuation.
-->
<!-- Checkstyle -->
<!-- Config file -->
<checkstyle.config.location>bordertech/bt-checkstyle.xml</checkstyle.config.location>
<!-- Override default to only use main src (ignore generated) -->
<bt.checkstyle.src>${project.build.sourceDirectory}</bt.checkstyle.src>
<!-- PMD -->
<pmd.printFailingErrors>true</pmd.printFailingErrors>
<!-- Priority: 1 (High) - 5 (Low) -->
<pmd.failurePriority>2</pmd.failurePriority>
<!-- Print details of check failures to build output -->
<pmd.verbose>true</pmd.verbose>
<!-- Rules file -->
<bt.pmd.rules.file>bordertech/bt-pmd-rules.xml</bt.pmd.rules.file>
<!-- Override default to only use main src (ignore generated) -->
<bt.pmd.src>${project.build.sourceDirectory}</bt.pmd.src>
<!-- Spotbugs -->
<!-- Effort -->
<spotbugs.effort>Max</spotbugs.effort>
<!-- Threshold Confidence: High, Medium, Low -->
<spotbugs.threshold>Medium</spotbugs.threshold>
<!-- Rank: Scariest (1-4), Scary (5-9), Troubling (10-14), Of concern (15-20) -->
<spotbugs.maxRank>14</spotbugs.maxRank>
<!-- To ignore generated files Spotbugs is different from checkstyle and PMD as it requires an exclude filter to be configured. -->
<!-- Exclude files in the generated-sources directory -->
<spotbugs.excludeFilterFile>bordertech/bt-spotbugs-exclude-generated-files.xml</spotbugs.excludeFilterFile>
<!-- Need to add sources for source tag in exclude and include filters to work -->
<spotbugs.addSourceDirs>true</spotbugs.addSourceDirs>
<!-- OWASP (Default to Critical) -->
<!-- Check every 12 hours (default is 4) -->
<cveValidForHours>12</cveValidForHours>
<!-- Min cvss score to fail on. Range 0-10 : LOW: 0-3.9, MEDIUM: 4-6.9, HIGH: 7.0-8.9, Critical: 9.0-10.0 (Default is 11 which means it never fails) -->
<failBuildOnCVSS>9</failBuildOnCVSS>
<!-- If set, owasp uses the proxy id in maven settings to download its db. -->
<mavenSettingsProxyId />
<!-- Disable analyzers -->
<!-- Disable retirejs analyzer -->
<retireJsAnalyzerEnabled>false</retireJsAnalyzerEnabled>
<!-- Disable swift analyzer -->
<swiftPackageManagerAnalyzerEnabled>false</swiftPackageManagerAnalyzerEnabled>
<!-- Disbale .net analyzers -->
<nuspecAnalyzerEnabled>false</nuspecAnalyzerEnabled>
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
<!-- Versions -->
<bt.junit.version>5.11.0</bt.junit.version>
<bt.jacoco.plugin.version>0.8.12</bt.jacoco.plugin.version>
<bt.surefire.plugin.version>3.5.0</bt.surefire.plugin.version>
<bt.checkstyle.plugin.version>3.5.0</bt.checkstyle.plugin.version>
<!-- Checkstyle 10.X requires JDK 11 -->
<bt.checkstyle.version>9.3</bt.checkstyle.version>
<bt.pmd.plugin.version>3.25.0</bt.pmd.plugin.version>
<bt.pmd.version>7.5.0</bt.pmd.version>
<bt.spotbugs.plugin.version>4.8.6.3</bt.spotbugs.plugin.version>
<bt.sb-contrib.plugin.version>7.6.4</bt.sb-contrib.plugin.version>
<bt.spotbugs.version>4.8.6</bt.spotbugs.version>
<bt.findsecbugs.plugin.version>1.13.0</bt.findsecbugs.plugin.version>
<bt.owasp.plugin.version>10.0.4</bt.owasp.plugin.version>
<bt.versions.plugin>2.17.1</bt.versions.plugin>
</properties>
<description>
Quality assurance configuration for BorderTech java projects.
Note that projects inheriting from this POM also inherit the release
configuration from bordertech-parent.
</description>
<profiles>
<!-- Quick build profile with testing and QA turned off -->
<profile>
<id>quick-build</id>
<properties>
<!-- Skip tests -->
<skipTests>true</skipTests>
<jacoco.skip>true</jacoco.skip>
<!-- Skip QA -->
<bt.qa.skip>true</bt.qa.skip>
<!-- Skip each plugin individually to handle projects that have set bt.qa.skip to false -->
<checkstyle.skip>true</checkstyle.skip>
<pmd.skip>true</pmd.skip>
<cpd.skip>true</cpd.skip>
<spotbugs.skip>true</spotbugs.skip>
<!-- Skip OWASP -->
<dependency-check.skip>true</dependency-check.skip>
<!-- Skip convergence check -->
<bt.convergence.check.skip>true</bt.convergence.check.skip>
<!-- Skip javadoc -->
<maven.javadoc.skip>true</maven.javadoc.skip>
</properties>
</profile>
<!-- Profile to display new dependency versions in the build console. -->
<!-- The versions plugin doesnot honor skip property on the display goals. As this can be an expensive process and cannot be skipped it is not included by default. -->
<profile>
<id>display-versions</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${bt.versions.plugin}</version>
<executions>
<execution>
<id>display-version-updates</id>
<phase>validate</phase>
<goals>
<goal>display-dependency-updates</goal>
<goal>display-parent-updates</goal>
<goal>display-plugin-updates</goal>
<goal>display-property-updates</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencyManagement>
<dependencies>
<!-- Junit 5 -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${bt.junit.version}</version>
<scope>test</scope>
</dependency>
<!-- Junit 5 support for Junit 4 -->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
<version>${bt.junit.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<!-- Surefire -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${bt.surefire.plugin.version}</version>
</plugin>
<!-- Code coverage. -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${bt.jacoco.plugin.version}</version>
<executions>
<!-- Prepare Jacoco agent. -->
<execution>
<id>jacoco-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<!-- Jacoco Coverage Report -->
<!-- As this is bound to the same phase as surefire but needs to run after surefire it must be defined after the surefire plugin. -->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Verify: Check the code style. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${bt.checkstyle.plugin.version}</version>
<configuration>
<sourceDirectories>
<sourceDirectory>${bt.checkstyle.src}</sourceDirectory>
</sourceDirectories>
</configuration>
<dependencies>
<!-- Latest checkstyle version -->
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${bt.checkstyle.version}</version>
</dependency>
<!-- Bordertech config -->
<dependency>
<groupId>com.github.bordertech.common</groupId>
<artifactId>build-tools</artifactId>
<version>1.0.22-SNAPSHOT</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>checkStyle</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Verify: PMD and CPD Check. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${bt.pmd.plugin.version}</version>
<configuration>
<rulesets>
<ruleset>${bt.pmd.rules.file}</ruleset>
</rulesets>
<compileSourceRoots>${bt.pmd.src}</compileSourceRoots>
</configuration>
<dependencies>
<!-- Latest pmd version -->
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>${bt.pmd.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>${bt.pmd.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-javascript</artifactId>
<version>${bt.pmd.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-jsp</artifactId>
<version>${bt.pmd.version}</version>
</dependency>
<!-- Bordertech config -->
<dependency>
<groupId>com.github.bordertech.common</groupId>
<artifactId>build-tools</artifactId>
<version>1.0.22-SNAPSHOT</version>
</dependency>
</dependencies>
<executions>
<!-- PMD -->
<execution>
<id>checkPmd</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
<!-- CPD (Warning only) -->
<execution>
<id>checkCpd</id>
<phase>verify</phase>
<goals>
<goal>cpd-check</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Verify: Spotbugs check (new findbugs). -->
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${bt.spotbugs.plugin.version}</version>
<configuration>
<plugins>
<!-- Auxilary plugin -->
<plugin>
<groupId>com.mebigfatguy.sb-contrib</groupId>
<artifactId>sb-contrib</artifactId>
<version>${bt.sb-contrib.plugin.version}</version>
</plugin>
<!-- Security plugin -->
<plugin>
<groupId>com.h3xstream.findsecbugs</groupId>
<artifactId>findsecbugs-plugin</artifactId>
<version>${bt.findsecbugs.plugin.version}</version>
</plugin>
</plugins>
</configuration>
<executions>
<execution>
<id>checkSpotBugs</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<dependencies>
<!-- Latest spotbugs version -->
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>${bt.spotbugs.version}</version>
</dependency>
<!-- Bordertech config. -->
<dependency>
<groupId>com.github.bordertech.common</groupId>
<artifactId>build-tools</artifactId>
<version>1.0.22-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
<!-- Verify: OWASP dependency vulnerability scanner. -->
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>${bt.owasp.plugin.version}</version>
<executions>
<execution>
<id>checkDependencies</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Verify: Enforcer check for Dependency Convergence -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>enforcer-convergence-check</id>
<phase>verify</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<dependencyConvergence />
</rules>
<!-- Use a different skip and fail property to not override the enforcer plugin in bordertech_parent. -->
<skip>${bt.convergence.check.skip}</skip>
<fail>${bt.convergence.check.fail}</fail>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>