From 6d4aa841a919f47e86b1e63d4546fb94078342ac Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Thu, 4 May 2023 01:05:04 +0200 Subject: [PATCH 1/4] Add spotless plugin configuration --- pom.xml | 78 ++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 66 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 492870669..00677dc13 100644 --- a/pom.xml +++ b/pom.xml @@ -332,6 +332,7 @@ limitations under the License. https://oss.sonatype.org/content/repositories/plexus-snapshots 2022-06-09T20:48:10Z true + 2.35.0 3.8.2 1.11.2 5.9.3 @@ -549,6 +550,41 @@ limitations under the License. + + com.diffplug.spotless + spotless-maven-plugin + ${spotless-maven-plugin.version} + + + + + + + + javax,java,,\# + + + + + false + + true + + + + true + + + + + spotless-check + + check + + process-sources + + + @@ -640,18 +676,6 @@ limitations under the License. org.apache.maven.plugins maven-surefire-report-plugin - - org.apache.maven.plugins - maven-checkstyle-plugin - - - default - - checkstyle - - - - org.apache.maven.plugins maven-pmd-plugin @@ -763,5 +787,35 @@ limitations under the License. + + + java11+ + + [11,) + + + + ${javaVersion} + + config/maven_checks_nocodestyle.xml + + + + + + + com.diffplug.spotless + spotless-maven-plugin + + + org.apache.maven.plugins + maven-checkstyle-plugin + + ${checkstyle.spotless.config} + + + + + From b49a9f2943443546e62b6e8f0925ea646444bad3 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Tue, 16 May 2023 11:33:28 +0200 Subject: [PATCH 2/4] Update to latest plugin --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9ca6ffb18..05e5ddaac 100644 --- a/pom.xml +++ b/pom.xml @@ -332,7 +332,7 @@ limitations under the License. https://oss.sonatype.org/content/repositories/plexus-snapshots 2023-05-06T22:13:46Z true - 2.35.0 + 2.36.0 3.8.2 1.11.2 5.9.3 From 40f4fcd88f55f0cfaad907855eeb605e6febdb2e Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Tue, 16 May 2023 11:34:28 +0200 Subject: [PATCH 3/4] Use two profiles for spotless --- pom.xml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 05e5ddaac..aa87d1606 100644 --- a/pom.xml +++ b/pom.xml @@ -336,6 +336,7 @@ limitations under the License. 3.8.2 1.11.2 5.9.3 + check @@ -580,7 +581,7 @@ limitations under the License. spotless-check - check + ${spotless.action} process-sources @@ -818,5 +819,27 @@ limitations under the License. + + format-check + + + !format + + + + check + + + + format + + + format + + + + apply + + From c5f201adbddec6c77dd19e6140c799d0790ce7a6 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Tue, 16 May 2023 11:34:36 +0200 Subject: [PATCH 4/4] Fix format --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index aa87d1606..4b13b505c 100644 --- a/pom.xml +++ b/pom.xml @@ -426,7 +426,8 @@ limitations under the License. true en - true + + true