Repository navigation
Expand file tree
/
Copy pathpom.xml
More file actions
648 lines (628 loc) · 31.6 KB
/
Copy pathpom.xml
File metadata and controls
648 lines (628 loc) · 31.6 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
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
<?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"
child.project.url.inherit.append.path="false">
<modelVersion>4.0.0</modelVersion>
<!-- The coordinates ADR-0002 chose, under the namespace RESTest 1.x is published in on Maven
Central as es.us.isa:restest. The Java packages stay io.restest. ADR-0044. -->
<groupId>es.us.isa.restest</groupId>
<artifactId>restest</artifactId>
<version>2.5.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>RESTest</name>
<description>Black-box testing tool for REST APIs</description>
<!-- Every module's address too, and its <scm> below: the child.*.inherit.append.path attributes
on <project> and <scm> stop Maven adding the module's name to the end of each, which would
make the page Maven Central shows for restest-core link
https://github.com/isa-group/RESTest/restest-core, which does not exist. -->
<url>https://github.com/isa-group/RESTest</url>
<inceptionYear>2026</inceptionYear>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>ISA Research Group, Universidad de Sevilla</name>
<url>https://www.isa.us.es</url>
</organization>
<developers>
<developer>
<id>sergiosegura</id>
<name>Sergio Segura</name>
<email>sergiosegura@us.es</email>
<organization>Universidad de Sevilla</organization>
<roles><role>maintainer</role></roles>
</developer>
</developers>
<scm child.scm.connection.inherit.append.path="false"
child.scm.developerConnection.inherit.append.path="false"
child.scm.url.inherit.append.path="false">
<connection>scm:git:https://github.com/isa-group/RESTest.git</connection>
<developerConnection>scm:git:https://github.com/isa-group/RESTest.git</developerConnection>
<url>https://github.com/isa-group/RESTest</url>
<tag>HEAD</tag>
</scm>
<modules>
<module>restest-core</module>
<module>restest-spec</module>
<module>restest-gen</module>
<module>restest-exec</module>
<module>restest-store</module>
<module>restest-oracles</module>
<module>restest-report</module>
<module>restest-cli</module>
<!-- Verification only: not published, depends on all eight. See ADR-0004. -->
<module>restest-arch-tests</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Every module targets Java 21, restest-cli included (ADR-0003). -->
<maven.compiler.release>21</maven.compiler.release>
<!-- Versions fixed by the stack table in docs/DESIGN.md. -->
<junit.version>6.1.3</junit.version>
<assertj.version>3.27.7</assertj.version>
<archunit.version>1.5.0</archunit.version>
<jacoco.version>0.8.15</jacoco.version>
<picocli.version>4.7.7</picocli.version>
<testcontainers.version>2.0.5</testcontainers.version>
<swagger-parser.version>2.1.47</swagger-parser.version>
<!-- Arrives transitively through swagger-parser; pinned in its own right so a future
swagger-parser upgrade that changes it is a visible, reviewed version bump rather than
whatever Maven's dependency mediation happens to resolve (ADR-0007's own complaint about
RESTest 1.x's undeclared swagger-parser dependency, repeated one level down). -->
<snakeyaml.version>2.6</snakeyaml.version>
<!-- Same reasoning as snakeyaml below: restest-spec's own source writes the parsed document
back out with io.swagger.v3.core.util.Json, so the library that provides it is pinned
here rather than left to whatever swagger-parser happens to resolve. Must move with
swagger-parser: the two share the model classes they serialise. -->
<swagger-core.version>2.2.52</swagger-core.version>
<okhttp.version>5.5.0</okhttp.version>
<wiremock.version>3.13.2</wiremock.version>
<sqlite.version>3.50.3.0</sqlite.version>
<!-- Jackson 2, every module of it at one version. RESTest's own JSON reading uses its
jackson-core; swagger-parser and swagger-core bring jackson-databind and the YAML and
date modules, and WireMock, a test dependency, brings its own. Managed through Jackson's
BOM below rather than left to Maven's mediation, which picks the nearest path: in
restest-cli that was WireMock's, so a release carried an older jackson-databind than
the one swagger-core asks for. -->
<jackson.version>2.22.3</jackson.version>
<!-- Versioned separately from the rest of Jackson, shared by Jackson 2 and Jackson 3, and
pinned here for a reason found the hard way: the schema validator's own JSON library
needed 2.22 while another path through the tree asked for 2.20, and Maven's mediation
picked the nearer one. The result was a class missing at runtime in the one module that
has every other module on its class path. Both Jackson BOMs below name a version of it
now, and when two imported BOMs disagree the one written first wins without a word, so
it stays pinned: one written decision, which has to be the version both of them name.
Same reasoning as snakeyaml below; a worse failure, because it only shows up when
everything is assembled. -->
<jackson-annotations.version>2.22</jackson-annotations.version>
<json-schema-validator.version>3.0.7</json-schema-validator.version>
<!-- Jackson 3, a separate line under the tools.jackson group, which only the schema
validator brings in, and which reads every JSON reply it checks and the specification document.
Managed here, rather than left at whatever the validator asks for, so that a fix to it
is one line here and does not wait for a validator release: 3.0.7 asks for 3.2.1, which
has denial-of-service flaws fixed in 3.2.3. Each 3.x release names the
jackson-annotations it needs, and that has to stay the version pinned above. -->
<jackson3.version>3.2.3</jackson3.version>
<!-- Builds a string that matches a regular expression, which is what a specification's
`pattern` asks for. Carries no dependencies of its own, and takes the run's own seeded
java.util.random.RandomGenerator, so a run built on it is still repeated exactly. -->
<rgxgen.version>3.0</rgxgen.version>
<slf4j.version>2.0.17</slf4j.version>
<!-- Three libraries the OpenAPI parser and the HTTP client bring, pinned at the versions the
release archive carries; the comment on them below says why. -->
<guava.version>33.5.0-jre</guava.version>
<commons-codec.version>1.19.0</commons-codec.version>
<jetbrains-annotations.version>17.0.0</jetbrains-annotations.version>
<!-- Properties so that dist/central.sh asks for these two plugins at the versions the build
uses, rather than for whatever Maven finds newest. -->
<maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
<maven-help-plugin.version>3.5.2</maven-help-plugin.version>
<pitest.version>1.30.0</pitest.version>
<pitest-junit5.version>1.2.3</pitest-junit5.version>
<!--
Default for the JVM arguments surefire passes on. JaCoCo's prepare-agent goal replaces
this with the agent it needs, so a module adding its own argument writes
"@{argLine} ..." and keeps coverage working; this empty default is what stops that
reference from failing to resolve when coverage is switched off.
-->
<argLine></argLine>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>${archunit.version}</version>
</dependency>
<!--
Containerised APIs for the smoke run. The JUnit integration is `testcontainers-junit-
jupiter` since the 2.x line; `org.testcontainers:junit-jupiter`, which every 1.x
example on the internet names, has no 2.x release at all and fails to resolve.
-->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${testcontainers.version}</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-junit-jupiter</artifactId>
<version>${testcontainers.version}</version>
</dependency>
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
<version>${picocli.version}</version>
</dependency>
<dependency>
<groupId>io.swagger.parser.v3</groupId>
<artifactId>swagger-parser</artifactId>
<version>${swagger-parser.version}</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-core</artifactId>
<version>${swagger-core.version}</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-bom</artifactId>
<version>${okhttp.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<version>${wiremock.version}</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>${sqlite.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson-annotations.version}</version>
</dependency>
<dependency>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator</artifactId>
<version>${json-schema-validator.version}</version>
</dependency>
<dependency>
<groupId>tools.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson3.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.github.curious-odd-man</groupId>
<artifactId>rgxgen</artifactId>
<version>${rgxgen.version}</version>
</dependency>
<!-- Arrives through the schema validator, which logs through the SLF4J facade. Without a
binding, SLF4J prints three warning lines to standard error on first use, which is
not an acceptable first impression of a command-line tool. Choosing the binding is
the application's business, so restest-cli takes the do-nothing one at runtime; no
library here picks one. -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!--
The facade itself, pinned for a reason that only shows up once two things want it.
Testcontainers asks for 1.7.36; the do-nothing binding above is 2.0.x. Both sit the
same distance from restest-cli, so Maven's nearest-wins rule does not decide between
them and the order the dependencies happen to be written in does. A 1.7 facade with
a 2.0 binding does not work, and it does not fail the build either: it prints the
very warnings the binding was added to silence and then logs nothing. One managed
version makes the answer the same whatever order anybody writes.
-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!--
Pinned at the versions the release archive carries, so that what it carries does
not depend on a test library. Without a pin each came in at the version WireMock or
Testcontainers asks for, nearer the top of restest-cli's tree than the OpenAPI
parser that asks for an older one, and the POMs of the modules that do not have
those test libraries would have named the parser's (ADR-0044 §3). dist/central.sh
refuses a module whose libraries differ from restest-cli's, which is how the next
one is found.
-->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>${jetbrains-annotations.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<!--
Inherited by every module so each one is test-ready without repeating itself.
Test scope only: a test framework at compile scope becomes part of the published
surface, which is one of the 1.x mistakes ADR-0004 sets out to prevent.
-->
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.4</version>
<configuration>
<!--
Tests run on the classpath, not the module path. The module boundaries
are enforced where they matter - main compilation, plus the ArchUnit
rules in restest-arch-tests - and running tests as named modules would
buy nothing but patch-module ceremony. The module-info check in
SourceTreeRulesTest asserts that no module quietly loses its
module-info.java as a result.
-->
<useModulePath>false</useModulePath>
<!--
The smoke run starts two containers and pulls about 160 MB the first time.
`./mvnw verify` is the command everybody runs all day and on all nine
continuous-integration rows, so it does not do that: the tagged tests are
left out here and selected back in by the `smoke` and `it` profiles. Six
of the nine rows could not run them anyway - macOS runners have no
container runtime and Windows runners only run Windows containers.
-->
<excludedGroups>smoke</excludedGroups>
<!--
A key left in RESTEST_AUTH on the machine running the build would be read
by every test that starts the command, and change what those tests send -
or have them refuse to start. The tests that are about that variable hand
the command an environment of their own instead.
-->
<excludedEnvironmentVariables>RESTEST_AUTH</excludedEnvironmentVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<version>${maven-help-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifest>
<!--
Stamps Implementation-Title/Version/Vendor-Id into every jar. Not
the default, and its absence is not cosmetic: a run's JSON report
says which RESTest produced it by reading this, and with nothing
to read it says "unknown". A report that cannot name its own
version is no use for comparing the runs of two versions.
-->
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<!-- The sources and the Javadoc Maven Central asks for, each jar saying which RESTest
it belongs to, as the jar plugin's above does. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.12.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.8.0</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
</plugin>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>${pitest.version}</version>
<dependencies>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>${pitest-junit5.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<!--
Measured everywhere, blocking on two modules. `check` executions live in
restest-core/pom.xml and restest-oracles/pom.xml - the two modules
docs/DESIGN.md names under "Quality gates" - rather than here, because a
minimum imposed on every module would be a different promise from the one
that was made, and would have to be set low enough to be worthless.
Everywhere else the agent is attached and `report` runs, so a module's
coverage is visible without being enforced. A module with no tests produces
no execution data and the report goal skips, saying so. See docs/ci.md.
-->
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!--
Asking for no tests asks for no coverage check. The two modules with a blocking minimum
would otherwise fail a `-DskipTests` build for having covered nothing - which is true, and
is not news: nothing was run. Continuous integration never skips tests, so the gate is
never skipped where it matters. Both spellings are covered because both are in common use.
-->
<profile>
<id>tests-skipped</id>
<activation>
<property>
<name>skipTests</name>
<value>true</value>
</property>
</activation>
<properties>
<jacoco.skip>true</jacoco.skip>
</properties>
</profile>
<profile>
<id>tests-not-even-built</id>
<activation>
<property>
<name>maven.test.skip</name>
<value>true</value>
</property>
</activation>
<properties>
<jacoco.skip>true</jacoco.skip>
</properties>
</profile>
<!--
Just the smoke run: the whole tool, from the command line, against two real APIs in
containers. Nothing else runs, so coverage is switched off for the same reason the two
profiles above switch it off - the two modules with a blocking minimum would be measured
at nothing, which is not news when nothing was run.
The property is what turns a missing container runtime from a skipped test into a failed
build. Asking for this profile is asking for the containers; a gate that quietly reports
success because it could not run is worse than no gate, because it looks like one.
-->
<profile>
<id>smoke</id>
<properties>
<jacoco.skip>true</jacoco.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<groups>smoke</groups>
<excludedGroups>none</excludedGroups>
<failIfNoTests>false</failIfNoTests>
<systemPropertyVariables>
<restest.smoke.required>true</restest.smoke.required>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!--
Everything, containers included: the ordinary build plus the smoke run. `none` is a tag no
test carries, which is how "exclude nothing" is written without relying on what an empty
element means to the plugin.
-->
<profile>
<id>it</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>none</excludedGroups>
<systemPropertyVariables>
<restest.smoke.required>true</restest.smoke.required>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!--
What Maven Central gets beside each module's jar, which dist/central.sh lays out and the
release workflow signs and uploads; a profile, so that the build everybody runs all day
writes no Javadoc. The POM Central gets is not pom.xml: dist/central.sh writes it from the
two files made here, the module's POM flattened, for its name, address, licence and the
rest with nothing inherited, and the list of libraries Maven resolved for the module, the
list that fills restest-cli's target/lib. ADR-0044 §3 says why the list is not left to
pom.xml's own dependencies, nor to flatten-maven-plugin.
-->
<profile>
<id>central</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>sources-for-central</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>javadoc-for-central</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<executions>
<execution>
<id>pom-for-central</id>
<!-- The goal binds to no phase of its own. -->
<phase>package</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
</executions>
<configuration>
<flattenMode>ossrh</flattenMode>
<updatePomFile>false</updatePomFile>
<outputDirectory>${project.build.directory}</outputDirectory>
<flattenedPomFilename>flattened-pom.xml</flattenedPomFilename>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>libraries-for-central</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<includeScope>runtime</includeScope>
<sort>true</sort>
<outputFile>${project.build.directory}/runtime-dependencies.txt</outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>