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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-release-plugin.git

commit 685c863b6861874eaf67b5b7806a0938f96bc9f8
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Mon Oct 9 10:44:07 2023 -0400

    Use Checkstyle to validate import order
---
 checkstyle.xml                                             |  9 +++++++--
 .../release/plugin/mojos/CommonsStagingCleanupMojo.java    |  8 ++++----
 .../plugin/velocity/HeaderHtmlVelocityDelegate.java        |  1 +
 .../plugin/velocity/ReadmeHtmlVelocityDelegate.java        |  1 +
 .../mojos/CommonsDistributionDetachmentMojoTest.java       | 12 ++++++------
 .../plugin/mojos/CommonsDistributionStagingMojoTest.java   | 12 ++++++------
 .../plugin/mojos/CommonsSiteCompressionMojoTest.java       | 14 +++++++-------
 .../plugin/mojos/CommonsStagingCleanupMojoTest.java        | 10 +++++-----
 .../plugin/velocity/ReadmeHtmlVelocityDelegateTest.java    |  4 ++--
 9 files changed, 39 insertions(+), 32 deletions(-)

diff --git a/checkstyle.xml b/checkstyle.xml
index cd35211..1010ce2 100755
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0"?>
-<?xml version="1.0"?>
 <!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -184,7 +183,13 @@
     <module name="FinalParameters" />
     <module name="TodoComment" />
     <module name="UpperEll" />
+    <module name="ImportOrder">
+      <property name="option" value="top"/>
+      <property name="groups" value="java,javax,org"/>
+      <property name="ordered" value="true"/>
+      <property name="separated" value="true"/>
+    </module>
 
   </module>
 
-</module>
\ No newline at end of file
+</module>
diff --git 
a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsStagingCleanupMojo.java
 
b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsStagingCleanupMojo.java
index a6d18a0..10e0a1b 100644
--- 
a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsStagingCleanupMojo.java
+++ 
b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsStagingCleanupMojo.java
@@ -16,6 +16,10 @@
  */
 package org.apache.commons.release.plugin.mojos;
 
+import java.io.File;
+import java.util.Arrays;
+import java.util.List;
+
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.release.plugin.SharedFunctions;
 import org.apache.maven.plugin.AbstractMojo;
@@ -40,10 +44,6 @@ import org.apache.maven.scm.repository.ScmRepository;
 import org.apache.maven.settings.Settings;
 import org.apache.maven.settings.crypto.SettingsDecrypter;
 
-import java.io.File;
-import java.util.Arrays;
-import java.util.List;
-
 /**
  * This class checks out the dev distribution location, checks whether 
anything exists in the
  * distribution location, and if it is non-empty it deletes all the resources 
there.
diff --git 
a/src/main/java/org/apache/commons/release/plugin/velocity/HeaderHtmlVelocityDelegate.java
 
b/src/main/java/org/apache/commons/release/plugin/velocity/HeaderHtmlVelocityDelegate.java
index 7ac8f77..f9b0896 100755
--- 
a/src/main/java/org/apache/commons/release/plugin/velocity/HeaderHtmlVelocityDelegate.java
+++ 
b/src/main/java/org/apache/commons/release/plugin/velocity/HeaderHtmlVelocityDelegate.java
@@ -17,6 +17,7 @@
 package org.apache.commons.release.plugin.velocity;
 
 import java.io.Writer;
+
 import org.apache.velocity.Template;
 import org.apache.velocity.VelocityContext;
 import org.apache.velocity.app.VelocityEngine;
diff --git 
a/src/main/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegate.java
 
b/src/main/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegate.java
index aba1174..f5ac418 100755
--- 
a/src/main/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegate.java
+++ 
b/src/main/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegate.java
@@ -17,6 +17,7 @@
 package org.apache.commons.release.plugin.velocity;
 
 import java.io.Writer;
+
 import org.apache.commons.lang3.StringUtils;
 import org.apache.velocity.Template;
 import org.apache.velocity.VelocityContext;
diff --git 
a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.java
 
b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.java
index d912e16..22f08bc 100755
--- 
a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.java
+++ 
b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.java
@@ -16,18 +16,18 @@
  */
 package org.apache.commons.release.plugin.mojos;
 
+import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+
 import org.apache.maven.plugin.testing.MojoRule;
 import org.codehaus.plexus.util.FileUtils;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
-import java.io.File;
-
-import static junit.framework.TestCase.assertTrue;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-
 /**
  * Unit tests for {@link CommonsDistributionDetachmentMojo}.
  */
diff --git 
a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java
 
b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java
index b35f615..0a9a726 100755
--- 
a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java
+++ 
b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java
@@ -16,18 +16,18 @@
  */
 package org.apache.commons.release.plugin.mojos;
 
+import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+
 import org.apache.maven.plugin.testing.MojoRule;
 import org.codehaus.plexus.util.FileUtils;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
-import java.io.File;
-
-import static junit.framework.TestCase.assertTrue;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-
 /**
  * Unit tests for {@link CommonsDistributionStagingMojo}.
  *
diff --git 
a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.java
 
b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.java
index ec94fef..e19254d 100755
--- 
a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.java
+++ 
b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.java
@@ -16,6 +16,13 @@
  */
 package org.apache.commons.release.plugin.mojos;
 
+import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.testing.MojoRule;
 import org.codehaus.plexus.util.FileUtils;
@@ -23,13 +30,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
-import java.io.File;
-
-import static junit.framework.TestCase.assertTrue;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-
 /**
  * Unit tests for {@link CommonsSiteCompressionMojo}.
  *
diff --git 
a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsStagingCleanupMojoTest.java
 
b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsStagingCleanupMojoTest.java
index b1cf290..20d987f 100755
--- 
a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsStagingCleanupMojoTest.java
+++ 
b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsStagingCleanupMojoTest.java
@@ -16,17 +16,17 @@
  */
 package org.apache.commons.release.plugin.mojos;
 
+import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+
 import org.apache.maven.plugin.testing.MojoRule;
 import org.codehaus.plexus.util.FileUtils;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
-import java.io.File;
-
-import static junit.framework.TestCase.assertTrue;
-import static org.junit.Assert.assertNotNull;
-
 /**
  * Unit tests for {@link CommonsSiteCompressionMojo}.
  *
diff --git 
a/src/test/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegateTest.java
 
b/src/test/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegateTest.java
index 4998832..f3e121a 100755
--- 
a/src/test/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegateTest.java
+++ 
b/src/test/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegateTest.java
@@ -16,13 +16,13 @@
  */
 package org.apache.commons.release.plugin.velocity;
 
-import org.junit.Test;
+import static junit.framework.TestCase.assertTrue;
 
 import java.io.IOException;
 import java.io.StringWriter;
 import java.io.Writer;
 
-import static junit.framework.TestCase.assertTrue;
+import org.junit.Test;
 
 /**
  * Unit tests for {@link ReadmeHtmlVelocityDelegate}.

Reply via email to