From fd774a33f1564d46968c59e60016b725e6245466 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Mon, 1 Sep 2025 11:20:03 +0200 Subject: [PATCH 1/2] org.openrewrite.maven.BestPractices --- pmd.xml | 13 ++++++++++++ pom.xml | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ rewrite.yml | 6 ++++++ 3 files changed, 79 insertions(+) create mode 100644 pmd.xml create mode 100644 rewrite.yml diff --git a/pmd.xml b/pmd.xml new file mode 100644 index 000000000000..ed9ff2f82dc4 --- /dev/null +++ b/pmd.xml @@ -0,0 +1,13 @@ + + + DefinitionOfDone + .*/Multisets.java + .*/com/google/common/reflect/A*.* + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index d1eaee8aae32..75bc17d75f25 100644 --- a/pom.xml +++ b/pom.xml @@ -130,9 +130,69 @@ + + org.apache.maven.plugins + maven-pmd-plugin + + + org.openrewrite.maven + rewrite-maven-plugin + + + org.apache.maven.plugins + maven-pmd-plugin + 3.27.0 + + true + true + true + true + + pmd.xml + + + + + verify + + check + + + + + + org.openrewrite.maven + rewrite-maven-plugin + 6.15.0 + + + DefinitionOfDone + + + package-info.java + + true + true + + + + verify + + dryRun + + + + + + org.openrewrite.recipe + rewrite-static-analysis + 2.16.0 + + + maven-antrun-plugin 1.6 diff --git a/rewrite.yml b/rewrite.yml new file mode 100644 index 000000000000..de2ff2aadc29 --- /dev/null +++ b/rewrite.yml @@ -0,0 +1,6 @@ +type: specs.openrewrite.org/v1beta/recipe +name: DefinitionOfDone +displayName: Definition of Done +description: Automatically cleanup code to comply checkstyle convention. +recipeList: + - org.openrewrite.maven.BestPractices From 881bbf09fbda29d0b96c95cf565e7fde7071b1d9 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Mon, 1 Sep 2025 11:30:18 +0200 Subject: [PATCH 2/2] Run maven BestPractices --- guava-bom/pom.xml | 10 +- guava-gwt/pom.xml | 78 +++++++++----- guava-testlib/pom.xml | 6 ++ guava-tests/pom.xml | 6 ++ guava/pom.xml | 11 +- pmd.xml | 13 --- pom.xml | 234 +++++++++++++++++------------------------- rewrite.yml | 6 -- 8 files changed, 171 insertions(+), 193 deletions(-) delete mode 100644 pmd.xml delete mode 100644 rewrite.yml diff --git a/guava-bom/pom.xml b/guava-bom/pom.xml index 64bc74cb5cd0..e1cbaa8c1e79 100644 --- a/guava-bom/pom.xml +++ b/guava-bom/pom.xml @@ -16,11 +16,6 @@ https://github.com/google/guava 2010 - - GitHub Issues - https://github.com/google/guava/issues - - Apache License, Version 2.0 @@ -29,6 +24,11 @@ + + GitHub Issues + https://github.com/google/guava/issues + + sonatype-nexus-snapshots diff --git a/guava-gwt/pom.xml b/guava-gwt/pom.xml index db9b0fedca72..adf2a40ac554 100644 --- a/guava-gwt/pom.xml +++ b/guava-gwt/pom.xml @@ -21,26 +21,6 @@ 2.10.0 WARN - - - sonatype-google-snapshots - sonatype-google-snapshots - https://oss.sonatype.org/content/repositories/google-snapshots/ - - true - - - - - - sonatype-snapshots - sonatype-snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - - true - - - com.google.guava @@ -123,6 +103,26 @@ + + + sonatype-google-snapshots + sonatype-google-snapshots + https://oss.sonatype.org/content/repositories/google-snapshots/ + + true + + + + + + sonatype-snapshots + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots/ + + true + + + @@ -130,9 +130,11 @@ toolchains-maven-plugin + org.apache.maven.plugins maven-toolchains-plugin + org.apache.maven.plugins maven-compiler-plugin @@ -150,6 +152,7 @@ + org.apache.maven.plugins maven-jar-plugin @@ -160,6 +163,7 @@ + org.apache.maven.plugins maven-source-plugin @@ -170,6 +174,7 @@ + org.apache.maven.plugins maven-javadoc-plugin @@ -184,18 +189,22 @@ + org.apache.maven.plugins maven-surefire-plugin true + org.apache.maven.plugins maven-dependency-plugin unpack-failureaccess-sources generate-resources - unpack-dependencies + + unpack-dependencies + failureaccess sources @@ -209,7 +218,9 @@ unpack-guava-sources generate-resources - unpack-dependencies + + unpack-dependencies + guava sources @@ -223,7 +234,9 @@ unpack-guava-testlib-sources generate-resources - unpack-dependencies + + unpack-dependencies + guava-testlib sources @@ -237,7 +250,9 @@ unpack-guava-testlib-test-sources generate-resources - unpack-dependencies + + unpack-dependencies + guava-testlib test-sources @@ -251,7 +266,9 @@ unpack-guava-test-sources generate-resources - unpack-dependencies + + unpack-dependencies + guava-tests test-sources @@ -297,12 +314,15 @@ + org.apache.maven.plugins maven-antrun-plugin copy-gwt-files generate-resources - run + + run + @@ -418,8 +438,10 @@ -Xms3500m -Xmx3500m -Xss1024k 1.8 - 86400 - 1440 + 86400 + + 1440 + -Dgwt.watchFileChanges=false diff --git a/guava-testlib/pom.xml b/guava-testlib/pom.xml index 8fe4208cc7f9..0a90d448b371 100644 --- a/guava-testlib/pom.xml +++ b/guava-testlib/pom.xml @@ -67,9 +67,11 @@ toolchains-maven-plugin + org.apache.maven.plugins maven-toolchains-plugin + org.apache.maven.plugins maven-compiler-plugin @@ -112,6 +114,7 @@ + org.apache.maven.plugins maven-source-plugin @@ -122,6 +125,7 @@ + org.apache.maven.plugins maven-jar-plugin @@ -135,9 +139,11 @@ animal-sniffer-maven-plugin + org.apache.maven.plugins maven-javadoc-plugin + org.apache.maven.plugins maven-surefire-plugin diff --git a/guava-tests/pom.xml b/guava-tests/pom.xml index fd0d5dd6b7ef..a00ad5f633f6 100644 --- a/guava-tests/pom.xml +++ b/guava-tests/pom.xml @@ -73,12 +73,15 @@ toolchains-maven-plugin + org.apache.maven.plugins maven-toolchains-plugin + org.apache.maven.plugins maven-compiler-plugin + org.apache.maven.plugins maven-source-plugin @@ -89,9 +92,11 @@ + org.apache.maven.plugins maven-surefire-plugin + org.apache.maven.plugins maven-jar-plugin @@ -103,6 +108,7 @@ org.sonatype.central central-publishing-maven-plugin + 0.8.0 true diff --git a/guava/pom.xml b/guava/pom.xml index 5683efcd0a10..17d8bd066337 100644 --- a/guava/pom.xml +++ b/guava/pom.xml @@ -11,12 +11,12 @@ guava bundle Guava: Google Core Libraries for Java - https://github.com/google/guava Guava is a suite of core and expanded libraries that include utility classes, Google's collections, I/O classes, and much more. + https://github.com/google/guava com.google.guava @@ -46,7 +46,8 @@ .. - LICENSE + LICENSE + proguard/* META-INF @@ -58,9 +59,11 @@ toolchains-maven-plugin + org.apache.maven.plugins maven-toolchains-plugin + org.apache.maven.plugins maven-jar-plugin @@ -98,6 +101,7 @@ + org.apache.maven.plugins maven-compiler-plugin @@ -140,6 +144,7 @@ + org.apache.maven.plugins maven-source-plugin @@ -147,6 +152,7 @@ animal-sniffer-maven-plugin + org.apache.maven.plugins maven-javadoc-plugin @@ -202,6 +208,7 @@ + org.apache.maven.plugins maven-resources-plugin diff --git a/pmd.xml b/pmd.xml deleted file mode 100644 index ed9ff2f82dc4..000000000000 --- a/pmd.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - DefinitionOfDone - .*/Multisets.java - .*/com/google/common/reflect/A*.* - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 75bc17d75f25..7df8830fa467 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 com.google.guava @@ -11,6 +11,59 @@ Guava Maven Parent Parent for guava artifacts https://github.com/google/guava + 2010 + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + kevinb9n + Kevin Bourrillion + kevinb@google.com + Google + http://www.google.com + + owner + developer + + -8 + + + + guava + guava-bom + guava-gwt + guava-testlib + guava-tests + + + scm:git:https://github.com/google/guava.git + scm:git:git@github.com:google/guava.git + https://github.com/google/guava + + + GitHub Issues + https://github.com/google/guava/issues + + + GitHub Actions + https://github.com/google/guava/actions + + + + sonatype-nexus-snapshots + https://central.sonatype.com/repository/maven-snapshots/ + + + guava-site + Guava Documentation Site + scp://dummy.server/dontinstall/usestaging + + + + src @@ -110,6 +145,7 @@ + org.apache.maven.plugins maven-enforcer-plugin @@ -130,74 +166,16 @@ - - org.apache.maven.plugins - maven-pmd-plugin - - - org.openrewrite.maven - rewrite-maven-plugin - org.apache.maven.plugins - maven-pmd-plugin - 3.27.0 - - true - true - true - true - - pmd.xml - - - - - verify - - check - - - - - - org.openrewrite.maven - rewrite-maven-plugin - 6.15.0 - - - DefinitionOfDone - - - package-info.java - - true - true - - - - verify - - dryRun - - - - - - org.openrewrite.recipe - rewrite-static-analysis - 2.16.0 - - - - maven-antrun-plugin 1.6 + org.apache.maven.plugins maven-compiler-plugin 3.13.0 @@ -276,18 +254,22 @@ + org.apache.maven.plugins maven-dependency-plugin 3.1.1 + org.apache.maven.plugins maven-enforcer-plugin 3.0.0-M3 + org.apache.maven.plugins maven-install-plugin 3.1.3 + org.apache.maven.plugins maven-jar-plugin 3.4.2 @@ -314,6 +296,7 @@ + org.apache.maven.plugins maven-javadoc-plugin 3.11.2 @@ -331,15 +314,19 @@ attach-docs - jar + + jar + + org.apache.maven.plugins maven-resources-plugin 3.3.1 + org.apache.maven.plugins maven-source-plugin 3.3.1 @@ -360,6 +347,7 @@ + org.apache.maven.plugins maven-surefire-plugin 3.3.1 @@ -386,6 +374,7 @@ + org.apache.maven.plugins maven-toolchains-plugin 3.2.0 @@ -485,47 +474,13 @@ - - - sonatype-nexus-snapshots - https://central.sonatype.com/repository/maven-snapshots/ - - - guava-site - Guava Documentation Site - scp://dummy.server/dontinstall/usestaging - - - - - - org.jspecify - jspecify - ${jspecify.version} - - - com.google.errorprone - error_prone_annotations - ${errorprone.version} - - - com.google.j2objc - j2objc-annotations - ${j2objc.version} - - - - sonatype-oss-release + org.apache.maven.plugins maven-gpg-plugin 3.0.1 @@ -600,6 +555,7 @@ + org.apache.maven.plugins maven-toolchains-plugin diff --git a/rewrite.yml b/rewrite.yml deleted file mode 100644 index de2ff2aadc29..000000000000 --- a/rewrite.yml +++ /dev/null @@ -1,6 +0,0 @@ -type: specs.openrewrite.org/v1beta/recipe -name: DefinitionOfDone -displayName: Definition of Done -description: Automatically cleanup code to comply checkstyle convention. -recipeList: - - org.openrewrite.maven.BestPractices