Repository navigation
Expand file tree
/
Copy pathpom.xml
More file actions
331 lines (311 loc) · 15.1 KB
/
Copy pathpom.xml
File metadata and controls
331 lines (311 loc) · 15.1 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
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mobilitydata.gtfs-validator</groupId>
<artifactId>gtfs-validator-api</artifactId>
<!-- API project version is independent of the validator core version.
This is a placeholder: the real version is derived from git at build
time by maven-git-versioning-extension (see .mvn/). A `vX.Y.Z` tag
yields version X.Y.Z; any other build yields a patch-bumped SNAPSHOT
of the latest tag (e.g. `1.0.1-SNAPSHOT` after `v1.0.0`). This file
is never edited for a release. -->
<version>0.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>gtfs-validator-api</name>
<description>Spring Boot HTTP API for the MobilityData Canonical GTFS Schedule Validator.</description>
<url>https://github.com/MobilityData/gtfs-validator-api</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>MobilityData</name>
<email>developers@mobilitydata.org</email>
<organization>MobilityData</organization>
<organizationUrl>https://mobilitydata.org/</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:ssh://git@github.com/MobilityData/gtfs-validator-api.git</connection>
<developerConnection>scm:git:ssh://git@github.com/MobilityData/gtfs-validator-api.git</developerConnection>
<url>https://github.com/MobilityData/gtfs-validator-api.git</url>
<tag>HEAD</tag>
</scm>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-boot.version>4.1.0</spring-boot.version>
<openapi-generator-maven-plugin.version>7.23.0</openapi-generator-maven-plugin.version>
<spotless-maven-plugin.version>3.7.0</spotless-maven-plugin.version>
<google-java-format.version>1.25.2</google-java-format.version>
<springdoc.version>3.0.3</springdoc.version>
<swagger-annotations.version>2.2.51</swagger-annotations.version>
<jackson-databind-nullable.version>0.2.10</jackson-databind-nullable.version>
<jakarta-annotation.version>3.0.0</jakarta-annotation.version>
<!-- Validator core version is independent of this project's version.
Default is the stable release; Dependabot opens a PR to bump it once a
new release is on Maven Central. To build against a pre-release
SNAPSHOT instead, see the snapshot profile at the end of this file. -->
<gtfs-validator.version>8.0.1</gtfs-validator.version>
<!-- Patched versions overriding vulnerable validator transitive dependencies. -->
<guava.version>33.7.1-jre</guava.version>
<commons-compress.version>1.28.0</commons-compress.version>
<commons-beanutils.version>1.11.0</commons-beanutils.version>
<commons-validator.version>1.10.1</commons-validator.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Override vulnerable transitive dependencies brought in by the GTFS
validator core/model (runtime scope) with patched versions.
Remove individual overrides once a validator release ships them. -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>${commons-compress.version}</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>${commons-beanutils.version}</version>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>${commons-validator.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- OpenAPI UI / spec serving -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>${springdoc.version}</version>
</dependency>
<!-- Required by the generated spring server code -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations.version}</version>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable.version}</version>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta-annotation.version}</version>
</dependency>
<!-- GTFS validator core (published Maven artifacts). main pulls core + model. -->
<dependency>
<groupId>org.mobilitydata.gtfs-validator</groupId>
<artifactId>gtfs-validator-main</artifactId>
<version>${gtfs-validator.version}</version>
<exclusions>
<!-- commons-logging (via commons-validator) clashes with Spring's
spring-jcl and prints raw, non-JSON lines to the console. Exclude it
so spring-jcl supplies the JCL API and routes it through SLF4J/Logback
(and the structured JSON formatter under the json profile). -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- main declares core/model as runtime scope; we compile against them
(e.g. CountryCode in core), so declare them explicitly at compile scope. -->
<dependency>
<groupId>org.mobilitydata.gtfs-validator</groupId>
<artifactId>gtfs-validator-core</artifactId>
<version>${gtfs-validator.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mobilitydata.gtfs-validator</groupId>
<artifactId>gtfs-validator-model</artifactId>
<version>${gtfs-validator.version}</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Spring Boot 4 moved the Spring MVC test slice (@AutoConfigureMockMvc,
@WebMvcTest) into this dedicated module. -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-webmvc-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>17</release>
</configuration>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
<configuration>
<!-- Matches the gtfs-validator repo: google-java-format. -->
<java>
<googleJavaFormat>
<version>${google-java-format.version}</version>
</googleJavaFormat>
</java>
</configuration>
<executions>
<execution>
<id>spotless-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<!-- Serve the single source-of-truth spec (docs/) at /openapi.yaml by
copying it into the classpath static resources at build time.
The spec is never duplicated in the source tree. -->
<execution>
<id>copy-openapi-spec</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/static</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/docs</directory>
<includes>
<include>GTFSValidatorAPI.yaml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>${openapi-generator-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/docs/GTFSValidatorAPI.yaml</inputSpec>
<generatorName>spring</generatorName>
<output>${project.build.directory}/generated-sources/openapi</output>
<apiPackage>org.mobilitydata.gtfsvalidator.api.gen</apiPackage>
<modelPackage>org.mobilitydata.gtfsvalidator.api.model</modelPackage>
<invokerPackage>org.mobilitydata.gtfsvalidator.api.handler</invokerPackage>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<generateApiDocumentation>false</generateApiDocumentation>
<generateModelDocumentation>false</generateModelDocumentation>
<ignoreFileOverride>${project.basedir}/.openapi-generator-ignore</ignoreFileOverride>
<configOptions>
<delegatePattern>true</delegatePattern>
<interfaceOnly>false</interfaceOnly>
<skipDefaultInterface>false</skipDefaultInterface>
<dateLibrary>java8</dateLibrary>
<useSpringBoot3>true</useSpringBoot3>
<useTags>true</useTags>
<openApiNullable>true</openApiNullable>
<documentationProvider>none</documentationProvider>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!-- Opt-in profile to build against a pre-release SNAPSHOT of the GTFS
validator core instead of the stable default. It enables the Maven
Central snapshot repository (Maven only resolves *-SNAPSHOT from repos
that explicitly enable snapshots); the repo is public, no credentials
needed. The snapshot version is not pinned here, since it changes with
every validator release: pass the newest one on the command line:
mvn -Psnapshot -Dgtfs-validator.version=$(scripts/latest-validator-snapshot.sh) ... -->
<profile>
<id>snapshot</id>
<repositories>
<repository>
<id>central-snapshots</id>
<name>Maven Central Snapshots</name>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</project>