This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 2645ff0da96e2ffb6001a8ac648f2a3234ec4f32
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Sat Mar 4 15:32:34 2023 +0100

    Add basic `sortPom` configuration
    
    The configuration only enforces whitspace and the order of the main
    `<project>` elements. The order of dependencies and plugins is not
    enforced.
---
 log4j-bom/pom.xml | 31 ++++++++++++++++++++++++++++---
 pom.xml           |  5 +++++
 2 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/log4j-bom/pom.xml b/log4j-bom/pom.xml
index 0a84d135ca..f8f9eefd7b 100644
--- a/log4j-bom/pom.xml
+++ b/log4j-bom/pom.xml
@@ -16,19 +16,23 @@
   limitations under the license.
   -->
 <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>org.apache.logging</groupId>
     <artifactId>logging-parent</artifactId>
     <version>7</version>
     <relativePath/>
   </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <name>Apache Log4j BOM</name>
-  <description>Apache Log4j Bill of Materials</description>
   <groupId>org.apache.logging.log4j</groupId>
   <artifactId>log4j-bom</artifactId>
   <version>3.0.0-SNAPSHOT</version>
   <packaging>pom</packaging>
+  <name>Apache Log4j BOM</name>
+  <description>Apache Log4j Bill of Materials</description>
+
+  <scm>
+    <tag>log4j-2.20.1-rc1</tag>
+  </scm>
 
   <properties>
     <!-- reproducible build setting -->
@@ -36,6 +40,7 @@
     <maven.site.skip>true</maven.site.skip>
     <maven.site.deploy.skip>true</maven.site.deploy.skip>
     <project.build.outputTimestamp>0</project.build.outputTimestamp>
+    <spotless-maven-plugin.version>2.27.2</spotless-maven-plugin.version>
   </properties>
 
   <dependencyManagement>
@@ -325,6 +330,26 @@
         <groupId>org.apache.rat</groupId>
         <artifactId>apache-rat-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>com.diffplug.spotless</groupId>
+        <artifactId>spotless-maven-plugin</artifactId>
+        <version>${spotless-maven-plugin.version}</version>
+        <configuration>
+          <pom>
+            <sortPom>
+              <expandEmptyElements>false</expandEmptyElements>
+            </sortPom>
+          </pom>
+        </configuration>
+        <executions>
+          <execution>
+            <id>default-spotless</id>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/pom.xml b/pom.xml
index a82de67fcd..fd0c9a3a41 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1558,6 +1558,11 @@
               <order>java,org,com,\#</order>
             </importOrder>
           </java>
+          <pom>
+            <sortPom>
+              <expandEmptyElements>false</expandEmptyElements>
+            </sortPom>
+          </pom>
         </configuration>
       </plugin>
 

Reply via email to