Skip to content

Commit

Permalink
#1285: Use sortpom-maven-plugin to check pom formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernard31 committed Jul 13, 2022
1 parent 6611454 commit 2887bff
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ Contributors:
<leshan.encoding>UTF-8</leshan.encoding>
<project.build.sourceEncoding>${leshan.encoding}</project.build.sourceEncoding>
<project.reporting.outputEncoding>${leshan.encoding}</project.reporting.outputEncoding>

<!-- configure line separator -->
<leshan.lineEnding>LF</leshan.lineEnding>
<leshan.lineseparator>\n</leshan.lineseparator>

<!-- we use properties for version when there are used more than once -->
<!-- dependencies version -->
Expand Down Expand Up @@ -229,6 +232,12 @@ Contributors:
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>com.github.ekryd.sortpom</groupId>
<artifactId>sortpom-maven-plugin</artifactId>
<!-- can not upgrade because of we stuck with java8 : https://github.com/Ekryd/sortpom/issues/225 -->
<version>3.0.1</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
Expand Down Expand Up @@ -326,6 +335,29 @@ Contributors:
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<!-- One of the rare plugin which must be called on all module even Aggregator
because it must check formatting of all pom.xml file.
Must be called with -PallPom profile -->
<groupId>com.github.ekryd.sortpom</groupId>
<artifactId>sortpom-maven-plugin</artifactId>
<configuration>
<createBackupFile>false</createBackupFile>
<lineSeparator>${leshan.lineseparator}</lineSeparator>
<verifyFail>stop</verifyFail>
<verifyFailOn>Strict</verifyFailOn>
</configuration>
<executions>
<execution>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencyManagement>
Expand Down

0 comments on commit 2887bff

Please sign in to comment.