-
Notifications
You must be signed in to change notification settings - Fork 1
/
pom.xml
670 lines (608 loc) · 30.9 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
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
<?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>dk.statsbiblioteket.sbprojects</groupId>
<artifactId>sbprojects-parent</artifactId>
<version>80</version>
</parent>
<groupId>dk.kb.datahandler</groupId>
<artifactId>ds-datahandler</artifactId>
<version>1.10.2-SNAPSHOT</version>
<packaging>war</packaging>
<description>
# Ds-datahandler(Digitale Samlinger) by the Royal Danish Library.
## Notice
OAI-PMH harvest is just the first implementation feature in ds-datahandler. More features will implemented later.
## OAI harvest
Ds-datahandler can harvest OAI from different OAI-PMH targets and ingest the metadata for the records into ds-storage.
Having the metadata in ds-storage makes access much easier and faster for other applications. The metadata for each
record will be UTF-8 encoded before ingested into ds-storage. Invalid XML encoding characters will be replaced or removed.
## OAI targets configuration
The project yaml-file contains the configuration for each OAI-PMH target.
**The below table describes the parameters to configure a OAI-PMH target**
| Property | Description |
| ---------------- | ----------------------------------------------------------------------------------------------------------|
| name | The name used to specify when starting a new import |
| url | The base url to OAI-PMH service |
| set | Parameter to the OAI-server if the server has multiple collections (optional) |
| metadataPrefix | Parameter to the OAI-server to specify the format for the metadata. Options depend on the OAI target. |
| user | User if the OAI-server require basic authentication (optional) |
| password | Password if the OAI-server require basic authentication (optional) |
| origin | The origin when sending records from this OAI target to ds-storage. |
| | The origin must be configured in DS-storage. ID will be {origin}:{id in OAI record} |
| description | Human text to give further description if needed |
## Full import and delta import
For each OAI target configured you can request a full import or a delta import from the OAI collection. A full import will
harvest all records from to OAI target. A delta import will only import records with a datestamp later than the last record
recieved in either an earlier full import or delta import.
## Storing last harvest datestamp
The yaml property file specificed a folder on the filesystem to store the last datestamps for each OAI target.
The file will only contain a single with an UTC timestamp identical to the last record successfully send ds-storage from
that OAI target.
## Configure the yaml property file
Besides all the OAI targets it must also definere the property for the folder to store the datestamps. Also the
properties host,port,baseurl to the ds-storage server to submit the records to.
## More about the OAI-PMH protocol
See: http://www.openarchives.org/OAI/openarchivesprotocol.html
</description>
<repositories>
<repository>
<id>sbforge-nexus</id>
<url>https://sbforge.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<scm>
<url>https://github.com/kb-dk/ds-datahandler</url>
<connection>scm:git:[email protected]:kb-dk/ds-datahandler.git</connection>
<developerConnection>scm:git:[email protected]:kb-dk/ds-datahandler.git</developerConnection>
<tag>HEAD</tag>
</scm>
<licenses>
<!--SBForge stuff should have a license-->
<license>
<name>${license.name}</name>
<url>${license.url}</url>
</license>
</licenses>
<properties>
<!-- Specify java version here, to support forbiddenapis plugin -->
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- Enable forbiddenapis plugin, do disable set to none -->
<api.check.phase>process-test-classes</api.check.phase>
<!--Specify the licenses here, so they can be picked up by openAPI-->
<license.name>Apache License, Version 2.0</license.name>
<license.url>https://www.apache.org/licenses/LICENSE-2.0.txt</license.url>
<timestamp>${maven.build.timestamp}</timestamp>
<project.package>dk.kb.datahandler</project.package>
</properties>
<dependencies>
<dependency>
<groupId>dk.kb.util</groupId>
<artifactId>kb-util</artifactId>
<version>1.5.11</version>
<exclusions>
<exclusion>
<!-- kb-util has 2.3.3, but transitive resolving has 2.4.0 somewhere-->
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Client for ds-storage This will also require the org.openapitools dependency-->
<dependency>
<groupId>dk.kb.storage</groupId>
<artifactId>ds-storage</artifactId>
<version>2.1.1</version>
<type>jar</type>
<classifier>classes</classifier>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Client for ds-storage This will also require the org.openapitools dependency-->
<dependency>
<groupId>dk.kb.present</groupId>
<artifactId>ds-present</artifactId>
<version>2.0.0</version>
<type>jar</type>
<classifier>classes</classifier>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>dk.kb.kaltura</groupId>
<artifactId>ds-kaltura</artifactId>
<version>1.2.5</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>4.0.2</version>
<scope>provided</scope>
</dependency>
<!-- Apache CXF and servlet stuff -->
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<!-- Latest version is 4.0.3. Not tested -->
<version>3.6.2</version>
<!--<version>3.4.0</version>-->
<scope>runtime</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.xml.ws/jaxws-api -->
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>2.16.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.openapitools/jackson-databind-nullable
Used for OpenAPI client generation -->
<!-- https://mvnrepository.com/artifact/org.openapitools/jackson-databind-nullable -->
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>0.2.2</version>
</dependency>
<!-- To get client generation to work -->
<!-- https://mvnrepository.com/artifact/org.openapitools/openapi-generator -->
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator</artifactId>
<version>7.1.0</version>
<exclusions>
<exclusion>
<!-- The slf4j-simple logs to stderr and stdout, ignoring logback.xml -->
<artifactId>slf4j-simple</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<!-- Latest version is 4.0.3. Not tested -->
<version>3.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-service-description</artifactId>
<!-- Latest version is 4.0.3. Not tested -->
<version>3.6.2</version>
</dependency>
<dependency>
<!--For the openapi endpoint /openapi.json-->
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-service-description-openapi-v3</artifactId>
<!-- Latest version is 4.0.3. Not tested -->
<version>3.6.2</version>
</dependency>
<dependency>
<!--For the swagger UI endpoint /api-docs?url=openapi.json-->
<groupId>org.webjars</groupId>
<artifactId>swagger-ui</artifactId>
<version>5.9.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.2.3</version>
</dependency>
<!-- OAuth support -->
<!-- https://mvnrepository.com/artifact/org.keycloak/keycloak-core -->
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>24.0.1</version>
<exclusions>
<exclusion>
<!-- mockserver-junit-jupiter has 1.1, but transitive resolving has 1.2.2 somewhere-->
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- openapitools dependency -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
<version>1.5.23</version>
<exclusions>
<exclusion>
<artifactId>jsr311-api</artifactId>
<groupId>javax.ws.rs</groupId>
</exclusion>
<exclusion>
<!-- swagger-jaxrs has 1.1.0.Final, but transitive resolving has 2.0.2 somewhere-->
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>10.6</version>
</dependency>
<!-- To get date parsing to work? -->
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-modules-java8 -->
<!-- <dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-modules-java8</artifactId>
<version>2.13.1</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>-->
<!-- Logging dependencies -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.11</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.14</version>
</dependency>
<!-- Unit test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mockito/mockito-junit-jupiter -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mock-server/mockserver-junit-jupiter -->
<dependency>
<groupId>org.mock-server</groupId>
<artifactId>mockserver-junit-jupiter</artifactId>
<version>5.15.0</version>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>9.6.1</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/openapi</directory>
<filtering>true</filtering>
</resource>
<!-- Needed as specifying <resources> overrides all previous definitions -->
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
<!-- 2: Copy only build.properties with filtering -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>ds-datahandler.build.properties</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<!--This ensures that the openapi_*.yaml have been filtered and copied to target/classes
BEFORE being used by the openapi generator above-->
<phase>generate-sources</phase>
<!--as both the openapi codegen and this execution happens at phase generate-sources, ensure
this happens first by having this placed above codegen in the pom-->
<goals>
<goal>resources</goal>
</goals>
</execution>
<execution>
<id>copy-resources</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/jetty-res</outputDirectory>
<resources>
<resource>
<directory>src/test/jetty</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>4.2.2</version>
<!-- Running this gives
[WARNING] The value (generator's option) must be either boolean or string. Default to `false`.
which seems to be an unresolved issue: https://github.com/OpenAPITools/openapi-generator/issues/9008 -->
<configuration>
<!-- https://openapi-generator.tech/docs/generators/java/ -->
<generatorName>jaxrs-cxf-extended</generatorName>
<inputSpec>${project.build.outputDirectory}/openapi.yaml</inputSpec><!-- Will always be overridden -->
<modelNameSuffix>Dto</modelNameSuffix>
<generateSupportingFiles>false</generateSupportingFiles>
<generateApiTests>false</generateApiTests>
<generateModelDocumentation>true</generateModelDocumentation>
<generateApis>true</generateApis>
<output>${project.basedir}</output>
<templateDirectory>src/main/templates/</templateDirectory>
<configOptions>
<withXml>true</withXml> <!-- Needed for XML serialization support in the Model -->
<!--https://openapi-generator.tech/docs/generators/jaxrs-cxf-extended/-->
<!-- https://openapi-generator.tech/docs/generators/java/ -->
<sourceFolder>target/generated-sources</sourceFolder>
<useSwaggerFeature>true</useSwaggerFeature>
<useSwaggerUI>true</useSwaggerUI>
<apiPackage>${project.package}.api</apiPackage>
<modelPackage>${project.package}.model</modelPackage>
<!-- https://openapi-generator.tech/docs/generators/java/ -->
<!--<dateLibrary>threetenbp</dateLibrary>-->
<!--<dateLibrary>Java11</dateLibrary>-->
<implFolder>src/main/java</implFolder>
<invokerPackage>${project.package}</invokerPackage>
</configOptions>
<packageName>${project.package}</packageName>
</configuration>
<executions>
<!-- Version 1 -->
<!-- When a new version is needed, make a copy of two v1-related executions below, then change
v1 to v2 in the copy.
Go to plugin.configuration.webResources.resource.includes in this pom.xml and extend the list
with v2 versions of the JSON & YAML files.
Also remember to:
* Create dk.kb.datahandler.webservice.Application_v2
* Create src/main/openapi/openapi_v2.yaml
* Update src/main/webapp/WEB-INF/web.xml
* Update src/main/webapp/api/index.html
-->
<execution>
<!-- Generate API and Model-files from the OpenAPI specification (positioned under the target/generated-sources/ folder).
These files are overwritten on all builds, so they should never be edited manually. -->
<id>v1: generate api classes</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.build.outputDirectory}/ds-datahandler-openapi_v1.yaml</inputSpec>
<ignoreFileOverride>
${project.basedir}/.openapi-codegen-ignore-api
</ignoreFileOverride>
<configOptions>
<apiPackage>${project.package}.api.v1</apiPackage>
<modelPackage>${project.package}.model.v1</modelPackage>
<!-- Setting this to true overwrites existing implementations.
Only set it temporarily when creating a new project -->
<generateOperationBody>false</generateOperationBody>
<sourceFolder>target/generated-sources</sourceFolder>
</configOptions>
</configuration>
</execution>
<execution>
<!-- The purpose it to generate skeleton implementation classes, if such classes are not already existing.
Since we always want to overwrite existing api & model-files when the OpenAPI specification is changed,
but never want to overwrite existing implementation-files, we need to do the generation in 2 steps. -->
<id>v1: generate skeleton impl</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.build.outputDirectory}/ds-datahandler-openapi_v1.yaml</inputSpec>
<ignoreFileOverride>
${project.basedir}/.openapi-codegen-ignore-impl
</ignoreFileOverride>
<configOptions>
<apiPackage>${project.package}.api.v1</apiPackage>
<modelPackage>${project.package}.model.v1</modelPackage>
<generateOperationBody>true</generateOperationBody>
</configOptions>
<skipOverwrite>true</skipOverwrite>
</configuration>
</execution>
<!-- Client for the backend -->
<execution>
<id>Generate client for JAR package and use by other services</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.build.outputDirectory}/ds-datahandler-openapi_v1.yaml</inputSpec>
<ignoreFileOverride>${project.basedir}/.openapi-codegen-ignore-api</ignoreFileOverride>
<generatorName>java</generatorName>
<library>native</library>
<!-- Do not generate doc or tests for this client, we will handle this ourselves-->
<generateApis>true</generateApis>
<generateApiTests>false</generateApiTests>
<generateApiDocumentation>false</generateApiDocumentation>
<generateModels>false</generateModels>
<generateModelTests>false</generateModelTests>
<generateModelDocumentation>false</generateModelDocumentation>
<!-- Ensure ONLY the ApiClient and supporting classes are created, not the gradle mess-->
<generateSupportingFiles>true</generateSupportingFiles>
<supportingFilesToGenerate>ApiClient.java,ApiException.java,Configuration.java,Pair.java</supportingFilesToGenerate>
<!-- Do NOT use the customised templates as they are only for the webservice part, not the client-->
<!-- Hacked by Asger by setting to an existing folder without templates -->
<templateDirectory>src/main/</templateDirectory>
<configOptions>
<apiPackage>${project.package}.client.v1</apiPackage>
<modelPackage>${project.package}.model.v1</modelPackage>
<invokerPackage>${project.package}.invoker.v1</invokerPackage>
<sourceFolder>target/generated-sources</sourceFolder>
<implFolder>target/generated-sources</implFolder>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<!-- The generated classes for the OpenAPI client are problematic. Disable checking of those for now -->
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
<!-- No version or configuration here as it inherits from parent pom -->
<configuration>
<excludes>
<exclude>**/DsDatahandlerApi.class</exclude>
<exclude>**/ServiceApi.class</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>src/main/webapp/WEB-INF/web.xml</webXml>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
<!--This is really just to get an artifact containing ds-datahandler-openapi_v1.yaml-->
<attachClasses>true</attachClasses>
<!--Enable maven filtering for the web.xml-->
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<webResources>
<webResource> <!-- Store application name, version and build time -->
<directory>${basedir}/src/main/resources/</directory>
<includes>
<include>ds-datahandler.build.properties</include>
</includes>
<filtering>true</filtering>
</webResource>
<resource>
<!--Include the openapi spec files so we can serve them-->
<directory>${project.build.outputDirectory}</directory>
<targetPath>.</targetPath>
<includes>
<include>ds-datahandler-openapi_v1.json</include>
<include>ds-datahandler-openapi_v1.yaml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<!-- Used only for mvn jetty:run jetty:run-war -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>10.0.12</version>
<configuration>
<deployMode>FORK</deployMode>
<jvmArgs>-Xmx1g -Djetty.port=9071</jvmArgs>
<jettyXmls>${project.basedir}/target/jetty-res/jetty-env.xml</jettyXmls>
<useTestScope>true</useTestScope>
<!-- https://www.eclipse.org/jetty/documentation/jetty-10/programming-guide/index.html#jetty-run-goal -->
<!-- https://stackoverflow.com/questions/12493798/jetty-maven-plugin-using-scan -->
<scan>2</scan>
<webApp>
<contextPath>/${project.artifactId}/</contextPath>
<descriptor>${project.basedir}/target/${project.build.finalName}/WEB-INF/web.xml</descriptor>
<jettyEnvXml>${project.basedir}/target/jetty-res/jetty-env.xml</jettyEnvXml>
</webApp>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<tarLongFileMode>posix</tarLongFileMode>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<!-- Plugin used to extract information on the current git setup.
See: https://github.com/git-commit-id/git-commit-id-maven-plugin -->
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<version>7.0.0</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
<configuration>
<includeOnlyProperties>
<includeOnlyProperty>git.commit.id</includeOnlyProperty>
<includeOnlyProperty>git.branch</includeOnlyProperty>
<includeOnlyProperty>git.closest.tag.name</includeOnlyProperty>
<includeOnlyProperty>git.commit.author.time</includeOnlyProperty>
</includeOnlyProperties>
</configuration>
</plugin>
</plugins>
</build>
</project>