From 7b6bce628246f7654ea4b9a9bdf1414dc53b9b78 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 9 Dec 2024 22:44:20 -0800 Subject: [PATCH] Plugin cleanup (#6545) * wip remove old maven * remove mvn 2 dep, bump plugin-api and plugin-annotations * import maven core * Remove weird collections import * wip * Bump license plugin, versions plugin, and jacoco plugin. Remove coveralls * Bump shade, antrun, errorprone * Fix errorprone warning about duplicate branches in XMLUtil * Fix errorprone warning about duplicate branches in SctHandlerRelationship * Exclude docs snippets * Remove old-intellij * Add profile for errorprone, completely remove ROOT profile * move errorprone into a profile * license * reset pom version * spotless * Reinstate errorprone * self review * revert migration move * Reversion of DO_NOTHING --------- Co-authored-by: tadgh --- .../main/java/ca/uhn/fhir/util/XmlUtil.java | 6 +- hapi-fhir-dist/pom.xml | 2 +- .../term/snomedct/SctHandlerRelationship.java | 4 - hapi-tinder-plugin/pom.xml | 31 +-- .../uhn/fhir/tinder/model/BaseRootType.java | 2 +- pom.xml | 192 +++++++----------- 6 files changed, 76 insertions(+), 161 deletions(-) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/XmlUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/XmlUtil.java index f49de276065..867af919470 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/XmlUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/XmlUtil.java @@ -1678,11 +1678,7 @@ public class XmlUtil { XMLEventWriter ew = XmlUtil.createXmlFragmentWriter(w); for (XMLEvent next : theEvents) { - if (next.isCharacters()) { - ew.add(next); - } else { - ew.add(next); - } + ew.add(next); } ew.close(); return w.toString(); diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index 8ffce201dd0..c2aac03bba4 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -265,7 +265,7 @@ maven-assembly-plugin - ${maven_assembly_plugin_version} + ${maven-assembly-plugin-version} package diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerRelationship.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerRelationship.java index 7fd1838f62c..9de4c3927d7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerRelationship.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/snomedct/SctHandlerRelationship.java @@ -92,10 +92,6 @@ public final class SctHandlerRelationship implements IZipContentsHandlerCsv { } } } - } else if (ignoredTypes.contains(typeConcept.getDisplay())) { - // ignore - } else { - // ourLog.warn("Unknown relationship type: {}/{}", typeId, typeConcept.getDisplay()); } } } diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index ed97670654c..05c3fdd10cb 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -41,10 +41,10 @@ ca.uhn.hapi.fhir @@ -163,23 +163,8 @@ org.apache.maven - maven-project - + maven-core + 3.9.9 org.apache.maven @@ -190,14 +175,6 @@ org.apache.maven.plugin-tools maven-plugin-annotations provided - diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/BaseRootType.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/BaseRootType.java index a7afd8c9f8c..3c193feebc7 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/BaseRootType.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/BaseRootType.java @@ -1,9 +1,9 @@ package ca.uhn.fhir.tinder.model; import ca.uhn.fhir.tinder.model.SearchParameter.Include; -import edu.emory.mathcs.backport.java.util.Collections; import java.util.ArrayList; +import java.util.Collections; import java.util.List; public abstract class BaseRootType extends BaseElement { diff --git a/pom.xml b/pom.xml index d56db2046d3..0e12614c049 100644 --- a/pom.xml +++ b/pom.xml @@ -1015,7 +1015,7 @@ 2.17.0 3.17.0 1.2 - 2.23.0 + 2.36.0 5.8.0 0.7.9 33.2.1-jre @@ -1045,6 +1045,8 @@ 2.18.1 5.4.1 5.3.1 + 2.17.1 + 2.17.1 3.3.0 1.8 4.12.0 @@ -1069,7 +1071,6 @@ 2.24.1 6.1.14 2024.0.5 - 4.3.10 3.3.5 2.0.10 2.9.0 @@ -1095,10 +1096,19 @@ 17 17 17 - 3.4.0 + + + 3.3.0 + 3.2.1 + 0.8.12 + 3.3.0 + 2.5.0 + 3.5.0 + 3.4.0 + @@ -1676,21 +1686,16 @@ wagon-scm 3.4.3 - - org.apache.maven - maven-project - 2.2.1 - org.apache.maven maven-plugin-api - 3.8.6 + 3.9.9 provided org.apache.maven.plugin-tools maven-plugin-annotations - 3.9.0 + 3.14.0 org.apache.poi @@ -2442,7 +2447,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.3.0 + ${maven-resources-plugin-version} org.springframework.boot @@ -2462,7 +2467,7 @@ org.apache.maven.plugins maven-assembly-plugin - ${maven_assembly_plugin_version} + ${maven-assembly-plugin-version} org.apache.felix @@ -2472,37 +2477,38 @@ org.apache.maven.plugins maven-antrun-plugin - 3.0.0 - - - org.apache.maven.plugins - maven-clean-plugin 3.1.0 + + org.apache.maven.plugins + maven-clean-plugin + 3.4.0 + org.apache.maven.plugins maven-compiler-plugin - 3.11.0 + 3.13.0 - true UTF-8 true 500m 2000m - - -XDcompilePolicy=simple - -Xplugin:ErrorProne -Xep:MissingSummary:OFF -Xep:JavaUtilDate:OFF -XepExcludedPaths:.*/src/test/java/.* - -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED - -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED - -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED - + true + + -XDcompilePolicy=simple + --should-stop=ifError=FLOW + -Xplugin:ErrorProne -Xep:MissingSummary:OFF -Xep:JavaUtilDate:OFF -XepExcludedPaths:.*/src/test/java/.*|.*/hapi-fhir-docs/src/main/java/.* + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + com.google.errorprone @@ -2567,12 +2573,12 @@ org.apache.maven.plugins maven-shade-plugin - 2.4.3 + 3.6.0 org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.3.1 org.apache.maven.plugins @@ -2598,30 +2604,22 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.6.0 org.codehaus.mojo buildnumber-maven-plugin - 3.0.0 - - - org.codehaus.mojo - cobertura-maven-plugin - 2.7 - - true - + ${buildnumber-maven-plugin-version} org.codehaus.mojo license-maven-plugin - 2.0.0 + ${maven-license-plugin-version} true false @@ -2631,7 +2629,7 @@ org.codehaus.mojo versions-maven-plugin - 2.8.1 + 2.18.0 false @@ -2646,19 +2644,10 @@ maven-changes-plugin ${maven_changes_version} - - org.eluder.coveralls - coveralls-maven-plugin - 4.3.0 - - - - - org.jacoco jacoco-maven-plugin - 0.8.9 + ${jacoco-maven-plugin-version} ca/uhn/fhir/model/dstu2/**/*.class @@ -2743,12 +2732,12 @@ org.apache.maven.plugins maven-install-plugin - 2.5.2 + 3.1.3 org.codehaus.mojo animal-sniffer-maven-plugin - 1.23 + 1.24 net.sf.androidscents.signature @@ -2773,12 +2762,12 @@ org.apache.maven.plugins maven-checkstyle-plugin true - ${maven_checkstyle_version} + ${maven-checkstyle-version} org.apache.maven.plugins maven-enforcer-plugin - 3.3.0 + ${maven-enforcer-plugin-version} enforce-maven @@ -3165,21 +3154,6 @@ - - ROOT - - - - - - - - - - - - JACOCO @@ -3223,16 +3197,16 @@ - - - - - - - - - - + + org.apache.maven.plugins + maven-checkstyle-plugin + + + hapi-single-module-checkstyle + none + + + @@ -3284,48 +3258,20 @@ - - - - - - - - - - - - - - - - - old-intellij - - false - - - org.apache.maven.plugins - maven-compiler-plugin - - 17 - 17 - 17 - 17 - 17 - + maven-checkstyle-plugin + + + validate + none + + + ossrh-repo