From 27ec3bec79e13e0a543740225bb6ec7dbe19155b Mon Sep 17 00:00:00 2001 From: VK-SMILECDR <88211153+VK-SMILECDR@users.noreply.github.com> Date: Wed, 2 Nov 2022 15:34:27 -0400 Subject: [PATCH] code coverage needs to run only for JACOCO PROFILE (#4230) * code coverage needs to run only for JACOCO PROFILE * remove ALLMODULES profile since it is default now --- .../uhn/fhir/checks/HapiErrorCodeCheck.java | 2 +- .../ca/uhn/hapi/fhir/docs/appendix/faq.md | 2 +- .../fhir/docs/contributing/hacking_guide.md | 2 +- hapi-fhir-jacoco/pom.xml | 345 +++++++++--------- lgtm.yml | 2 +- pom.xml | 213 ++++++----- release-pipeline.yml | 2 +- snapshot-pipeline.yml | 4 +- test-job-template.yml | 6 +- 9 files changed, 289 insertions(+), 289 deletions(-) diff --git a/hapi-fhir-checkstyle/src/main/java/ca/uhn/fhir/checks/HapiErrorCodeCheck.java b/hapi-fhir-checkstyle/src/main/java/ca/uhn/fhir/checks/HapiErrorCodeCheck.java index 8494b29e4ff6..60b1cacf1877 100644 --- a/hapi-fhir-checkstyle/src/main/java/ca/uhn/fhir/checks/HapiErrorCodeCheck.java +++ b/hapi-fhir-checkstyle/src/main/java/ca/uhn/fhir/checks/HapiErrorCodeCheck.java @@ -11,7 +11,7 @@ import java.util.Map; /** - * mvn -P CI,ALLMODULES checkstyle:check + * mvn -P CI checkstyle:check */ @StatelessCheck public final class HapiErrorCodeCheck extends AbstractCheck { diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/appendix/faq.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/appendix/faq.md index eda0434ec2bc..eb3697b9967c 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/appendix/faq.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/appendix/faq.md @@ -41,7 +41,7 @@ Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:tes This typically means that your build is running out of memory. HAPI's unit tests execute by default in multiple threads (the thread count is determined by the number of CPU cores available) so in an environment with lots of cores but not enough RAM, you may run out. If you are getting this error, try executing the build with the following arguments: ``` -mvn -P ALLMODULES,NOPARALLEL install +mvn -P NOPARALLEL install ``` See [Hacking HAPI FHIR](/docs/contributing/hacking_guide.html) for more information on the build process. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/contributing/hacking_guide.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/contributing/hacking_guide.md index b616f4ceff74..f1ad41ae49e9 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/contributing/hacking_guide.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/contributing/hacking_guide.md @@ -66,7 +66,7 @@ If the build fails to execute successfully, try the following: * If the build fails with memory issues (or mysteriously dies during unit tests), your build environment may be running out of memory. By default, the HAPI build executes unit tests in multiple parallel JVMs in order to save time. This can consume a lot of RAM and sometimes causes issues. Try executing with the following command to disable this behaviour: ```bash - mvn -P ALLMODULES,NOPARALLEL install + mvn -P NOPARALLEL install ``` * If you figure something else out, please let us know so that we can add it to this list! diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml index d43c4d575887..f5efb715ded4 100644 --- a/hapi-fhir-jacoco/pom.xml +++ b/hapi-fhir-jacoco/pom.xml @@ -17,180 +17,181 @@ hapi-fhir-jacoco jar - HAPI FHIR - JaCoCo Test Coverage - - - ca.uhn.hapi.fhir - hapi-fhir-base - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-server - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-server-mdm - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-server-openapi - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-client - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu2 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu3 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-r4 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-r5 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-hl7org-dstu2 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-validation - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-validation-resources-dstu2 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-validation-resources-dstu3 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-base - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-test-utilities - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-test-dstu2 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-test-dstu3 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-test-r4 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-test-r4b - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-test-r5 - ${project.version} - - - - - - ca.uhn.hapi.fhir - hapi-fhir-client-okhttp - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-subscription - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-searchparam - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-model - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-mdm - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-storage - ${project.version} - - - - - - - - - - org.jacoco - jacoco-maven-plugin - - - post-integration-test - verify - - report-aggregate - + + + JACOCO + + false + + + + + org.jacoco + jacoco-maven-plugin + + + post-integration-test + verify + + report-aggregate + + + ${project.reporting.outputDirectory}/jacoco-report + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin - ${project.reporting.outputDirectory}/jacoco-report + true - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - true - - - - + + + + + + ca.uhn.hapi.fhir + hapi-fhir-base + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-server + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-server-mdm + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-server-openapi + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-client + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-structures-dstu2 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-structures-dstu3 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-structures-r4 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-structures-r5 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-structures-hl7org-dstu2 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-validation + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-validation-resources-dstu2 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-validation-resources-dstu3 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-base + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-test-utilities + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-test-dstu2 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-test-dstu3 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-test-r4 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-test-r4b + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-test-r5 + ${project.version} + + + + + ca.uhn.hapi.fhir + hapi-fhir-client-okhttp + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-subscription + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-searchparam + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-model + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-mdm + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-storage + ${project.version} + + + + diff --git a/lgtm.yml b/lgtm.yml index c43e5aa14abd..42a03ea9ed01 100644 --- a/lgtm.yml +++ b/lgtm.yml @@ -6,5 +6,5 @@ extraction: maven: version: 3.8.4 build_command: - - mvn -P ALLMODULES,LGTM -Dmaven.test.skip install + - mvn -P LGTM -Dmaven.test.skip install diff --git a/pom.xml b/pom.xml index be98dd3f52a4..8eadeea9c1fa 100644 --- a/pom.xml +++ b/pom.xml @@ -57,6 +57,68 @@ + + hapi-fhir-checkstyle + hapi-fhir-bom + hapi-deployable-pom + hapi-fhir-base + hapi-fhir-docs + hapi-fhir-test-utilities + hapi-fhir-jpaserver-test-utilities + hapi-fhir-jpaserver-test-dstu2 + hapi-fhir-jpaserver-test-dstu3 + hapi-fhir-jpaserver-test-r4 + hapi-fhir-jpaserver-test-r4b + hapi-fhir-jpaserver-test-r5 + hapi-fhir-jpaserver-elastic-test-utilities + hapi-tinder-plugin + hapi-tinder-test + hapi-fhir-client + hapi-fhir-server + hapi-fhir-server-mdm + hapi-fhir-server-openapi + hapi-fhir-converter + hapi-fhir-validation + hapi-fhir-structures-dstu2 + hapi-fhir-structures-hl7org-dstu2 + hapi-fhir-validation-resources-dstu2 + hapi-fhir-structures-dstu2.1 + hapi-fhir-validation-resources-dstu2.1 + hapi-fhir-structures-dstu3 + hapi-fhir-validation-resources-dstu3 + hapi-fhir-structures-r4 + hapi-fhir-validation-resources-r4 + hapi-fhir-structures-r4b + hapi-fhir-structures-r5 + hapi-fhir-validation-resources-r5 + hapi-fhir-jpa + hapi-fhir-storage + hapi-fhir-storage-batch2 + hapi-fhir-storage-batch2-jobs + hapi-fhir-storage-mdm + hapi-fhir-storage-test-utilities + hapi-fhir-jpaserver-cql + hapi-fhir-jpaserver-model + hapi-fhir-jpaserver-searchparam + hapi-fhir-jpaserver-subscription + hapi-fhir-jaxrsserver-base + hapi-fhir-batch + hapi-fhir-jpaserver-base + hapi-fhir-sql-migrate + hapi-fhir-jpaserver-mdm + hapi-fhir-testpage-overlay + hapi-fhir-jpaserver-uhnfhirtest + hapi-fhir-client-okhttp + hapi-fhir-android + hapi-fhir-cli + hapi-fhir-dist + tests/hapi-fhir-base-test-jaxrsserver-kotlin + tests/hapi-fhir-base-test-mindeps-client + tests/hapi-fhir-base-test-mindeps-server + hapi-fhir-spring-boot + hapi-fhir-jacoco + + org.junit.jupiter @@ -846,34 +908,37 @@ 2021.2.2 4.3.3 2.7.4 - 1.2.2.RELEASE + 1.2.2.RELEASE + + 3.1.4 + 1.17.1 + 3.0.14.RELEASE + 4.4.1 - 3.1.4 - 1.17.1 - 3.0.14.RELEASE - 4.4.1 + + 1.6.0 - - 1.6.0 + UTF-8 + 1.0.1 - UTF-8 - 1.0.1 + 1.28.4 + + 1.5.1 + 1.2.0 + 1.5.2 - 1.28.4 - - 1.5.1 - 1.2.0 - 1.5.2 + + 5.4.1 + 11 + 11 + 11 + 17 + 17 + 17 - - 5.4.1 - 11 - 11 - 11 - 17 - 17 - 17 - + + + @@ -2594,21 +2659,24 @@ - - org.jacoco - jacoco-maven-plugin - - true - - - - default-prepare-agent - - prepare-agent - - - - + + @@ -2719,77 +2787,8 @@ - - ALLMODULES - - true - - - hapi-fhir-checkstyle - hapi-fhir-bom - hapi-deployable-pom - hapi-fhir-base - hapi-fhir-docs - hapi-fhir-test-utilities - hapi-fhir-jpaserver-test-utilities - hapi-fhir-jpaserver-test-dstu2 - hapi-fhir-jpaserver-test-dstu3 - hapi-fhir-jpaserver-test-r4 - hapi-fhir-jpaserver-test-r4b - hapi-fhir-jpaserver-test-r5 - hapi-fhir-jpaserver-elastic-test-utilities - hapi-tinder-plugin - hapi-tinder-test - hapi-fhir-client - hapi-fhir-server - hapi-fhir-server-mdm - hapi-fhir-server-openapi - hapi-fhir-converter - hapi-fhir-validation - hapi-fhir-structures-dstu2 - hapi-fhir-structures-hl7org-dstu2 - hapi-fhir-validation-resources-dstu2 - hapi-fhir-structures-dstu2.1 - hapi-fhir-validation-resources-dstu2.1 - hapi-fhir-structures-dstu3 - hapi-fhir-validation-resources-dstu3 - hapi-fhir-structures-r4 - hapi-fhir-validation-resources-r4 - hapi-fhir-structures-r4b - hapi-fhir-structures-r5 - hapi-fhir-validation-resources-r5 - hapi-fhir-jpa - hapi-fhir-storage - hapi-fhir-storage-batch2 - hapi-fhir-storage-batch2-jobs - hapi-fhir-storage-mdm - hapi-fhir-storage-test-utilities - hapi-fhir-jpaserver-cql - hapi-fhir-jpaserver-model - hapi-fhir-jpaserver-searchparam - hapi-fhir-jpaserver-subscription - hapi-fhir-jaxrsserver-base - hapi-fhir-batch - hapi-fhir-jpaserver-base - hapi-fhir-sql-migrate - hapi-fhir-jpaserver-mdm - hapi-fhir-testpage-overlay - hapi-fhir-jpaserver-uhnfhirtest - hapi-fhir-client-okhttp - hapi-fhir-android - hapi-fhir-cli - hapi-fhir-dist - tests/hapi-fhir-base-test-jaxrsserver-kotlin - tests/hapi-fhir-base-test-mindeps-client - tests/hapi-fhir-base-test-mindeps-server - hapi-fhir-spring-boot - - JACOCO - - hapi-fhir-jacoco - diff --git a/release-pipeline.yml b/release-pipeline.yml index 867e95dda972..e92bfe448d2d 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -170,7 +170,7 @@ jobs: inputs: goals: 'clean install' # These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy - options: '-P ALLMODULES,JACOCO,CI,ERRORPRONE -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true' + options: '-P JACOCO,CI,ERRORPRONE -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true' # These are JVM options (and don't show up in the build logs) mavenOptions: '-Xmx1024m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto' jdkVersionOption: 1.11 diff --git a/snapshot-pipeline.yml b/snapshot-pipeline.yml index 07946746b2e6..093484821483 100644 --- a/snapshot-pipeline.yml +++ b/snapshot-pipeline.yml @@ -86,7 +86,7 @@ steps: JAVA_HOME_11_X64: /usr/java/openjdk-17 displayName: 'Deploy to Sonatype staging' inputs: - mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml' + mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml' goals: deploy - options: '--settings $(System.DefaultWorkingDirectory)/settings.xml -P DIST,ALLMODULES -DskipTests' + options: '--settings $(System.DefaultWorkingDirectory)/settings.xml -P DIST -DskipTests' publishJUnitResults: false diff --git a/test-job-template.yml b/test-job-template.yml index 4cdfca24b692..be12ca37161b 100644 --- a/test-job-template.yml +++ b/test-job-template.yml @@ -27,7 +27,7 @@ jobs: inputs: goals: 'install' # These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy - options: '-P ALLMODULES,CI,FASTINSTALL -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true' + options: '-P CI,FASTINSTALL -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true' # These are JVM options (and don't show up in the build logs) mavenOptions: '-Xmx1024m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto' jdkVersionOption: 1.11 @@ -60,7 +60,7 @@ jobs: mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml' goals: 'clean test jacoco:report -pl ${{ p.module }}' # These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy - options: '-P ALLMODULES,JACOCO,CI -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true' + options: '-P JACOCO,CI -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true' # These are JVM options (and don't show up in the build logs) mavenOptions: '-Xmx1024m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto' jdkVersionOption: 1.11 @@ -124,7 +124,7 @@ jobs: mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml' goals: 'jacoco:report-aggregate' # These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy - options: '-P ALLMODULES,JACOCO' + options: '-P JACOCO' # These are JVM options (and don't show up in the build logs) mavenOptions: '-Xmx1024m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto' jdkVersionOption: 1.11