From 093fbbc0f305f9846f12704945d13c386871beb7 Mon Sep 17 00:00:00 2001 From: dotasek Date: Mon, 7 Oct 2024 11:01:08 -0400 Subject: [PATCH] maven-compiler-plugin maintenance (#1731) * Override inheritance of HAPI's old maven-compiler-plugin and stop using deprecated forceJavacCompilerUse * Take checkstyle plugin out of default build * Use less for initial JVM opts (maybe forked compilers will need this) * Try on a mac? * Report free space, add MAVEN_OPTS * No MAVEN_OPTS? * Back to ubuntu * Try some compiler args and max mem * Try some MaxRamPercentage on surefire too * Try 75.0 MaxRamPercentage * 60? * Update surefire version, even less Xmx * Revert I18nBase style fix (get tests to pass, apply later) * Now that memory is less of an issue, try checkstyle again * Fix missing single quote * Try 50% of 7G for Xmx --- .../hl7/fhir/utilities/tests/TestConfig.java | 2 +- pom.xml | 76 +++++++++++++------ setup-and-cache-job-template.yml | 13 +++- 3 files changed, 61 insertions(+), 30 deletions(-) diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/tests/TestConfig.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/tests/TestConfig.java index 40620e7e0..2d660c855 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/tests/TestConfig.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/tests/TestConfig.java @@ -15,7 +15,7 @@ public class TestConfig { @Getter @Setter private boolean rebuildCache = System.getProperty(FHIR_TXCACHE_REBUILD) != null && "TRUE".equalsIgnoreCase(System.getProperty(FHIR_TXCACHE_REBUILD)); - @Getter @Setter + @Setter private String txCacheDirectory = TestConstants.TX_CACHE; @Getter @Setter diff --git a/pom.xml b/pom.xml index 632e1337a..2aea8dca5 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 2.17.0 5.9.2 1.8.2 - 3.0.0-M5 + 3.1.2 3.1.0 4.11.0 0.8.12 @@ -361,7 +361,7 @@ - @{argLine} -Xmx5632m + @{argLine} -Xmx3500m -XX:MaxRAMPercentage=50.0 COMPAT true 512m - 5632m + 768m true + + -J-XX:MaxRAMPercentage=50.0 + @@ -840,6 +836,36 @@ + + CHECKSTYLE + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + false + + + + process-sources + + checkstyle + + + true + ${project.basedir}/checkstyle_suppressions.xml + true + true + true + ${checkstyle_config_location}/checkstyle.xml + + + + + + + diff --git a/setup-and-cache-job-template.yml b/setup-and-cache-job-template.yml index 1844f946b..a5100e4ed 100644 --- a/setup-and-cache-job-template.yml +++ b/setup-and-cache-job-template.yml @@ -25,12 +25,17 @@ jobs: inputs: mavenPomFile: 'pom.xml' ${{ if eq(parameters.signArtifacts, true) }}: - options: '--settings $(Agent.TempDirectory)/settings.xml -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -DskipTests -DdeployToSonatype' + options: '--settings $(Agent.TempDirectory)/settings.xml -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -DskipTests -DdeployToSonatype -P CHECKSTYLE' ${{ else }}: - options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -DskipTests' - mavenOptions: '-Xmx3072m' + options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -DskipTests -P CHECKSTYLE' + mavenOptions: '-Xmx768m' javaHomeOption: 'JDKVersion' jdkVersionOption: '1.11' jdkArchitectureOption: 'x64' publishJUnitResults: false - goals: 'install' \ No newline at end of file + goals: 'install' + - task: Bash@3 + displayName: Report free disk space + inputs: + targetType: 'inline' + script: df -H . \ No newline at end of file