-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathpom.xml
748 lines (734 loc) · 27.5 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
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
<?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>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<!-- SprintBoot requires JDK17 while AWS Lambda requires JDK11 -->
<!-- https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html -->
<!-- https://github.com/aleph0io/aws-lambda-java-base-images proposes a JDK17 base image-->
<!-- https://github.com/aws/aws-lambda-base-images/issues/29 -->
<version>2.7.18</version>
<!-- http://stackoverflow.com/questions/6003831/parent-relativepath-points-at-my-com-mycompanymyproject-instead-of-org-apache -->
<relativePath />
</parent>
<groupId>io.github.solven-eu.cleanthat</groupId>
<artifactId>parent</artifactId>
<version>2.23-SNAPSHOT</version>
<packaging>pom</packaging>
<inceptionYear>2020</inceptionYear>
<developers>
<developer>
<id>blacelle</id>
<name>Benoit Lacelle</name>
<email>benoit.lacelle at solven.eu</email>
<roles>
<role>Project lead</role>
</roles>
</developer>
</developers>
<scm>
<!-- SCM is in properties as we can't configure it directly in profile -->
<!-- Do not add developperConnection as parent is not a SNAPSHOT -->
<connection>${scm.connection}</connection>
<tag>HEAD</tag>
<url>${scm.url}</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyyMMddHHmmssSSS</maven.build.timestamp.format>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<!-- https://stackoverflow.com/questions/20581427/using-maven-release-plugin-with-github-you-cant-push-to-git-github-com -->
<scm.developerConnection>scm:git:ssh://[email protected]/solven-eu/cleanthat.git</scm.developerConnection>
<scm.connection>scm:git:ssh://github.com/solven-eu/cleanthat.git</scm.connection>
<scm.url>https://github.com/solven-eu/cleanthat</scm.url>
<!-- https://github.com/solven-eu/pepper/releases -->
<pepper.version>4.5</pepper.version>
<error-prone.version>2.29.2</error-prone.version>
<!-- 2.36.0 is broken due to https://github.com/diffplug/spotless/issues/1583 -->
<!-- https://mvnrepository.com/artifact/com.diffplug.spotless/spotless-maven-plugin -->
<spotless.version>2.43.0</spotless.version>
<!-- https://mvnrepository.com/artifact/com.github.spotbugs/spotbugs-maven-plugin -->
<spotbugs.version>4.8.2.0</spotbugs.version>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-pmd-plugin -->
<maven-pmd-plugin.version>3.21.2</maven-pmd-plugin.version>
<!-- https://mvnrepository.com/artifact/net.sourceforge.pmd/pmd -->
<pmd.version>6.55.0</pmd.version>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-checkstyle-plugin -->
<maven-checkstyle-plugin.version>3.3.1</maven-checkstyle-plugin.version>
<!-- https://mvnrepository.com/artifact/com.puppycrawl.tools/checkstyle -->
<checkstyle.version>10.18.2</checkstyle.version>
<!-- https://mvnrepository.com/artifact/com.mycila/license-maven-plugin -->
<license-maven-plugin.version>4.6</license-maven-plugin.version>
<!-- By default (i.e. in local environments), check for code formatting AFTER trying automatic fixes. -->
<!-- We suppose the developper would see the fixed and include them in his commit. -->
<!-- In the CI, we check BEFORE automatic fixes as the CI should report early invalid code -->
<staticChecks>process-sources</staticChecks>
<!-- CPD: We configure as property to enable overriding by sub-modules -->
<!-- Code duplication: Lower is better. Default is 100 -->
<minimumTokens>80</minimumTokens>
<!-- Skip javadoc, especially as it would break mvn:release -->
<maven.javadoc.skip>true</maven.javadoc.skip>
<!-- We deploy only into lambda -->
<maven.deploy.skip>true</maven.deploy.skip>
<!-- Execute license-check manually, only before doing a release -->
<license.skip>true</license.skip>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<!-- https://maven.apache.org/plugins/maven-source-plugin/ -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<failFast>true</failFast>
<!-- https://maven.apache.org/enforcer/enforcer-rules/index.html -->
<rules>
<!-- We have a local site used to upload report in circleci -->
<!-- <banDistributionManagement /> -->
<banDuplicatePomDependencyVersions />
<!-- TODO Activate this rule requiring to force quite many dependencies -->
<!-- <dependencyConvergence /> -->
<!-- reactorModuleConvergence seems not to handle outer BOM (e.g. from SpringBoot) -->
<!-- <reactorModuleConvergence /> -->
<requireMavenVersion>
<version>3.0</version>
</requireMavenVersion>
<requireJavaVersion>
<version>${maven.compiler.source}</version>
</requireJavaVersion>
<!-- We leave some plugin versions to SpringBoot -->
<!-- <requirePluginVersions /> -->
<requireReleaseDeps>
<onlyWhenRelease>true</onlyWhenRelease>
</requireReleaseDeps>
<!-- TODO Activate this rule -->
<!-- <requireUpperBoundDeps> -->
<!-- <excludes> -->
<!--no dependency need to be excluded from this rule -->
<!-- </excludes> -->
<!-- </requireUpperBoundDeps> -->
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- http://code.mycila.com/license-maven-plugin/ -->
<!-- Usage: mvn com.mycila:license-maven-plugin:format -Dlicense.skip=false -->
<!-- Beware this will corrupt UTF-16 files (typically XML files) -->
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
<configuration>
<mapping>
<java>SLASHSTAR_STYLE</java>
<xml>XML_PER_LINE</xml>
</mapping>
<!-- Single row header prevent many issues, especially regarding formatting and XMLs -->
<inlineHeader><![CDATA[Copyright © ${year} ${owner} (${email}). Unauthorized copying of this file, via any medium is strictly prohibited. Proprietary and confidential]]></inlineHeader>
<properties>
<owner>SOLVEN</owner>
<year>2021</year>
</properties>
<excludes>
<exclude>pom.xml</exclude>
<exclude>**/*.js</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*.html</exclude>
<exclude>**/*.vue</exclude>
<exclude>**/node_modules/**</exclude>
<exclude>README.MD</exclude>
<exclude>pom.xml.versionsBackup</exclude>
<exclude>**/.pmd</exclude>
<exclude>**/.pmdruleset.xml</exclude>
<exclude>**/.checktyle</exclude>
<!-- Eclipse Launch (Debug/Run) files -->
<exclude>**/*.launch</exclude>
<!-- Useless to License generated files as regeneration will remove license -->
<excludes>**/generated/**</excludes>
<!-- Specific to module gui-web -->
<exclude>**/.babelrc</exclude>
<exclude>**/.gitkeep</exclude>
<exclude>**/*.js.map</exclude>
<exclude>**/*.css.map</exclude>
<exclude>**/npm</exclude>
<exclude>**/node</exclude>
<exclude>**/.eslintrc</exclude>
<exclude>**/.eslintignore</exclude>
<exclude>**/lcov.info</exclude>
<!-- Specific to Docker -->
<exclude>sshd_config</exclude>
<!-- A marker file typically used to materialize a folder in git -->
<exclude>empty</exclude>
<!-- Leftovers to Logback wiring in files -->
<exclude>**/app.log</exclude>
<!-- Android -->
<exclude>**/.gradle/**</exclude>
<!-- Used to exclude gui-web and gui-back -->
<exclude>**/node/**</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!--https://spotbugs.github.io/spotbugs-maven-plugin/index.html -->
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs.version}</version>
<configuration>
<!-- Skipped as we need a Pepper release for the default exclusions -->
<skip>false</skip>
<excludeFilterFile>style/pepper.spotbugs.xml</excludeFilterFile>
<!-- Try not forking else it is slow even if skipped -->
<fork>false</fork>
</configuration>
<dependencies>
<dependency>
<!-- This dependency holds the default configuration -->
<groupId>io.github.solven-eu.pepper</groupId>
<artifactId>pepper-static</artifactId>
<version>${pepper.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<executions>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
<!-- default phase is verify, which is after tests. -->
<!-- We prefer to run static analysis before tests not to wait -->
<phase>${staticChecks}</phase>
</execution>
</executions>
</plugin>
<plugin>
<!-- https://maven.apache.org/plugins/maven-checkstyle-plugin/ -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<configuration>
<excludes>**/generated/**,**/jwk.test.properties</excludes>
<!-- We seem not able to exclude jwk.test.properties with <excludes> -->
<includeTestResources>false</includeTestResources>
</configuration>
<dependencies>
<dependency>
<!-- This dependency holds the default configuration -->
<groupId>io.github.solven-eu.pepper</groupId>
<artifactId>pepper-static</artifactId>
<version>${pepper.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<!-- more recent than brought by maven plugin -->
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
<!-- default phase is verify, which is after tests. -->
<!-- We prefer to run static analysis before tests not to wait -->
<phase>${staticChecks}</phase>
<configuration>
<configLocation>style/pepper.checkstyle.xml</configLocation>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<!-- Prevent [WARNING] Unable to locate Source XRef to link to - DISABLED -->
<!-- only with goal checkstyle-aggregate or checkstyle generating a report -->
<!--<linkXRef>false</linkXRef> -->
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!--https://maven.apache.org/plugins/maven-pmd-plugin/ -->
<!-- Skip a row by adding '//NOPMD' at the end -->
<!-- https://pmd.github.io/pmd-6.6.0/pmd_userdocs_suppressing_warnings.html#nopmd-comment -->
<!-- Trigger only pmd with 'mvn pmd:check' -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${maven-pmd-plugin.version}</version>
<configuration>
<!-- <includeTests>true</includeTests> -->
<indentSize>4</indentSize>
<printFailingErrors>true</printFailingErrors>
<!-- TODO Decrease to 4, then 3, until 1 -->
<failurePriority>5</failurePriority>
<!-- Prevent [WARNING] Unable to locate Source XRef to link to - DISABLED -->
<linkXRef>false</linkXRef>
<!-- xml is required to run 'mvn pmd:check' -->
<format>xml</format>
<rulesets>
<ruleset>style/pepper.pmd.rulesets.xml</ruleset>
</rulesets>
<excludes>
<exclude>**/generated/**</exclude>
</excludes>
</configuration>
<dependencies>
<dependency>
<groupId>io.github.solven-eu.pepper</groupId>
<artifactId>pepper-static</artifactId>
<version>${pepper.version}</version>
<scope>runtime</scope>
</dependency>
<!-- the orginal version shipped with the plugin, 6.4.0, doesn't handle java11 -->
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>${pmd.version}</version>
</dependency>
<!-- Enables rules for XML, including pom.xml -->
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-xml</artifactId>
<version>${pmd.version}</version>
</dependency>
<!-- maven-pmd-plugin relies by default on some version of PMD which -->
<!-- may be incompatible with custom PMD versions -->
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>${pmd.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>check</goal>
<goal>cpd-check</goal>
</goals>
<!-- Default phase is verify, which is after tests. -->
<!-- We prefer to run static analysis before tests not to wait -->
<!-- PMD should run after impsort auto-cleaning: done by using same phase but ordering plugins properly -->
<!-- https://stackoverflow.com/questions/8243912/changing-the-order-of-maven-plugin-execution -->
<phase>${staticChecks}</phase>
</execution>
</executions>
</plugin>
<plugin>
<!-- mvn io.github.solven-eu.cleanthat:cleanthat-maven-plugin:cleanthat -->
<groupId>io.github.solven-eu.cleanthat</groupId>
<artifactId>cleanthat-maven-plugin</artifactId>
<version>2.23-SNAPSHOT</version>
<executions>
<execution>
<id>Clean the code</id>
<goals>
<goal>cleanthat</goal>
</goals>
</execution>
<execution>
<id>Check the code is clean</id>
<goals>
<goal>check</goal>
</goals>
<phase>${staticChecks}</phase>
</execution>
</executions>
</plugin>
<plugin>
<!-- mvn com.diffplug.spotless:spotless-maven-plugin:apply -->
<!-- mvn com.diffplug.spotless:spotless-maven-plugin:check -->
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<!-- optional: limit format enforcement to just the files changed by this feature branch -->
<!-- We keep a ratchetFrom to ensure `LicenseHeader.YearMode==UPDATE_TO_TODAY` -->
<!-- https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/generic/LicenseHeader.java -->
<ratchetFrom>origin/master</ratchetFrom>
<formats>
<!-- you can define as many formats as you want, each is independent -->
<format>
<!-- define the files to apply to -->
<includes>
<include>.gitignore</include>
</includes>
<!-- define the steps to apply to those files -->
<trimTrailingWhitespace />
<endWithNewline />
<indent>
<tabs>true</tabs>
<spacesPerTab>4</spacesPerTab>
</indent>
</format>
</formats>
<pom>
<includes>
<include>pom.xml</include>
</includes>
<!-- https://github.com/diffplug/spotless/tree/main/plugin-maven#sortpom -->
<sortPom>
<!-- We like empty elements, while plugin default configuration would expand them -->
<expandEmptyElements>false</expandEmptyElements>
<!-- https://github.com/Ekryd/sortpom/issues/75 -->
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
<!-- https://github.com/Ekryd/sortpom/wiki/Parameters#for-both-the-sort-and-verify-goal -->
<!-- -1 means '\t' -->
<nrOfIndentSpace>-1</nrOfIndentSpace>
</sortPom>
</pom>
<markdown>
<endWithNewline />
<indent>
<tabs>true</tabs>
<spacesPerTab>4</spacesPerTab>
</indent>
<includes>
<include>**/*.md</include>
</includes>
<flexmark />
</markdown>
<!-- define a language-specific format -->
<java>
<excludes>
<!-- TestCases needs to remains not formatted/cleaned -->
<exclude>**/do_not_format_me/**</exclude>
</excludes>
<cleanthat>
<sourceJdk>${maven.compiler.source}</sourceJdk>
<version>${project.version}</version>
<mutators>
<mutator>SafeAndConsensual</mutator>
-
<mutator>SafeButNotConsensual</mutator>
-
<mutator>SafeButControversial</mutator>
-
<mutator>Guava</mutator>
</mutators>
<includeDraft>false</includeDraft>
<excludedMutators>
<!-- https://github.com/javaparser/javaparser/issues/3930 -->
<excludedMutator>LambdaReturnsSingleStatement</excludedMutator>
<!-- Too much instable -->
<excludedMutator>UseDiamondOperator</excludedMutator>
<!-- PMD recommends not using `var` -->
<excludedMutator>LocalVariableTypeInference</excludedMutator>
</excludedMutators>
</cleanthat>
<removeUnusedImports />
<importOrder>
<file>${maven.multiModuleProjectDirectory}/.cleanthat/eclipse.importorder</file>
<!--order>java,javax,org,com</order-->
</importOrder>
<eclipse>
<!-- https://github.com/diffplug/spotless/tree/main/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter -->
<!-- <version>4.18.0</version>-->
<!-- From Pepper -->
<!-- <file>eclipse/eclipse_java_code_formatter.xml</file>-->
<file>${maven.multiModuleProjectDirectory}/.cleanthat/eclipse_java_code_formatter.xml</file>
</eclipse>
<licenseHeader>
<!-- https://github.com/diffplug/spotless/issues/1418 -->
<delimiter>(package )|(import )</delimiter>
<file>${maven.multiModuleProjectDirectory}/.cleanthat/spotless.license</file>
</licenseHeader>
</java>
<json>
<trimTrailingWhitespace />
<endWithNewline />
<indent>
<tabs>true</tabs>
<spacesPerTab>4</spacesPerTab>
</indent>
<includes>
<include>*.json</include>
<include>src/**/*.json</include>
</includes>
<gson />
</json>
</configuration>
<dependencies>
<dependency>
<groupId>io.github.solven-eu.pepper</groupId>
<artifactId>pepper-static</artifactId>
<version>${pepper.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<executions>
<execution>
<id>applySpotless</id>
<goals>
<goal>apply</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
<plugin>
<!-- mvn rewrite:run -->
<!-- BEWARE: it failed as openRewrite seems to trigger a general gaoal, triggering others plugins -->
<!-- https://docs.openrewrite.org/reference/rewrite-maven-plugin -->
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>5.42.2</version>
<configuration>
<activeRecipes>
<recipe>org.openrewrite.java.Spring</recipe>
</activeRecipes>
<!-- These are default values, shown for example. It isn't necessary to supply these values manually: -->
<configLocation>${maven.multiModuleProjectDirectory}/rewrite.yml</configLocation>
<failOnDryRunResults>true</failOnDryRunResults>
<exclusions>
<exclude>*/do_not_format_me/**</exclude>
</exclusions>
</configuration>
<executions>
<execution>
<id>applyOpenrewrite</id>
<goals>
<goal>run</goal>
</goals>
<phase>process-sources</phase>
</execution>
<execution>
<id>dryRunOpenrewrite</id>
<goals>
<goal>dryRun</goal>
</goals>
<phase>${staticChecks}</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>
<!-- Apply formatters before checks -->
<!-- <plugin>-->
<!-- <groupId>org.openrewrite.maven</groupId>-->
<!-- <artifactId>rewrite-maven-plugin</artifactId>-->
<!-- </plugin>-->
<plugin>
<!-- Ensure formatting sources is executed before checkstyle/PMD, as it will automatically clean some style rules -->
<!-- https://stackoverflow.com/questions/8243912/changing-the-order-of-maven-plugin-execution -->
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
<!-- Apply checks after formatters -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<!-- Skip a row by adding '//NOPMD' at the end -->
<!-- http://pmd.sourceforge.net/pmd-4.3.0/suppressing.html -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- Skip formatting and refactoring: quality, format,... -->
<id>skipStyle</id>
<properties>
<!-- Code style -->
<checkstyle.skip>true</checkstyle.skip>
<pmd.skip>true</pmd.skip>
<cpd.skip>true</cpd.skip>
<spotbugs.skip>true</spotbugs.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
<license.skip>true</license.skip>
<formatter.skip>true</formatter.skip>
<impsort.skip>true</impsort.skip>
<cleanthat.skip>true</cleanthat.skip>
<skip.npm.style>true</skip.npm.style>
<cleanthat.skip>true</cleanthat.skip>
<spotless.apply.skip>true</spotless.apply.skip>
<spotless.check.skip>true</spotless.check.skip>
<!-- Dependency will be checked with style -->
<enforcer.skip>true</enforcer.skip>
</properties>
</profile>
<profile>
<!-- If tests are skipped, we also want to skip Jacoco -->
<id>skipTests</id>
<activation>
<!-- Triggered by -DskipTests -->
<property>
<name>skipTests</name>
</property>
</activation>
<properties>
<!-- Skip tests -->
<jacoco.skip>true</jacoco.skip>
</properties>
</profile>
<profile>
<id>skipITs</id>
<activation>
<!-- Integration-tests are heavy, and should not be triggered by a simple 'mvn install' -->
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<skipITs>true</skipITs>
</properties>
</profile>
<profile>
<!-- Skip everything: test, quality, format,... -->
<id>fast</id>
<properties>
<!--<skipTests>true</skipTests> -->
<!--<jacoco.skip>true</jacoco.skip> -->
<checkstyle.skip>true</checkstyle.skip>
<pmd.skip>true</pmd.skip>
<cpd.skip>true</cpd.skip>
<spotbugs.skip>true</spotbugs.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
<license.skip>true</license.skip>
<formatter.skip>true</formatter.skip>
<impsort.skip>true</impsort.skip>
<cleanthat.skip>true</cleanthat.skip>
<skip.npm.style>true</skip.npm.style>
<cleanthat.skip>true</cleanthat.skip>
<spotless.apply.skip>true</spotless.apply.skip>
<spotless.check.skip>true</spotless.check.skip>
<!-- Dependency will be checked with style -->
<enforcer.skip>true</enforcer.skip>
<!-- Skip tests -->
<jacoco.skip>true</jacoco.skip>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
</properties>
</profile>
<profile>
<id>ci</id>
<activation>
<property>
<name>env.CI</name>
<value>true</value>
</property>
</activation>
<properties>
<!-- In CI environments, we should check code formatting before trying to autofix it -->
<staticChecks>validate</staticChecks>
</properties>
</profile>
<profile>
<!-- https://central.sonatype.org/publish/publish-maven/#deploying-to-ossrh-with-apache-maven-introduction -->
<id>Sonatype</id>
<!--Requires in settings.xml: <settings> <servers> <server> <id>ossrh</id> <username>your-jira-id</username> <password>your-jira-pwd</password> </server>
</servers> </settings> -->
<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<!-- http://central.sonatype.org/pages/working-with-pgp-signatures.html -->
<!-- http://stackoverflow.com/questions/14114528/avoid-gpg-signing-prompt-when-using-maven-release-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<configuration>
<!-- http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html -->
<doclint>none</doclint>
<!-- https://github.com/projectlombok/lombok/issues/2737 -->
<failOnError>false</failOnError>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin -->
<!-- http://www.sonatype.org/nexus/2014/10/08/distribute-project-artifacts-in-maven-central-with-nexus-oss/ -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<!-- https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin -->
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>