From 54ab3d52fa79dec9c12e1884b56846fe4f39ebea Mon Sep 17 00:00:00 2001 From: Stephan Schnabel Date: Tue, 17 Sep 2024 13:43:03 +0200 Subject: [PATCH] Formatting: remove groups for org/com and add jakarta to import order --- pom.xml | 2 +- src/main/java/io/kokuwa/maven/k3s/mojo/ApplyMojo.java | 5 ++--- src/main/java/io/kokuwa/maven/k3s/mojo/ImageMojo.java | 3 +-- src/main/java/io/kokuwa/maven/k3s/mojo/K3sMojo.java | 5 ++--- src/main/java/io/kokuwa/maven/k3s/mojo/RunMojo.java | 3 +-- src/main/java/io/kokuwa/maven/k3s/util/Docker.java | 5 ++--- src/test/java/io/kokuwa/maven/k3s/LifecycleTest.java | 5 ++--- .../java/io/kokuwa/maven/k3s/mojo/ApplyMojoTest.java | 3 +-- .../java/io/kokuwa/maven/k3s/mojo/ImageMojoTest.java | 3 +-- .../java/io/kokuwa/maven/k3s/mojo/RemoveMojoTest.java | 3 +-- .../java/io/kokuwa/maven/k3s/mojo/RestartMojoTest.java | 3 +-- src/test/java/io/kokuwa/maven/k3s/mojo/RunMojoTest.java | 9 ++++----- src/test/java/io/kokuwa/maven/k3s/test/AbstractTest.java | 3 +-- .../java/io/kokuwa/maven/k3s/test/MojoExtension.java | 5 ++--- src/test/java/io/kokuwa/maven/k3s/util/DockerTest.java | 5 ++--- 15 files changed, 24 insertions(+), 38 deletions(-) diff --git a/pom.xml b/pom.xml index c83becd0..df59b915 100644 --- a/pom.xml +++ b/pom.xml @@ -291,7 +291,7 @@ impsort-maven-plugin ${version.net.revelc.code.impsort} - java.,javax.,org.,com. + java.,javax.,jakarta. true true diff --git a/src/main/java/io/kokuwa/maven/k3s/mojo/ApplyMojo.java b/src/main/java/io/kokuwa/maven/k3s/mojo/ApplyMojo.java index 9929eaa6..e871c0a1 100644 --- a/src/main/java/io/kokuwa/maven/k3s/mojo/ApplyMojo.java +++ b/src/main/java/io/kokuwa/maven/k3s/mojo/ApplyMojo.java @@ -17,14 +17,13 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import io.kokuwa.maven.k3s.util.Await; +import io.kokuwa.maven.k3s.util.Task; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; -import io.kokuwa.maven.k3s.util.Await; -import io.kokuwa.maven.k3s.util.Task; - /** * Mojo for kubectl apply. * diff --git a/src/main/java/io/kokuwa/maven/k3s/mojo/ImageMojo.java b/src/main/java/io/kokuwa/maven/k3s/mojo/ImageMojo.java index 2dcd7d23..ce770ac1 100644 --- a/src/main/java/io/kokuwa/maven/k3s/mojo/ImageMojo.java +++ b/src/main/java/io/kokuwa/maven/k3s/mojo/ImageMojo.java @@ -18,13 +18,12 @@ import java.util.stream.Stream; import java.util.zip.Adler32; +import io.kokuwa.maven.k3s.util.Docker.ContainerImage; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; -import io.kokuwa.maven.k3s.util.Docker.ContainerImage; - /** * Import images into k3s containerd. * diff --git a/src/main/java/io/kokuwa/maven/k3s/mojo/K3sMojo.java b/src/main/java/io/kokuwa/maven/k3s/mojo/K3sMojo.java index e838f51a..f545832b 100644 --- a/src/main/java/io/kokuwa/maven/k3s/mojo/K3sMojo.java +++ b/src/main/java/io/kokuwa/maven/k3s/mojo/K3sMojo.java @@ -3,15 +3,14 @@ import java.io.File; import java.nio.file.Path; +import io.kokuwa.maven.k3s.util.Docker; +import io.kokuwa.maven.k3s.util.Marker; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.logging.Log; import org.apache.maven.plugins.annotations.Parameter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.kokuwa.maven.k3s.util.Docker; -import io.kokuwa.maven.k3s.util.Marker; - /** * Base class for all mojos of this plugin. * diff --git a/src/main/java/io/kokuwa/maven/k3s/mojo/RunMojo.java b/src/main/java/io/kokuwa/maven/k3s/mojo/RunMojo.java index 38d04f9c..a4920e6e 100644 --- a/src/main/java/io/kokuwa/maven/k3s/mojo/RunMojo.java +++ b/src/main/java/io/kokuwa/maven/k3s/mojo/RunMojo.java @@ -10,13 +10,12 @@ import java.util.List; import java.util.stream.Collectors; +import io.kokuwa.maven.k3s.util.Await; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; -import io.kokuwa.maven.k3s.util.Await; - /** * Mojo for start k3s container. * diff --git a/src/main/java/io/kokuwa/maven/k3s/util/Docker.java b/src/main/java/io/kokuwa/maven/k3s/util/Docker.java index f1c03ad8..7fbcf399 100644 --- a/src/main/java/io/kokuwa/maven/k3s/util/Docker.java +++ b/src/main/java/io/kokuwa/maven/k3s/util/Docker.java @@ -10,14 +10,13 @@ import java.util.Optional; import java.util.function.Function; -import org.apache.maven.plugin.MojoExecutionException; -import org.slf4j.Logger; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.maven.plugin.MojoExecutionException; +import org.slf4j.Logger; /** * Wrapper for docker commands. diff --git a/src/test/java/io/kokuwa/maven/k3s/LifecycleTest.java b/src/test/java/io/kokuwa/maven/k3s/LifecycleTest.java index 49926c4c..62f13059 100644 --- a/src/test/java/io/kokuwa/maven/k3s/LifecycleTest.java +++ b/src/test/java/io/kokuwa/maven/k3s/LifecycleTest.java @@ -5,14 +5,13 @@ import java.io.File; import java.util.List; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; - import io.kokuwa.maven.k3s.mojo.ApplyMojo; import io.kokuwa.maven.k3s.mojo.ImageMojo; import io.kokuwa.maven.k3s.mojo.RemoveMojo; import io.kokuwa.maven.k3s.mojo.RunMojo; import io.kokuwa.maven.k3s.test.AbstractTest; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; /** * Test fof all mojos to simulate test lifecycle. diff --git a/src/test/java/io/kokuwa/maven/k3s/mojo/ApplyMojoTest.java b/src/test/java/io/kokuwa/maven/k3s/mojo/ApplyMojoTest.java index 2b430c0b..70e2ec5b 100644 --- a/src/test/java/io/kokuwa/maven/k3s/mojo/ApplyMojoTest.java +++ b/src/test/java/io/kokuwa/maven/k3s/mojo/ApplyMojoTest.java @@ -4,12 +4,11 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrowsExactly; +import io.kokuwa.maven.k3s.test.AbstractTest; import org.apache.maven.plugin.MojoExecutionException; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; -import io.kokuwa.maven.k3s.test.AbstractTest; - /** * Test for {@link ApplyMojo}. * diff --git a/src/test/java/io/kokuwa/maven/k3s/mojo/ImageMojoTest.java b/src/test/java/io/kokuwa/maven/k3s/mojo/ImageMojoTest.java index fa421204..9d29ff8f 100644 --- a/src/test/java/io/kokuwa/maven/k3s/mojo/ImageMojoTest.java +++ b/src/test/java/io/kokuwa/maven/k3s/mojo/ImageMojoTest.java @@ -12,12 +12,11 @@ import java.nio.file.StandardCopyOption; import java.util.List; +import io.kokuwa.maven.k3s.test.AbstractTest; import org.apache.maven.plugin.MojoExecutionException; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; -import io.kokuwa.maven.k3s.test.AbstractTest; - /** * Test for {@link ImageMojo}. * diff --git a/src/test/java/io/kokuwa/maven/k3s/mojo/RemoveMojoTest.java b/src/test/java/io/kokuwa/maven/k3s/mojo/RemoveMojoTest.java index 044b9c45..da9e19d5 100644 --- a/src/test/java/io/kokuwa/maven/k3s/mojo/RemoveMojoTest.java +++ b/src/test/java/io/kokuwa/maven/k3s/mojo/RemoveMojoTest.java @@ -4,12 +4,11 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import io.kokuwa.maven.k3s.test.AbstractTest; import org.apache.maven.plugin.MojoExecutionException; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; -import io.kokuwa.maven.k3s.test.AbstractTest; - /** * Test for {@link RemoveMojo}. * diff --git a/src/test/java/io/kokuwa/maven/k3s/mojo/RestartMojoTest.java b/src/test/java/io/kokuwa/maven/k3s/mojo/RestartMojoTest.java index 48a666b9..1dfc7383 100644 --- a/src/test/java/io/kokuwa/maven/k3s/mojo/RestartMojoTest.java +++ b/src/test/java/io/kokuwa/maven/k3s/mojo/RestartMojoTest.java @@ -7,12 +7,11 @@ import java.util.List; +import io.kokuwa.maven.k3s.test.AbstractTest; import org.apache.maven.plugin.MojoExecutionException; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; -import io.kokuwa.maven.k3s.test.AbstractTest; - /** * Test for {@link RestartMojo}. * diff --git a/src/test/java/io/kokuwa/maven/k3s/mojo/RunMojoTest.java b/src/test/java/io/kokuwa/maven/k3s/mojo/RunMojoTest.java index 73de461a..6fc4e170 100644 --- a/src/test/java/io/kokuwa/maven/k3s/mojo/RunMojoTest.java +++ b/src/test/java/io/kokuwa/maven/k3s/mojo/RunMojoTest.java @@ -11,15 +11,14 @@ import java.io.File; import java.util.List; -import org.apache.maven.plugin.MojoExecutionException; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; -import org.slf4j.Logger; - import io.kokuwa.maven.k3s.test.AbstractTest; import io.kokuwa.maven.k3s.test.LoggerCapturer; import io.kokuwa.maven.k3s.util.Await; import io.kokuwa.maven.k3s.util.Task; +import org.apache.maven.plugin.MojoExecutionException; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; /** * Test for {@link RunMojo}. diff --git a/src/test/java/io/kokuwa/maven/k3s/test/AbstractTest.java b/src/test/java/io/kokuwa/maven/k3s/test/AbstractTest.java index 226e477a..46f14015 100644 --- a/src/test/java/io/kokuwa/maven/k3s/test/AbstractTest.java +++ b/src/test/java/io/kokuwa/maven/k3s/test/AbstractTest.java @@ -10,6 +10,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; +import io.kokuwa.maven.k3s.util.Docker; import org.apache.maven.plugin.MojoExecutionException; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -19,8 +20,6 @@ import org.junit.jupiter.api.TestMethodOrder; import org.junit.jupiter.api.extension.ExtendWith; -import io.kokuwa.maven.k3s.util.Docker; - /** * Base class for all test cases. * diff --git a/src/test/java/io/kokuwa/maven/k3s/test/MojoExtension.java b/src/test/java/io/kokuwa/maven/k3s/test/MojoExtension.java index 55207dce..f19f6c53 100644 --- a/src/test/java/io/kokuwa/maven/k3s/test/MojoExtension.java +++ b/src/test/java/io/kokuwa/maven/k3s/test/MojoExtension.java @@ -9,6 +9,8 @@ import java.util.Set; import java.util.stream.Stream; +import io.kokuwa.maven.k3s.mojo.K3sMojo; +import io.kokuwa.maven.k3s.util.Docker; import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder; import org.junit.jupiter.api.extension.BeforeAllCallback; @@ -20,9 +22,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.kokuwa.maven.k3s.mojo.K3sMojo; -import io.kokuwa.maven.k3s.util.Docker; - /** * JUnit extension to provide prepared mojos as test parameter. * diff --git a/src/test/java/io/kokuwa/maven/k3s/util/DockerTest.java b/src/test/java/io/kokuwa/maven/k3s/util/DockerTest.java index 701f652d..9ce42b6a 100644 --- a/src/test/java/io/kokuwa/maven/k3s/util/DockerTest.java +++ b/src/test/java/io/kokuwa/maven/k3s/util/DockerTest.java @@ -12,14 +12,13 @@ import java.util.UUID; import java.util.function.BiConsumer; +import io.kokuwa.maven.k3s.test.AbstractTest; +import io.kokuwa.maven.k3s.util.Docker.Container; import org.apache.maven.plugin.MojoExecutionException; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.slf4j.Logger; -import io.kokuwa.maven.k3s.test.AbstractTest; -import io.kokuwa.maven.k3s.util.Docker.Container; - /** * Test for {@link Docker}. *