From 1d08702ae5c67a4c46679493cc0b4b76f2005d99 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Tue, 24 Sep 2024 11:23:16 +0200 Subject: [PATCH 1/2] Move maven plugin version to plugin management section. --- pom.xml | 515 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 322 insertions(+), 193 deletions(-) diff --git a/pom.xml b/pom.xml index cb7d60a4..a8030be8 100644 --- a/pom.xml +++ b/pom.xml @@ -77,15 +77,16 @@ 1.3.0 - 3.1.2 - 3.12.1 - 3.1.2 - 3.3.2 + 3.1.3 + 3.20.0 + 3.1.3 + 3.4.0 3.13.0 3.10.0 3.3.1 3.3.1 3.5.0 + 3.5.0 3.4.2 3.25.0 7.5.0 @@ -109,6 +110,8 @@ 3.8.0 4.0.3 4.0.0 + 9.0.1 + 10.0.4 5.40.2 @@ -123,17 +126,12 @@ - - com.uber.nullaway - nullaway - ${nullaway.version} - + net.bytebuddy byte-buddy ${byte-buddy.version} - org.junit @@ -210,8 +208,8 @@ test - slf4j-api org.slf4j + slf4j-api @@ -221,6 +219,8 @@ ${slf4j.version} test + + com.google.code.findbugs jsr305 @@ -243,30 +243,116 @@ - org.pitest - pitest-maven - ${maven-pitest-plugin.version} + com.github.ekryd.sortpom + sortpom-maven-plugin + ${sortpom-maven-plugin.version} - XML,HTML - - *equals - *hashCode - *toString - + false + true + false + groupId,artifactId + true - - - org.pitest - pitest-junit5-plugin - ${pitest-junit5-plugin.version} - - + + + io.github.git-commit-id + git-commit-id-maven-plugin + ${git-commit-id-maven-plugin.version} + + true + ${project.build.outputDirectory}/git.properties + + ^git.build.(time|version)$ + ^git.commit.id.(abbrev|full)$ + + full + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} org.apache.maven.plugins maven-dependency-plugin ${maven-dependency-plugin.version} + + org.apache.maven.plugins + maven-enforcer-plugin + ${maven-enforcer-plugin.version} + + + org.apache.maven.plugins + maven-failsafe-plugin + ${maven-failsafe-plugin.version} + + + org.apache.maven.plugins + maven-jar-plugin + ${maven-jar-plugin.version} + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + ${java.version} + all,-missing + true + + + + org.apache.maven.plugins + maven-pmd-plugin + ${maven-pmd-plugin.version} + + + org.apache.maven.plugins + maven-release-plugin + ${maven-release-plugin.version} + + true + false + release + deploy + v@{project.version} + + + + org.apache.maven.plugins + maven-resources-plugin + ${maven-resources-plugin.version} + + ${source.encoding} + + + + org.apache.maven.plugins + maven-source-plugin + ${maven-source-plugin.version} + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + org.assertj + assertj-assertions-generator-maven-plugin + ${assertj-assertions-generator-maven-plugin.version} + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + org.openrewrite.maven rewrite-maven-plugin @@ -279,6 +365,8 @@ org.openrewrite.maven.BestPractices + org.openrewrite.maven.ManageDependencies + org.openrewrite.maven.RemoveRedundantDependencyVersions org.openrewrite.staticanalysis.MissingOverrideAnnotation org.openrewrite.staticanalysis.CommonStaticAnalysis org.openrewrite.staticanalysis.RemoveExtraSemicolons @@ -316,61 +404,144 @@ - com.github.ekryd.sortpom - sortpom-maven-plugin - ${sortpom-maven-plugin.version} + org.pitest + pitest-maven + ${maven-pitest-plugin.version} + + XML,HTML + + *equals + *hashCode + *toString + + + + + org.pitest + pitest-junit5-plugin + ${pitest-junit5-plugin.version} + + + + + org.revapi + revapi-maven-plugin + ${revapi-maven-plugin.version} + + + org.sonatype.plugins + nexus-staging-maven-plugin + ${nexus-staging-maven-plugin.version} + true + + ossrh + https://s01.oss.sonatype.org/ + true + 15 + - org.apache.maven.plugins - maven-enforcer-plugin - ${maven-enforcer-plugin.version} + com.github.spotbugs + spotbugs-maven-plugin + ${spotbugs-maven-plugin.version} + + true + Low + Low + Max + false + true + etc/spotbugs-exclusion-filter.xml + true + + + com.h3xstream.findsecbugs + findsecbugs-plugin + ${findsecbugs-plugin.version} + + + + + + com.github.spotbugs + spotbugs + ${spotbugs.version} + + - enforce-java + run-spotbugs - enforce + check - - - - 11 - - - + verify - org.apache.maven.plugins - maven-release-plugin - ${maven-release-plugin.version} - - true - false - release - deploy - v@{project.version} - + io.github.git-commit-id + git-commit-id-maven-plugin + + + get-the-git-infos + + revision + + initialize + + - org.sonatype.plugins - nexus-staging-maven-plugin - ${nexus-staging-maven-plugin.version} - true + org.apache.maven.plugins + maven-checkstyle-plugin - ossrh - https://s01.oss.sonatype.org/ - true - 15 + false + true + warning + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + + + run-checkstyle-java + + check + + verify + + **/module-info.java + false + etc/checkstyle-java-configuration.xml + ${project.build.directory}/checkstyle-java/checkstyle-result.xml + + + + run-checkstyle-tests + + check + + verify + + **/*Assert*.java,**/*_jmh*,**/module-info.java + true + etc/checkstyle-tests-configuration.xml + ${project.build.directory}/checkstyle-tests/checkstyle-result.xml + + + + org.apache.maven.plugins maven-compiler-plugin - ${maven-compiler-plugin.version} ${java.version} @@ -422,6 +593,10 @@ NullAway configuration: --> -XepOpt:NullAway:AnnotatedPackages=edu.hm.hafner -Xep:PreferredInterfaceType:OFF -Xep:YodaCondition:OFF -Xep:ReturnMissingNullable:OFF -Xep:CannotMockFinalMethod:OFF - - junit - junit - 4.13.2 - - + org.apache.maven.plugins + maven-javadoc-plugin + attach-javadocs - generate-assertions + jar @@ -611,7 +740,6 @@ org.apache.maven.plugins maven-pmd-plugin - ${maven-pmd-plugin.version} false ${java.version} @@ -680,92 +808,89 @@ org.apache.maven.plugins - maven-checkstyle-plugin - ${maven-checkstyle-plugin.version} - - false - true - warning - - - - com.puppycrawl.tools - checkstyle - ${checkstyle.version} - - + maven-release-plugin + + + org.apache.maven.plugins + maven-resources-plugin + + + org.apache.maven.plugins + maven-source-plugin - run-checkstyle-java - - check - - verify - - **/module-info.java - false - etc/checkstyle-java-configuration.xml - ${project.build.directory}/checkstyle-java/checkstyle-result.xml - - - - run-checkstyle-tests + attach-sources - check + jar - verify - - **/*Assert*.java,**/*_jmh*,**/module-info.java - true - etc/checkstyle-tests-configuration.xml - ${project.build.directory}/checkstyle-tests/checkstyle-result.xml - - - com.github.spotbugs - spotbugs-maven-plugin - ${spotbugs-maven-plugin.version} + org.apache.maven.plugins + maven-surefire-plugin - true - Low - Low - Max - false - true - etc/spotbugs-exclusion-filter.xml - true - - - com.h3xstream.findsecbugs - findsecbugs-plugin - ${findsecbugs-plugin.version} - - + false + + + **/*ITest.* + **/*ArchitectureRulesTest$* + - com.github.spotbugs - spotbugs - ${spotbugs.version} + com.tngtech.archunit + archunit-junit5-engine + ${archunit.version} + + + + + org.assertj + assertj-assertions-generator-maven-plugin + + true + true + false + false + false + true + + ${project.basedir}/etc/assertj-templates/ + assertions_entry_point_class_template.txt + soft_assertions_entry_point_class_template.txt + has_assertion_template.txt + assertion_class_template.txt + + + edu.hm.hafner.util + + edu.hm.hafner.util.assertions + + .*Test + .*Condition + .*LineRangeList + + + + + + junit + junit + 4.13.2 - run-spotbugs - check + generate-assertions - verify org.jacoco jacoco-maven-plugin - ${jacoco-maven-plugin.version} @@ -785,7 +910,6 @@ org.revapi revapi-maven-plugin - ${revapi-maven-plugin.version} true [-0-9.]* @@ -869,6 +993,11 @@ + + org.sonatype.plugins + nexus-staging-maven-plugin + true + @@ -922,7 +1051,7 @@ org.owasp dependency-check-maven - 10.0.4 + ${dependency-check-maven.version} NVD_API_KEY JSON From 486e191daa5dab2d36bff70cc11f5ebec3907dbd Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Tue, 24 Sep 2024 11:38:25 +0200 Subject: [PATCH 2/2] Move maven plugin version in profiles to plugin management section. --- pom.xml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index a8030be8..14207e33 100644 --- a/pom.xml +++ b/pom.xml @@ -254,6 +254,16 @@ true + + com.github.ferstl + depgraph-maven-plugin + ${depgraph-maven-plugin.version} + + + com.github.spotbugs + spotbugs-maven-plugin + ${spotbugs-maven-plugin.version} + io.github.git-commit-id git-commit-id-maven-plugin @@ -293,6 +303,11 @@ maven-failsafe-plugin ${maven-failsafe-plugin.version} + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + org.apache.maven.plugins maven-jar-plugin @@ -365,7 +380,6 @@ org.openrewrite.maven.BestPractices - org.openrewrite.maven.ManageDependencies org.openrewrite.maven.RemoveRedundantDependencyVersions org.openrewrite.staticanalysis.MissingOverrideAnnotation org.openrewrite.staticanalysis.CommonStaticAnalysis @@ -403,12 +417,20 @@ + + org.owasp + dependency-check-maven + ${dependency-check-maven.version} + org.pitest pitest-maven ${maven-pitest-plugin.version} XML,HTML + + *ITest + *equals *hashCode @@ -446,7 +468,6 @@ com.github.spotbugs spotbugs-maven-plugin - ${spotbugs-maven-plugin.version} true Low @@ -1051,7 +1072,6 @@ org.owasp dependency-check-maven - ${dependency-check-maven.version} NVD_API_KEY JSON @@ -1074,7 +1094,6 @@ com.github.ferstl depgraph-maven-plugin - ${depgraph-maven-plugin.version} puml compile @@ -1104,7 +1123,6 @@ org.apache.maven.plugins maven-gpg-plugin - ${maven-gpg-plugin.version} sign-artifacts