-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpom.xml
More file actions
378 lines (346 loc) · 14.4 KB
/
Copy pathpom.xml
File metadata and controls
378 lines (346 loc) · 14.4 KB
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
<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>com.github.onsdigital</groupId>
<artifactId>babbage</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Babbage</name>
<description>Backend of the ONS website</description>
<url>https://www.ons.gov.uk/</url>
<properties>
<java.version>1.8</java.version>
<!-- If moving beyond version 4.2.1 there is a dependency on handlebars-humanize that
must be resolved -->
<handlebars-java-version>4.2.1</handlebars-java-version>
<handlebars-markdown-java-version>4.2.0</handlebars-markdown-java-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<dp-logging.version>v2.0.0-beta.18</dp-logging.version>
<fasterxml.jackson.version>2.21.4</fasterxml.jackson.version>
<flying-saucer.version>9.4.1</flying-saucer.version>
<mockito.version>3.12.4</mockito.version>
<restolino.version>v0.8.3</restolino.version>
<httpcomponents.version>5.6.2</httpcomponents.version>
</properties>
<dependencyManagement>
<dependencies>
<!-- Import the Jackson BOM to manage versions of Jackson dependencies as they move
at different rates - e.g. jackson-annotations does not have a 2.21.4 -->
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${fasterxml.jackson.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>4.13.1</version>
</dependency>
<!-- Prometheus client libraries -->
<!-- Exposition HTTPServer-->
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_httpserver</artifactId>
<version>0.16.0</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>com.github.onsdigital</groupId>
<artifactId>dp-logging</artifactId>
<version>${dp-logging.version}</version>
</dependency>
<!-- Prototyping framework -->
<dependency>
<groupId>com.github.onsdigital</groupId>
<artifactId>restolino</artifactId>
<version>${restolino.version}</version>
</dependency>
<dependency>
<groupId>com.github.davidcarboni</groupId>
<artifactId>resource-utils</artifactId>
<version>1.2.2</version>
</dependency>
<!-- PDF Generation -->
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.1.4</version>
</dependency>
<!-- Handlebars Java-->
<dependency>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars</artifactId>
<version>${handlebars-java-version}</version>
</dependency>
<dependency>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars-markdown</artifactId>
<version>${handlebars-markdown-java-version}</version>
</dependency>
<dependency>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars-humanize</artifactId>
<version>${handlebars-java-version}</version>
</dependency>
<dependency>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars-helpers</artifactId>
<version>${handlebars-java-version}</version>
</dependency>
<dependency>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars-jackson2</artifactId>
<version>${handlebars-java-version}</version>
</dependency>
<!--Handlebars Java markdown uses a newer version of pegdown with a peculiar bug, overwriting dependency explicitly-->
<!-- Warning - we overwrite the rendering for MailLinkNodes to stop obfuscation and so upgrading this dependency should bear this in mind -->
<dependency>
<groupId>org.pegdown</groupId>
<artifactId>pegdown</artifactId>
<version>1.4.2</version>
</dependency>
<!-- Cryptography -->
<dependency>
<groupId>com.github.onsdigital</groupId>
<artifactId>dp-cryptolite-java</artifactId>
<version>1.9.0</version>
</dependency>
<!-- Commons -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<!-- Ical4j-->
<dependency>
<groupId>org.mnode.ical4j</groupId>
<artifactId>ical4j</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-core</artifactId>
<version>${flying-saucer.version}</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf</artifactId>
<version>${flying-saucer.version}</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.17.2</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5</artifactId>
<version>5.4.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>${httpcomponents.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5-cache</artifactId>
<version>${httpcomponents.version}</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.10.2</version>
</dependency>
<!-- JWTs for signed URLs -->
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.19.4</version>
</dependency>
<!-- Fasterxml Jackson dependencies - overrides vulnerable transitive dependencies
and declared explicitly to resolve conflicts in handlebars -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-smile</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-cbor</artifactId>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.30</version>
</dependency>
<!-- OpenTelemetry-->
<dependency>
<groupId>software.amazon.opentelemetry</groupId>
<artifactId>aws-opentelemetry-agent</artifactId>
<version>1.32.0</version>
</dependency>
</dependencies>
<build>
<resources>
<!-- Standard resources -->
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
<!-- Generated contents-->
<resource>
<directory>${basedir}/src/main/content</directory>
<targetPath>${project.build.directory}/content</targetPath>
</resource>
<!-- Copy Sixteens to both source (for development) and target (for deployment) -->
<resource>
<directory>${basedir}/src/main/web/node_modules/sixteens/dist</directory>
<targetPath>${basedir}/src/main/web/assets</targetPath>
</resource>
<resource>
<directory>${basedir}/src/main/web/node_modules/sixteens/dist</directory>
<targetPath>${project.build.directory}/web/assets</targetPath>
</resource>
<!-- Filter out node_modules for deployment -->
<resource>
<directory>src/main/web</directory>
<targetPath>${project.build.directory}/web</targetPath>
<excludes>
<exclude>node_modules/**</exclude>
</excludes>
</resource>
</resources>
<plugins>
<!-- Needs Java 1.8 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- A folder of dependencies is used in development when reloading classes: -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<!-- Default output folder is ${project.build.api}/dependency -->
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.ossindex.maven</groupId>
<artifactId>ossindex-maven-plugin</artifactId>
<version>3.2.0</version>
<!-- configuration for mvn ossindex:audit -->
<configuration>
<authId>ossindex</authId>
<!-- if CVSS >= 7.0 (critical) then ERROR else WARN -->
<fail>true</fail>
<cvssScoreThreshold>7.0</cvssScoreThreshold>
<excludeCoordinates>
<!--
Jira Ticket to resolve: DIS-3662
This is to exclude vulnerability CVE-2023-2976
-->
<exclude>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>23.0</version>
</exclude>
<!-- End exclusion for DIS-3662 -->
</excludeCoordinates>
<excludeVulnerabilityIds>
<!-- Note - OSS Index suppressions are global, not per dependency -->
<!--
Jira epic to remove the following exclusion: DIS-4777
-->
<exclude>CVE-2026-2332</exclude>
<!-- End DIS-4777 -->
<!-- DIS-5047 -->
<exclude>CVE-2026-55760</exclude>
<!-- End DIS-5047 -->
<!--
CVE covers logback-classic v1.3.16
Epic to remove this exclusion: DIS-5085
-->
<exclude>CVE-2026-13006</exclude>
</excludeVulnerabilityIds>
</configuration>
<executions>
<execution>
<id>audit-dependencies-critical</id>
<phase>validate</phase>
<goals>
<goal>audit</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<!-- Adding maven central repo explicitly to prevent jitpack.io resolving artifacts that are already on Github. Otherwise handlebars-java fails -->
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
<!--Jitpack io allows us include projects and libraries available on github but not built and published to maven central-->
<!-- It is used for including internal project modules. See more on https://jitpack.io/-->
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
</project>