Skip to content

Commit 27551cc

Browse files
chore: CI fail early
1 parent 8704dea commit 27551cc

File tree

1 file changed

+120
-109
lines changed

1 file changed

+120
-109
lines changed

pom.xml

Lines changed: 120 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@
268268
</plugins>
269269
</pluginManagement>
270270
<plugins>
271+
<!-- phase: validate -->
271272
<plugin>
272273
<groupId>org.apache.maven.plugins</groupId>
273274
<artifactId>maven-enforcer-plugin</artifactId>
@@ -401,6 +402,93 @@
401402
</execution>
402403
</executions>
403404
</plugin>
405+
<!-- phase: process-sources -->
406+
<plugin>
407+
<groupId>com.diffplug.spotless</groupId>
408+
<artifactId>spotless-maven-plugin</artifactId>
409+
<version>${spotless.version}</version>
410+
<configuration>
411+
<skip>${spotless.skip}</skip>
412+
<java>
413+
<!-- https://github.com/diffplug/spotless/tree/main/plugin-maven#java -->
414+
<removeUnusedImports/>
415+
<googleJavaFormat/>
416+
</java>
417+
<pom>
418+
<!-- https://github.com/diffplug/spotless/tree/main/plugin-maven#maven-pom -->
419+
<includes>
420+
<include>**/pom.xml</include>
421+
</includes>
422+
<encoding>${project.build.sourceEncoding}</encoding>
423+
<sortPom>
424+
<expandEmptyElements>false</expandEmptyElements>
425+
</sortPom>
426+
</pom>
427+
</configuration>
428+
<executions>
429+
<execution>
430+
<!-- compile:apply instead of the default validate:check -->
431+
<!-- because we want it to run AFTER the OpenAPI generator and FIX (apply) the generated code -->
432+
<goals>
433+
<goal>apply</goal>
434+
</goals>
435+
<phase>process-sources</phase>
436+
</execution>
437+
</executions>
438+
</plugin>
439+
<!-- phase: generate-resources -->
440+
<plugin>
441+
<groupId>org.codehaus.mojo</groupId>
442+
<artifactId>license-maven-plugin</artifactId>
443+
<version>2.5.0</version>
444+
<configuration>
445+
<acceptPomPackaging>true</acceptPomPackaging>
446+
<licenseName>apache_v2</licenseName>
447+
<failOnBlacklist>true</failOnBlacklist>
448+
<failOnMissing>true</failOnMissing>
449+
<excludedScopes>test</excludedScopes>
450+
<includedLicenses>
451+
<includedLicense>The MIT License</includedLicense>
452+
<includedLicense>Apache Software License - Version 2.0</includedLicense>
453+
<includedLicense>ISC</includedLicense>
454+
<includedLicense>The BSD 3-Clause License</includedLicense>
455+
<includedLicense>WTFPL</includedLicense>
456+
<includedLicense>CC-BY</includedLicense>
457+
<includedLicense>CC0</includedLicense>
458+
<includedLicense>Unlicense</includedLicense>
459+
<includedLicense>Public Domain</includedLicense>
460+
461+
<!-- other licenses as needed -->
462+
<includedLicense>Eclipse Distribution License - v 1.0</includedLicense>
463+
<includedLicense>Bouncy Castle Licence</includedLicense>
464+
</includedLicenses>
465+
<licenseMerges>
466+
<licenseMerge>Apache Software License - Version 2.0|Apache License Version 2.0|Apache 2.0|
467+
The Apache License, Version 2.0|Apache License, Version 2.0|Apache-2.0|
468+
The Apache Software License, Version 2.0|Apache License 2.0</licenseMerge>
469+
<licenseMerge>The MIT License|MIT License|The MIT License (MIT)|MIT|MIT-0</licenseMerge>
470+
<licenseMerge>The BSD 3-Clause License|BSD License 3|The BSD License|BSD-3-Clause|BSD-2-Clause|BSD licence</licenseMerge>
471+
<licenseMerge>Eclipse Distribution License - v 1.0|EDL 1.0</licenseMerge>
472+
<licenseMerge>Eclipse Public License v2.0|EPL 2.0</licenseMerge>
473+
<licenseMerge>Public Domain|Public Domain, per Creative Commons CC0|The JSON License</licenseMerge>
474+
</licenseMerges>
475+
</configuration>
476+
<executions>
477+
<execution>
478+
<id>add-third-party</id>
479+
<goals>
480+
<goal>add-third-party</goal>
481+
</goals>
482+
</execution>
483+
</executions>
484+
</plugin>
485+
<!-- phase: process-resources and process-test-resources -->
486+
<plugin>
487+
<groupId>org.apache.maven.plugins</groupId>
488+
<artifactId>maven-resources-plugin</artifactId>
489+
<version>3.3.1</version>
490+
</plugin>
491+
<!-- phase: test-compile -->
404492
<plugin>
405493
<groupId>org.apache.maven.plugins</groupId>
406494
<artifactId>maven-dependency-plugin</artifactId>
@@ -452,39 +540,7 @@
452540
</execution>
453541
</executions>
454542
</plugin>
455-
<plugin>
456-
<groupId>com.diffplug.spotless</groupId>
457-
<artifactId>spotless-maven-plugin</artifactId>
458-
<version>${spotless.version}</version>
459-
<configuration>
460-
<skip>${spotless.skip}</skip>
461-
<java>
462-
<!-- https://github.com/diffplug/spotless/tree/main/plugin-maven#java -->
463-
<removeUnusedImports/>
464-
<googleJavaFormat/>
465-
</java>
466-
<pom>
467-
<!-- https://github.com/diffplug/spotless/tree/main/plugin-maven#maven-pom -->
468-
<includes>
469-
<include>**/pom.xml</include>
470-
</includes>
471-
<encoding>${project.build.sourceEncoding}</encoding>
472-
<sortPom>
473-
<expandEmptyElements>false</expandEmptyElements>
474-
</sortPom>
475-
</pom>
476-
</configuration>
477-
<executions>
478-
<execution>
479-
<!-- compile:apply instead of the default validate:check -->
480-
<!-- because we want it to run AFTER the OpenAPI generator and FIX (apply) the generated code -->
481-
<goals>
482-
<goal>apply</goal>
483-
</goals>
484-
<phase>process-sources</phase>
485-
</execution>
486-
</executions>
487-
</plugin>
543+
<!-- phase: process-test-classes -->
488544
<plugin>
489545
<groupId>org.apache.maven.plugins</groupId>
490546
<artifactId>maven-checkstyle-plugin</artifactId>
@@ -510,7 +566,7 @@
510566
<goals>
511567
<goal>check</goal>
512568
</goals>
513-
<phase>verify</phase>
569+
<phase>process-test-classes</phase>
514570
</execution>
515571
</executions>
516572
</plugin>
@@ -540,31 +596,18 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
540596
<goals>
541597
<goal>check</goal>
542598
</goals>
543-
<phase>verify</phase>
599+
<phase>process-test-classes</phase>
544600
</execution>
545601
</executions>
546602
</plugin>
603+
<!-- phase: test -->
547604
<plugin>
548-
<groupId>com.github.spotbugs</groupId>
549-
<artifactId>spotbugs-maven-plugin</artifactId>
550-
<version>4.8.6.6</version>
551-
<configuration>
552-
<includeFilterFile>${project.rootdir}/.pipeline/spotbugs.xml</includeFilterFile>
553-
<!-- Exclude generated clients -->
554-
<excludeFilterFile>${project.rootdir}/.pipeline/spotbugs-exclusions.xml</excludeFilterFile>
555-
<effort>Max</effort>
556-
<threshold>Low</threshold>
557-
<maxHeap>2048</maxHeap>
558-
</configuration>
559-
<executions>
560-
<execution>
561-
<goals>
562-
<goal>check</goal>
563-
</goals>
564-
<phase>verify</phase>
565-
</execution>
566-
</executions>
605+
<!-- Needed because GitHub actions uses an old Maven version <3.9.0 -->
606+
<groupId>org.apache.maven.plugins</groupId>
607+
<artifactId>maven-surefire-plugin</artifactId>
608+
<version>${surefire.version}</version>
567609
</plugin>
610+
<!-- phase: verify -->
568611
<plugin>
569612
<groupId>org.jacoco</groupId>
570613
<artifactId>jacoco-maven-plugin</artifactId>
@@ -584,19 +627,21 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
584627
<goals>
585628
<goal>prepare-agent</goal>
586629
</goals>
630+
<phase>initialize</phase>
587631
</execution>
588632
<execution>
589633
<id>default-report</id>
590634
<goals>
591635
<goal>report</goal>
592636
</goals>
593-
<phase>prepare-package</phase>
637+
<phase>verify</phase>
594638
</execution>
595639
<execution>
596640
<id>default-check</id>
597641
<goals>
598642
<goal>check</goal>
599643
</goals>
644+
<phase>verify</phase>
600645
<configuration>
601646
<rules>
602647
<rule>
@@ -640,16 +685,27 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
640685
</executions>
641686
</plugin>
642687
<plugin>
643-
<!-- Needed because GitHub actions uses an old Maven version <3.9.0 -->
644-
<groupId>org.apache.maven.plugins</groupId>
645-
<artifactId>maven-surefire-plugin</artifactId>
646-
<version>${surefire.version}</version>
647-
</plugin>
648-
<plugin>
649-
<groupId>org.apache.maven.plugins</groupId>
650-
<artifactId>maven-resources-plugin</artifactId>
651-
<version>3.3.1</version>
688+
<groupId>com.github.spotbugs</groupId>
689+
<artifactId>spotbugs-maven-plugin</artifactId>
690+
<version>4.8.6.6</version>
691+
<configuration>
692+
<includeFilterFile>${project.rootdir}/.pipeline/spotbugs.xml</includeFilterFile>
693+
<!-- Exclude generated clients -->
694+
<excludeFilterFile>${project.rootdir}/.pipeline/spotbugs-exclusions.xml</excludeFilterFile>
695+
<effort>Max</effort>
696+
<threshold>Low</threshold>
697+
<maxHeap>2048</maxHeap>
698+
</configuration>
699+
<executions>
700+
<execution>
701+
<goals>
702+
<goal>check</goal>
703+
</goals>
704+
<phase>verify</phase>
705+
</execution>
706+
</executions>
652707
</plugin>
708+
<!-- configuration for GitHub actions -->
653709
<plugin>
654710
<groupId>org.owasp</groupId>
655711
<artifactId>dependency-check-maven</artifactId>
@@ -664,51 +720,6 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
664720
<skipProvidedScope>true</skipProvidedScope>
665721
</configuration>
666722
</plugin>
667-
<plugin>
668-
<groupId>org.codehaus.mojo</groupId>
669-
<artifactId>license-maven-plugin</artifactId>
670-
<version>2.5.0</version>
671-
<configuration>
672-
<acceptPomPackaging>true</acceptPomPackaging>
673-
<licenseName>apache_v2</licenseName>
674-
<failOnBlacklist>true</failOnBlacklist>
675-
<failOnMissing>true</failOnMissing>
676-
<excludedScopes>test</excludedScopes>
677-
<includedLicenses>
678-
<includedLicense>The MIT License</includedLicense>
679-
<includedLicense>Apache Software License - Version 2.0</includedLicense>
680-
<includedLicense>ISC</includedLicense>
681-
<includedLicense>The BSD 3-Clause License</includedLicense>
682-
<includedLicense>WTFPL</includedLicense>
683-
<includedLicense>CC-BY</includedLicense>
684-
<includedLicense>CC0</includedLicense>
685-
<includedLicense>Unlicense</includedLicense>
686-
<includedLicense>Public Domain</includedLicense>
687-
688-
<!-- other licenses as needed -->
689-
<includedLicense>Eclipse Distribution License - v 1.0</includedLicense>
690-
<includedLicense>Bouncy Castle Licence</includedLicense>
691-
</includedLicenses>
692-
<licenseMerges>
693-
<licenseMerge>Apache Software License - Version 2.0|Apache License Version 2.0|Apache 2.0|
694-
The Apache License, Version 2.0|Apache License, Version 2.0|Apache-2.0|
695-
The Apache Software License, Version 2.0|Apache License 2.0</licenseMerge>
696-
<licenseMerge>The MIT License|MIT License|The MIT License (MIT)|MIT|MIT-0</licenseMerge>
697-
<licenseMerge>The BSD 3-Clause License|BSD License 3|The BSD License|BSD-3-Clause|BSD-2-Clause|BSD licence</licenseMerge>
698-
<licenseMerge>Eclipse Distribution License - v 1.0|EDL 1.0</licenseMerge>
699-
<licenseMerge>Eclipse Public License v2.0|EPL 2.0</licenseMerge>
700-
<licenseMerge>Public Domain|Public Domain, per Creative Commons CC0|The JSON License</licenseMerge>
701-
</licenseMerges>
702-
</configuration>
703-
<executions>
704-
<execution>
705-
<id>add-third-party</id>
706-
<goals>
707-
<goal>add-third-party</goal>
708-
</goals>
709-
</execution>
710-
</executions>
711-
</plugin>
712723
</plugins>
713724
</build>
714725
<profiles>

0 commit comments

Comments
 (0)