From e068d422f60ae39a99e53fb4673b583dcbac11c1 Mon Sep 17 00:00:00 2001 From: Jerry Lee Date: Sun, 31 Jul 2022 13:42:12 +0800 Subject: [PATCH] chore(pom): cleanup pom: - remove dependency declaration in `dependencyManagement` when existed in `spring-boot-dependencies` - manage plugin versions in `pluginManagement` - remove default `org.apache.maven.plugins` groupId for plugins - use `maven.deploy.skip` property to simplify `maven-deploy-plugin` config --- .../resources/archetype-resources/pom.xml | 13 +- .../resources/archetype-resources/pom.xml | 13 +- cola-archetypes/pom.xml | 115 +++++++++------ cola-components/cola-components-bom/pom.xml | 1 - .../cola-normal-component-archetype/pom.xml | 3 - cola-components/pom.xml | 135 ++++++++++-------- .../craftsman/craftsman-adapter/pom.xml | 13 -- cola-samples/craftsman/craftsman-app/pom.xml | 16 +-- .../craftsman/craftsman-domain/pom.xml | 13 -- .../craftsman-infrastructure/pom.xml | 13 -- cola-samples/craftsman/pom.xml | 35 +++-- cola-samples/craftsman/start/pom.xml | 13 -- 12 files changed, 194 insertions(+), 189 deletions(-) diff --git a/cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/pom.xml b/cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/pom.xml index d376f5930..4e6447b96 100644 --- a/cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/pom.xml +++ b/cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/pom.xml @@ -127,20 +127,25 @@ - org.apache.maven.plugins maven-source-plugin 3.2.1 - org.apache.maven.plugins maven-resources-plugin - 3.2.0 + 3.3.0 - org.apache.maven.plugins maven-compiler-plugin 3.10.1 + + maven-source-plugin + 3.2.1 + + + maven-javadoc-plugin + 3.4.0 + maven-deploy-plugin diff --git a/cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/pom.xml b/cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/pom.xml index 03b49b6c5..89d6614f1 100644 --- a/cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/pom.xml +++ b/cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/pom.xml @@ -133,20 +133,25 @@ - org.apache.maven.plugins maven-source-plugin 3.2.1 - org.apache.maven.plugins maven-resources-plugin - 3.2.0 + 3.3.0 - org.apache.maven.plugins maven-compiler-plugin 3.10.1 + + maven-source-plugin + 3.2.1 + + + maven-javadoc-plugin + 3.4.0 + maven-deploy-plugin diff --git a/cola-archetypes/pom.xml b/cola-archetypes/pom.xml index e10584801..5b9fb6e1b 100644 --- a/cola-archetypes/pom.xml +++ b/cola-archetypes/pom.xml @@ -71,37 +71,61 @@ 3.2.1 - - - maven-archetype-plugin - 3.2.1 - - - org.apache.maven.plugins - maven-resources-plugin - 3.3.0 - - - org.apache.maven.plugins - maven-compiler-plugin - 3.10.1 - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.2 - - - org.apache.maven.plugins - maven-deploy-plugin - 3.0.0 - - + + + + maven-archetype-plugin + 3.2.1 + + + maven-resources-plugin + 3.3.0 + + + maven-compiler-plugin + 3.10.1 + + + maven-source-plugin + 3.2.1 + + + maven-javadoc-plugin + 3.4.0 + + + maven-gpg-plugin + 3.0.1 + + + maven-jar-plugin + 3.2.2 + + + maven-surefire-plugin + 2.22.2 + + + maven-deploy-plugin + 3.0.0 + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + + + org.jacoco + jacoco-maven-plugin + 0.8.8 + + + pl.project13.maven + git-commit-id-plugin + 4.9.10 + + + @@ -113,7 +137,7 @@ - gen-src+doc + gen-java-src performRelease @@ -123,9 +147,7 @@ - org.apache.maven.plugins maven-source-plugin - 3.2.1 attach-sources @@ -135,10 +157,21 @@ + + + + + gen-java-doc + + + performRelease + true + + + + - org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 attach-javadoc @@ -175,9 +208,7 @@ - org.apache.maven.plugins maven-gpg-plugin - 3.0.1 sign-artifacts @@ -209,7 +240,6 @@ pl.project13.maven git-commit-id-plugin - 4.9.10 get-the-git-infos @@ -234,7 +264,9 @@ true - ${project.build.outputDirectory}/META-INF/scm/${project.groupId}/${project.artifactId}/git.properties + + ${project.build.outputDirectory}/META-INF/scm/${project.groupId}/${project.artifactId}/git.properties + @@ -255,9 +287,7 @@ https://stackoverflow.com/a/18420462/922688 --> - org.apache.maven.plugins maven-enforcer-plugin - 3.1.0 enforce-jdk-versions @@ -290,7 +320,6 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.13 true ossrh diff --git a/cola-components/cola-components-bom/pom.xml b/cola-components/cola-components-bom/pom.xml index 637098353..0ff25fa48 100644 --- a/cola-components/cola-components-bom/pom.xml +++ b/cola-components/cola-components-bom/pom.xml @@ -135,7 +135,6 @@ - org.apache.maven.plugins maven-gpg-plugin 3.0.1 diff --git a/cola-components/dev-util-archetypes/cola-normal-component-archetype/pom.xml b/cola-components/dev-util-archetypes/cola-normal-component-archetype/pom.xml index 478588a7c..7c1e54cc7 100644 --- a/cola-components/dev-util-archetypes/cola-normal-component-archetype/pom.xml +++ b/cola-components/dev-util-archetypes/cola-normal-component-archetype/pom.xml @@ -20,7 +20,6 @@ - org.apache.maven.plugins maven-source-plugin 3.0.1 @@ -35,13 +34,11 @@ - org.apache.maven.plugins maven-archetype-plugin 3.0.1 - org.apache.maven.plugins maven-resources-plugin 3.0.1 diff --git a/cola-components/pom.xml b/cola-components/pom.xml index c9304636e..9cb3c66c1 100644 --- a/cola-components/pom.xml +++ b/cola-components/pom.xml @@ -70,7 +70,6 @@ 2.7.2 - 1.18.24 1.2.11 @@ -114,12 +113,6 @@ - - org.projectlombok - lombok - ${lombok.version} - provided - com.alibaba fastjson @@ -131,40 +124,17 @@ commons-cli 1.5.0 - - - javax.annotation - javax.annotation-api - 1.3.2 - provided - - - org.apache.maven.plugins - maven-resources-plugin - 3.3.0 - - - org.apache.maven.plugins - maven-compiler-plugin - 3.10.1 - - - maven-deploy-plugin - 3.0.0 - - org.apache.maven.plugins maven-enforcer-plugin - 3.1.0 @@ -180,20 +150,67 @@ - - - org.codehaus.mojo - versions-maven-plugin - 2.11.0 - - file://${maven.multiModuleProjectDirectory}/cola-component-dto/src/versions-rules.xml - - false - - + + + + maven-resources-plugin + 3.3.0 + + + maven-compiler-plugin + 3.10.1 + + + maven-source-plugin + 3.2.1 + + + maven-javadoc-plugin + 3.4.0 + + + maven-gpg-plugin + 3.0.1 + + + maven-enforcer-plugin + 3.1.0 + + + maven-deploy-plugin + 3.0.0 + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + + + org.jacoco + jacoco-maven-plugin + 0.8.8 + + + pl.project13.maven + git-commit-id-plugin + 4.9.10 + + + + org.codehaus.mojo + versions-maven-plugin + 2.11.0 + + file://${maven.multiModuleProjectDirectory}/cola-component-dto/src/versions-rules.xml + + false + + + + @@ -205,7 +222,7 @@ - gen-src+doc + gen-java-src performRelease @@ -215,9 +232,7 @@ - org.apache.maven.plugins maven-source-plugin - 3.2.1 attach-sources @@ -227,10 +242,21 @@ + + + + + gen-java-doc + + + performRelease + true + + + + - org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 attach-javadoc @@ -268,12 +294,12 @@ - - - + org.jacoco jacoco-maven-plugin - 0.8.8 @@ -303,9 +329,7 @@ - org.apache.maven.plugins maven-gpg-plugin - 3.0.1 sign-artifacts @@ -337,7 +361,6 @@ pl.project13.maven git-commit-id-plugin - 4.9.10 get-the-git-infos @@ -385,7 +408,6 @@ https://stackoverflow.com/a/18420462/922688 --> - org.apache.maven.plugins maven-enforcer-plugin @@ -418,7 +440,6 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.13 true ossrh diff --git a/cola-samples/craftsman/craftsman-adapter/pom.xml b/cola-samples/craftsman/craftsman-adapter/pom.xml index c01af6e44..bfbe277b9 100644 --- a/cola-samples/craftsman/craftsman-adapter/pom.xml +++ b/cola-samples/craftsman/craftsman-adapter/pom.xml @@ -27,17 +27,4 @@ test - - - - - - maven-deploy-plugin - - true - - - - - diff --git a/cola-samples/craftsman/craftsman-app/pom.xml b/cola-samples/craftsman/craftsman-app/pom.xml index 1ca329940..10400204d 100644 --- a/cola-samples/craftsman/craftsman-app/pom.xml +++ b/cola-samples/craftsman/craftsman-app/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 com.alibaba.craftsman @@ -40,17 +41,4 @@ - - - - - - maven-deploy-plugin - - true - - - - - diff --git a/cola-samples/craftsman/craftsman-domain/pom.xml b/cola-samples/craftsman/craftsman-domain/pom.xml index 00bf07072..e222dd180 100644 --- a/cola-samples/craftsman/craftsman-domain/pom.xml +++ b/cola-samples/craftsman/craftsman-domain/pom.xml @@ -36,17 +36,4 @@ fastjson - - - - - - maven-deploy-plugin - - true - - - - - diff --git a/cola-samples/craftsman/craftsman-infrastructure/pom.xml b/cola-samples/craftsman/craftsman-infrastructure/pom.xml index 8f557e218..14183f696 100644 --- a/cola-samples/craftsman/craftsman-infrastructure/pom.xml +++ b/cola-samples/craftsman/craftsman-infrastructure/pom.xml @@ -40,17 +40,4 @@ spring-boot-starter-test - - - - - - maven-deploy-plugin - - true - - - - - diff --git a/cola-samples/craftsman/pom.xml b/cola-samples/craftsman/pom.xml index 282ee1d26..8f0a13812 100644 --- a/cola-samples/craftsman/pom.xml +++ b/cola-samples/craftsman/pom.xml @@ -14,6 +14,7 @@ ${maven.compiler.source} UTF-8 UTF-8 + true 4.3.0-SNAPSHOT @@ -133,25 +134,28 @@ - org.apache.maven.plugins maven-source-plugin 3.2.1 - org.apache.maven.plugins maven-resources-plugin 3.3.0 - org.apache.maven.plugins maven-compiler-plugin 3.10.1 + + maven-source-plugin + 3.2.1 + + + maven-javadoc-plugin + 3.4.0 + maven-deploy-plugin - - true - + 3.0.0 org.springframework.boot @@ -164,7 +168,7 @@ - gen-src+doc + gen-java-src performRelease @@ -174,9 +178,7 @@ - org.apache.maven.plugins maven-source-plugin - 3.2.1 attach-sources @@ -186,10 +188,21 @@ + + + + + gen-java-doc + + + performRelease + true + + + + - org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 attach-javadoc diff --git a/cola-samples/craftsman/start/pom.xml b/cola-samples/craftsman/start/pom.xml index 87342fe81..046900289 100644 --- a/cola-samples/craftsman/start/pom.xml +++ b/cola-samples/craftsman/start/pom.xml @@ -31,17 +31,4 @@ spring-boot-starter - - - - - - maven-deploy-plugin - - true - - - - -