Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting: remove groups for org/com and add jakarta to import order #304

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
<artifactId>impsort-maven-plugin</artifactId>
<version>${version.net.revelc.code.impsort}</version>
<configuration>
<groups>java.,javax.,org.,com.</groups>
<groups>java.,javax.,jakarta.</groups>
<removeUnused>true</removeUnused>
<treatSamePackageAsUnused>true</treatSamePackageAsUnused>
</configuration>
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/io/kokuwa/maven/k3s/mojo/ApplyMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/io/kokuwa/maven/k3s/mojo/ImageMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/io/kokuwa/maven/k3s/mojo/K3sMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/io/kokuwa/maven/k3s/mojo/RunMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/io/kokuwa/maven/k3s/util/Docker.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 2 additions & 3 deletions src/test/java/io/kokuwa/maven/k3s/LifecycleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions src/test/java/io/kokuwa/maven/k3s/mojo/ApplyMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
*
Expand Down
3 changes: 1 addition & 2 deletions src/test/java/io/kokuwa/maven/k3s/mojo/ImageMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
*
Expand Down
9 changes: 4 additions & 5 deletions src/test/java/io/kokuwa/maven/k3s/mojo/RunMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
Expand Down
3 changes: 1 addition & 2 deletions src/test/java/io/kokuwa/maven/k3s/test/AbstractTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
*
Expand Down
5 changes: 2 additions & 3 deletions src/test/java/io/kokuwa/maven/k3s/test/MojoExtension.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
*
Expand Down
5 changes: 2 additions & 3 deletions src/test/java/io/kokuwa/maven/k3s/util/DockerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
*
Expand Down