-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
376 lines (371 loc) · 17 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
<?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">
<!-- Project Configuration -->
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.1</version>
<relativePath/>
</parent>
<!-- Project Info -->
<groupId>org.rucca</groupId>
<artifactId>cheese</artifactId>
<version>0.9.2</version>
<name>backend</name>
<description>Backend for Cheese Web Application</description>
<url/>
<licenses>
<license/>
</licenses>
<developers>
<developer/>
</developers>
<scm>
<connection/>
<developerConnection/>
<tag/>
<url/>
</scm>
<properties>
<java.version>21</java.version>
<kotlin.version>2.1.0</kotlin.version>
</properties>
<!-- Project Dependencies -->
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<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>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.2.27</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-models</artifactId>
<version>2.2.27</version>
</dependency>
<dependency>
<groupId>com.ninja-squad</groupId>
<artifactId>springmockk</artifactId>
<version>4.0.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>at.favre.lib</groupId>
<artifactId>bcrypt</artifactId>
<version>0.10.2</version>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>4.4.0</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>3.1.9</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>3.1.9</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>3.1.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>3.1.9</version>
</dependency>
<dependency>
<groupId>org.parboiled</groupId>
<artifactId>parboiled-java</artifactId>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.7.1</version>
</dependency>
</dependencies>
<!-- Build Configuration -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<configuration>
<args>
<arg>-Xjsr305=strict</arg>
</args>
<compilerPlugins>
<plugin>spring</plugin>
<plugin>jpa</plugin>
</compilerPlugins>
</configuration>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-allopen</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-noarg</artifactId>
<version>2.1.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>7.10.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>./design/API/NT-API.yml</inputSpec>
<generatorName>kotlin-spring</generatorName>
<skipIfSpecIsUnchanged>true</skipIfSpecIsUnchanged>
<modelNameSuffix>DTO</modelNameSuffix>
<configOptions>
<java8>true</java8>
<interfaceOnly>true</interfaceOnly>
<modelPackage>org.rucca.cheese.model</modelPackage>
<apiPackage>org.rucca.cheese.api</apiPackage>
<useBeanValidation>true</useBeanValidation>
<exceptionHandler>false</exceptionHandler>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>delete-create-sql</id>
<goals>
<goal>run</goal>
</goals>
<phase>package</phase>
<configuration>
<target>
<!-- Delete the old CREATE.sql file and create a new one. -->
<delete file="design/DB/CREATE.sql"/>
<echo append="true" file="design/DB/CREATE.sql">---------------------------------------------------------------------------${line.separator}</echo>
<echo append="true" file="design/DB/CREATE.sql">-- DO NOT MODIFY THIS FILE --${line.separator}</echo>
<echo append="true" file="design/DB/CREATE.sql">-- --${line.separator}</echo>
<echo append="true" file="design/DB/CREATE.sql">-- The following content is generated by JPA according to entity classes --${line.separator}</echo>
<echo append="true" file="design/DB/CREATE.sql">---------------------------------------------------------------------------${line.separator}</echo>
<java failonerror="true" fork="true" jar="target/${project.build.finalName}.jar">
<!-- Disable web application type to avoid port conflict. -->
<arg value="--spring.main.web-application-type=NONE"/>
<!-- See: https://www.datanucleus.org/products/accessplatform_6_0/jakarta/persistence.html#schema-generation -->
<arg value="--spring.jpa.properties.jakarta.persistence.schema-generation.scripts.action=create"/>
<arg value="--spring.jpa.properties.jakarta.persistence.schema-generation.scripts.create-target=design/DB/CREATE.sql"/>
<arg value="--spring.jpa.properties.jakarta.persistence.schema-generation.scripts.create-source=metadata"/>
<!-- Stop application after creating the CREATE.sql file. -->
<arg value="--application.shutdown-on-startup=true"/>
<!-- Avoid long logs -->
<arg value="--logging.level.root=WARN"/>
</java>
</target>
</configuration>
</execution>
<execution>
<id>copy-generated-api</id>
<goals>
<goal>run</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<target>
<!-- Copy the generated API files to the correct package. -->
<delete dir="src/main/kotlin/org/rucca/cheese/api"/>
<delete dir="src/main/kotlin/org/rucca/cheese/model"/>
<copy todir="src/main/kotlin/org/rucca/cheese/api">
<fileset dir="target/generated-sources/openapi/src/main/kotlin/org/rucca/cheese/api"/>
</copy>
<copy todir="src/main/kotlin/org/rucca/cheese/model">
<fileset dir="target/generated-sources/openapi/src/main/kotlin/org/rucca/cheese/model"/>
</copy>
<delete file="src/main/kotlin/org/rucca/cheese/model/000_IMPORTANT_NOTICE.md"/>
<echo append="true" file="src/main/kotlin/org/rucca/cheese/model/000_IMPORTANT_NOTICE.md"># All files in this directory are generated!${line.separator}${line.separator}</echo>
<echo append="true" file="src/main/kotlin/org/rucca/cheese/model/000_IMPORTANT_NOTICE.md">All files in this directory are generated, including this markdown, so DO NOT MODIFY them!${line.separator}${line.separator}</echo>
<echo append="true" file="src/main/kotlin/org/rucca/cheese/model/000_IMPORTANT_NOTICE.md">If you want to modify the API, modify the OpenAPI specification file and run ```./mvnw install``` again.${line.separator}${line.separator}</echo>
<copy file="src/main/kotlin/org/rucca/cheese/model/000_IMPORTANT_NOTICE.md" todir="src/main/kotlin/org/rucca/cheese/api"/>
<delete dir="target/generated-sources/openapi"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
<configuration>
<systemPropertyVariables>
<spring.jpa.hibernate.ddl-auto>update</spring.jpa.hibernate.ddl-auto>
<spring.jpa.show-sql>false</spring.jpa.show-sql>
<application.warn-audit-failure>false</application.warn-audit-failure>
<logging.level.root>WARN</logging.level.root>
</systemPropertyVariables>
<argLine>${argLine} -XX:+EnableDynamicAgentLoading</argLine>
</configuration>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<configuration>
<java>
<googleJavaFormat/>
</java>
<kotlin>
<ktfmt>
<style>KOTLINLANG</style>
</ktfmt>
</kotlin>
<pom>
<sortPom>
<nrOfIndentSpace>4</nrOfIndentSpace>
<expandEmptyElements>false</expandEmptyElements>
</sortPom>
</pom>
<sql>
<includes>
<include>design/DB/CREATE.sql</include>
</includes>
<dbeaver/>
</sql>
<markdown>
<includes>
<include>**/*.md</include>
</includes>
</markdown>
</configuration>
<executions>
<execution>
<id>Format generated sources</id>
<goals>
<goal>apply</goal>
</goals>
<phase>generate-sources</phase>
</execution>
<execution>
<id>Format design/DB/CREATE.sql</id>
<goals>
<goal>apply</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
</build>
</project>