From 92d629750b62b6aca987a49df3f6fb9568bc6ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Miller=20=28=E9=94=BA=E4=BF=8A=29?= Date: Mon, 4 Apr 2022 20:07:47 +0800 Subject: [PATCH] feat($JaCoCo): integrate JaCoCo for code coverage report integrate JaCoCo for code coverage report BREAKING CHANGE: integrate JaCoCo for code coverage report; refine global Maven dependencies --- api-gateway/api-gateway-bootstrap/pom.xml | 64 +-------------- api-gateway/pom.xml | 11 --- auth-center/auth-center-bootstrap/pom.xml | 65 +-------------- auth-center/pom.xml | 15 +--- maf-mis/maf-mis-bootstrap/pom.xml | 64 +-------------- maf-mis/pom.xml | 11 --- oss-center/oss-center-bootstrap/pom.xml | 65 +-------------- oss-center/pom.xml | 11 --- pom.xml | 81 +++++++++++++++++++ spring-boot-admin/pom.xml | 13 --- .../spring-boot-admin-bootstrap/pom.xml | 64 +-------------- spring-cloud-starter/pom.xml | 12 --- 12 files changed, 88 insertions(+), 388 deletions(-) diff --git a/api-gateway/api-gateway-bootstrap/pom.xml b/api-gateway/api-gateway-bootstrap/pom.xml index 1d5c583a..75a3a657 100644 --- a/api-gateway/api-gateway-bootstrap/pom.xml +++ b/api-gateway/api-gateway-bootstrap/pom.xml @@ -30,44 +30,6 @@ - - org.apache.maven.plugins - maven-pmd-plugin - ${maven-pmd-plugin.version} - - ${project.build.sourceEncoding} - ${java.version} - true - - rulesets/java/ali-comment.xml - rulesets/java/ali-concurrent.xml - rulesets/java/ali-constant.xml - rulesets/java/ali-exception.xml - rulesets/java/ali-flowcontrol.xml - rulesets/java/ali-naming.xml - rulesets/java/ali-oop.xml - rulesets/java/ali-orm.xml - rulesets/java/ali-other.xml - rulesets/java/ali-set.xml - - - - - verify - - check - - - - - - com.alibaba.p3c - p3c-pmd - ${p3c-pmd.version} - - - - com.google.cloud.tools @@ -106,6 +68,7 @@ docker.io/ijohnnymiller/${project.baseArtifactId}.${project.parent.artifactId} + ${git.commit.id.abbrev}-${project.version} @@ -132,31 +95,6 @@ - - - - io.github.git-commit-id - git-commit-id-maven-plugin - 5.0.0 - - - get-the-git-info - - revision - - initialize - - - - true - ${project.build.outputDirectory}/git.properties - - ^git.build.(time|version)$ - ^git.commit.id.(abbrev|full)$ - - full - - diff --git a/api-gateway/pom.xml b/api-gateway/pom.xml index 17d4a285..842c2518 100644 --- a/api-gateway/pom.xml +++ b/api-gateway/pom.xml @@ -82,17 +82,6 @@ - - org.springframework.boot - spring-boot-starter-test - test - - - org.junit.vintage - junit-vintage-engine - - - io.projectreactor reactor-test diff --git a/auth-center/auth-center-bootstrap/pom.xml b/auth-center/auth-center-bootstrap/pom.xml index f8d88477..be9dbc23 100644 --- a/auth-center/auth-center-bootstrap/pom.xml +++ b/auth-center/auth-center-bootstrap/pom.xml @@ -30,44 +30,6 @@ - - org.apache.maven.plugins - maven-pmd-plugin - ${maven-pmd-plugin.version} - - ${project.build.sourceEncoding} - ${java.version} - true - - rulesets/java/ali-comment.xml - rulesets/java/ali-concurrent.xml - rulesets/java/ali-constant.xml - rulesets/java/ali-exception.xml - rulesets/java/ali-flowcontrol.xml - rulesets/java/ali-naming.xml - rulesets/java/ali-oop.xml - rulesets/java/ali-orm.xml - rulesets/java/ali-other.xml - rulesets/java/ali-set.xml - - - - - verify - - check - - - - - - com.alibaba.p3c - p3c-pmd - ${p3c-pmd.version} - - - - com.google.cloud.tools @@ -106,6 +68,7 @@ docker.io/ijohnnymiller/${project.baseArtifactId}.${project.parent.artifactId} + ${git.commit.id.abbrev}-${project.version} @@ -132,32 +95,6 @@ - - - - io.github.git-commit-id - git-commit-id-maven-plugin - 5.0.0 - - - get-the-git-info - - revision - - initialize - - - - true - ${project.build.outputDirectory}/git.properties - - - ^git.build.(time|version)$ - ^git.commit.id.(abbrev|full)$ - - full - - diff --git a/auth-center/pom.xml b/auth-center/pom.xml index d192dc4a..47c3ef66 100644 --- a/auth-center/pom.xml +++ b/auth-center/pom.xml @@ -101,25 +101,14 @@ spring-boot-starter-reactor-netty - org.springframework.boot - spring-boot-starter-test - test - - - org.junit.vintage - junit-vintage-engine - - + org.springframework + spring-test org.mockito mockito-inline test - - org.springframework - spring-test - diff --git a/maf-mis/maf-mis-bootstrap/pom.xml b/maf-mis/maf-mis-bootstrap/pom.xml index 71c585c5..5dfd774a 100644 --- a/maf-mis/maf-mis-bootstrap/pom.xml +++ b/maf-mis/maf-mis-bootstrap/pom.xml @@ -31,44 +31,6 @@ - - org.apache.maven.plugins - maven-pmd-plugin - ${maven-pmd-plugin.version} - - ${project.build.sourceEncoding} - ${java.version} - true - - rulesets/java/ali-comment.xml - rulesets/java/ali-concurrent.xml - rulesets/java/ali-constant.xml - rulesets/java/ali-exception.xml - rulesets/java/ali-flowcontrol.xml - rulesets/java/ali-naming.xml - rulesets/java/ali-oop.xml - rulesets/java/ali-orm.xml - rulesets/java/ali-other.xml - rulesets/java/ali-set.xml - - - - - verify - - check - - - - - - com.alibaba.p3c - p3c-pmd - ${p3c-pmd.version} - - - - com.google.cloud.tools @@ -107,6 +69,7 @@ docker.io/ijohnnymiller/${project.baseArtifactId}.${project.parent.artifactId} + ${git.commit.id.abbrev}-${project.version} @@ -133,31 +96,6 @@ - - - - io.github.git-commit-id - git-commit-id-maven-plugin - 5.0.0 - - - get-the-git-info - - revision - - initialize - - - - true - ${project.build.outputDirectory}/git.properties - - ^git.build.(time|version)$ - ^git.commit.id.(abbrev|full)$ - - full - - diff --git a/maf-mis/pom.xml b/maf-mis/pom.xml index c83411ad..2845ca0e 100644 --- a/maf-mis/pom.xml +++ b/maf-mis/pom.xml @@ -100,17 +100,6 @@ org.springframework.boot spring-boot-starter-reactor-netty - - org.springframework.boot - spring-boot-starter-test - test - - - org.junit.vintage - junit-vintage-engine - - - org.springframework spring-test diff --git a/oss-center/oss-center-bootstrap/pom.xml b/oss-center/oss-center-bootstrap/pom.xml index 375d566e..d95583ad 100644 --- a/oss-center/oss-center-bootstrap/pom.xml +++ b/oss-center/oss-center-bootstrap/pom.xml @@ -31,44 +31,6 @@ - - org.apache.maven.plugins - maven-pmd-plugin - ${maven-pmd-plugin.version} - - ${project.build.sourceEncoding} - ${java.version} - true - - rulesets/java/ali-comment.xml - rulesets/java/ali-concurrent.xml - rulesets/java/ali-constant.xml - rulesets/java/ali-exception.xml - rulesets/java/ali-flowcontrol.xml - rulesets/java/ali-naming.xml - rulesets/java/ali-oop.xml - rulesets/java/ali-orm.xml - rulesets/java/ali-other.xml - rulesets/java/ali-set.xml - - - - - verify - - check - - - - - - com.alibaba.p3c - p3c-pmd - ${p3c-pmd.version} - - - - com.google.cloud.tools @@ -107,6 +69,7 @@ docker.io/ijohnnymiller/${project.baseArtifactId}.${project.parent.artifactId} + ${git.commit.id.abbrev}-${project.version} @@ -133,32 +96,6 @@ - - - - io.github.git-commit-id - git-commit-id-maven-plugin - 5.0.0 - - - get-the-git-info - - revision - - initialize - - - - true - ${project.build.outputDirectory}/git.properties - - - ^git.build.(time|version)$ - ^git.commit.id.(abbrev|full)$ - - full - - diff --git a/oss-center/pom.xml b/oss-center/pom.xml index 3acfb389..100c45b4 100644 --- a/oss-center/pom.xml +++ b/oss-center/pom.xml @@ -70,17 +70,6 @@ org.springframework.boot spring-boot-starter-data-redis - - org.springframework.boot - spring-boot-starter-test - test - - - org.junit.vintage - junit-vintage-engine - - - diff --git a/pom.xml b/pom.xml index 37b1d3c5..ff5e833c 100644 --- a/pom.xml +++ b/pom.xml @@ -70,6 +70,7 @@ 2.3.0 1.4.2.Final 0.2.0 + 0.8.7 @@ -278,6 +279,65 @@ + + + org.apache.maven.plugins + maven-pmd-plugin + ${maven-pmd-plugin.version} + + ${project.build.sourceEncoding} + ${java.version} + true + + rulesets/java/ali-comment.xml + rulesets/java/ali-concurrent.xml + rulesets/java/ali-constant.xml + rulesets/java/ali-exception.xml + rulesets/java/ali-flowcontrol.xml + rulesets/java/ali-naming.xml + rulesets/java/ali-oop.xml + rulesets/java/ali-orm.xml + rulesets/java/ali-other.xml + rulesets/java/ali-set.xml + + + + + verify + + check + + + + + + com.alibaba.p3c + p3c-pmd + ${p3c-pmd.version} + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + default-prepare-agent + + prepare-agent + + + + default-report + verify + + report + + + + @@ -371,5 +431,26 @@ mapstruct ${mapstruct.version} + + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + + org.jacoco + org.jacoco.agent + runtime + ${jacoco.version} + test + diff --git a/spring-boot-admin/pom.xml b/spring-boot-admin/pom.xml index c35e834b..f7ad2f94 100644 --- a/spring-boot-admin/pom.xml +++ b/spring-boot-admin/pom.xml @@ -35,19 +35,6 @@ spring-cloud-starter - - - org.springframework.boot - spring-boot-starter-test - test - - - org.junit.vintage - junit-vintage-engine - - - - de.codecentric spring-boot-admin-starter-server diff --git a/spring-boot-admin/spring-boot-admin-bootstrap/pom.xml b/spring-boot-admin/spring-boot-admin-bootstrap/pom.xml index fbc28a2d..f163977f 100644 --- a/spring-boot-admin/spring-boot-admin-bootstrap/pom.xml +++ b/spring-boot-admin/spring-boot-admin-bootstrap/pom.xml @@ -30,44 +30,6 @@ - - org.apache.maven.plugins - maven-pmd-plugin - ${maven-pmd-plugin.version} - - ${project.build.sourceEncoding} - ${java.version} - true - - rulesets/java/ali-comment.xml - rulesets/java/ali-concurrent.xml - rulesets/java/ali-constant.xml - rulesets/java/ali-exception.xml - rulesets/java/ali-flowcontrol.xml - rulesets/java/ali-naming.xml - rulesets/java/ali-oop.xml - rulesets/java/ali-orm.xml - rulesets/java/ali-other.xml - rulesets/java/ali-set.xml - - - - - verify - - check - - - - - - com.alibaba.p3c - p3c-pmd - ${p3c-pmd.version} - - - - com.google.cloud.tools @@ -106,6 +68,7 @@ docker.io/ijohnnymiller/${project.baseArtifactId}.${project.parent.artifactId} + ${git.commit.id.abbrev}-${project.version} @@ -132,31 +95,6 @@ - - - - io.github.git-commit-id - git-commit-id-maven-plugin - 5.0.0 - - - get-the-git-info - - revision - - initialize - - - - true - ${project.build.outputDirectory}/git.properties - - ^git.build.(time|version)$ - ^git.commit.id.(abbrev|full)$ - - full - - diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml index ee249881..c4dba937 100644 --- a/spring-cloud-starter/pom.xml +++ b/spring-cloud-starter/pom.xml @@ -81,18 +81,6 @@ spring-boot-autoconfigure-processor true - - org.springframework.boot - spring-boot-starter-test - provided - true - - - org.junit.vintage - junit-vintage-engine - - -