From b8cad21d870ecb5b0803a40579fa5d30854856bb Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Tue, 7 Nov 2023 14:38:30 -0700 Subject: [PATCH] Fix XPP dependency --- .../src/main/groovy/cql.fhir-conventions.gradle | 9 +++++++++ .../src/main/groovy/cql.java-conventions.gradle | 1 - .../src/main/groovy/cql.xjc-conventions.gradle | 1 - Src/java/cqf-fhir-npm/build.gradle | 1 - Src/java/cql-to-elm-cli/build.gradle | 4 ---- Src/java/cql-to-elm/build.gradle | 17 +++-------------- Src/java/elm-fhir/build.gradle | 8 +++----- Src/java/elm-jaxb/build.gradle | 2 -- Src/java/elm/build.gradle | 3 +-- Src/java/engine-fhir/build.gradle | 4 ---- Src/java/engine/build.gradle | 6 ++---- Src/java/gradle.properties | 4 ++-- Src/java/model-jaxb/build.gradle | 4 +--- Src/java/model/build.gradle | 1 - Src/java/qdm/build.gradle | 5 ++--- Src/java/quick/build.gradle | 5 ++--- Src/java/tools/xsd-to-modelinfo/build.gradle | 4 ++-- 17 files changed, 27 insertions(+), 52 deletions(-) diff --git a/Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle index c854a5b2d..c18a58771 100644 --- a/Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle +++ b/Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle @@ -10,6 +10,7 @@ ext { dependencies { api platform("ca.uhn.hapi.fhir:hapi-fhir-bom:${hapiVersion}") { exclude group: 'org.eclipse.jetty' + exclude group: 'xpp3' } implementation "ca.uhn.hapi.fhir:org.hl7.fhir.r5:${coreVersion}" @@ -23,4 +24,12 @@ dependencies { implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3" implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-r4" implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-r5" + + // This is to align with the FHIR core dependencies + // Note that this dependency hasn't been updated since 2013 + // we probably need to standardize on a fork up the dependency chain + implementation ('org.ogce:xpp3:1.1.6') { + exclude group: 'junit' + exclude group: 'org.hamcrest' + } } \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/groovy/cql.java-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.java-conventions.gradle index 0cc87b858..761950844 100644 --- a/Src/java/buildSrc/src/main/groovy/cql.java-conventions.gradle +++ b/Src/java/buildSrc/src/main/groovy/cql.java-conventions.gradle @@ -35,7 +35,6 @@ dependencies { // on Android. But for test purposes we use them pretty much everywhere. testRuntimeOnly 'org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2' testRuntimeOnly 'org.eclipse.parsson:parsson:1.1.5' - testRuntimeOnly 'xpp3:xpp3:1.1.4c' } jar { diff --git a/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle index 9f4a1c304..0c562d6e8 100644 --- a/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle +++ b/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle @@ -18,7 +18,6 @@ dependencies { xjc 'org.glassfish.jaxb:jaxb-runtime:4.0.3' xjc 'org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2' xjc 'org.slf4j:slf4j-simple:1.7.36' - api 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' api 'codes.rafael.jaxb2_commons:jaxb2-basics-runtime:3.0.0' } diff --git a/Src/java/cqf-fhir-npm/build.gradle b/Src/java/cqf-fhir-npm/build.gradle index e67e2b295..89422d105 100644 --- a/Src/java/cqf-fhir-npm/build.gradle +++ b/Src/java/cqf-fhir-npm/build.gradle @@ -5,7 +5,6 @@ plugins { dependencies { implementation project(':cql-to-elm') implementation project(':cqf-fhir') - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' implementation 'com.google.code.gson:gson:2.9.1' implementation 'org.apache.commons:commons-compress:1.24.0' } diff --git a/Src/java/cql-to-elm-cli/build.gradle b/Src/java/cql-to-elm-cli/build.gradle index bd95c0f1a..a7c1677a3 100644 --- a/Src/java/cql-to-elm-cli/build.gradle +++ b/Src/java/cql-to-elm-cli/build.gradle @@ -14,10 +14,6 @@ dependencies { implementation project(':model-jaxb') implementation project(':elm-jaxb') implementation 'net.sf.jopt-simple:jopt-simple:4.7' - runtimeOnly 'org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.1' - runtimeOnly 'xpp3:xpp3_min:1.1.4c' - runtimeOnly 'xmlpull:xmlpull:1.1.3.1' - testImplementation project(':model-jaxb') testImplementation project(':model-jackson') testImplementation project(':elm-jaxb') diff --git a/Src/java/cql-to-elm/build.gradle b/Src/java/cql-to-elm/build.gradle index faaf115bc..4cf4dd0c3 100644 --- a/Src/java/cql-to-elm/build.gradle +++ b/Src/java/cql-to-elm/build.gradle @@ -1,31 +1,20 @@ plugins { id 'cql.library-conventions' + id 'cql.xjc-conventions' } dependencies { api project(':cql') api project(':model') api project(':elm') - - // The FHIR ucum service depends on an - // XML pull-parser being present on the classpath, and have a compile-time reference to xpp3. - // However, some platfoms such as Android provide their own pull-parser implementations. - // Additionally, The xpp3.xpp3 dependency includes the javax.xml packagename, which is invalid in - // Java 9+ because split packages (i.e. the same packagename being available in multipe jar) are - // disallowed. For those reasons xpp3 is excluded here, and included as a runtime dependency for - // tests. Users of the CQL translator will need to supply their own implementation or add xpp3 - // at runtime. - implementation 'org.fhir:ucum:1.0.8' - implementation 'org.apache.commons:commons-text:1.10.0' + api 'org.fhir:ucum:1.0.8' + api 'org.apache.commons:commons-text:1.10.0' // TODO: This dependencies are required due the the fact that the CqlTranslatorOptionsMapper lives // in the cql-to-elm project. Ideally, we'd factor out all serialization depedencies into common // libraries such that we could swap out jackson for something else. In the meantime, these are // "implementation" dependencies so that they are not exported downstream. implementation 'com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:2.15.2' - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' - - testImplementation project(':elm-jackson') testImplementation project(':model-jackson') testImplementation project(':quick') diff --git a/Src/java/elm-fhir/build.gradle b/Src/java/elm-fhir/build.gradle index e53733c21..3f4b66ba5 100644 --- a/Src/java/elm-fhir/build.gradle +++ b/Src/java/elm-fhir/build.gradle @@ -8,11 +8,9 @@ ext { } dependencies { - implementation project(':cql-to-elm') - implementation project(':engine') - implementation project(":engine-fhir") - implementation "org.mapstruct:mapstruct:${mapstructVersion}" - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' + api project(':cql-to-elm') + api project(':engine') + api project(":engine-fhir") testImplementation project(':quick') testImplementation "org.reflections:reflections:0.10.2" diff --git a/Src/java/elm-jaxb/build.gradle b/Src/java/elm-jaxb/build.gradle index 1440e8336..deeea8646 100644 --- a/Src/java/elm-jaxb/build.gradle +++ b/Src/java/elm-jaxb/build.gradle @@ -4,7 +4,5 @@ plugins { dependencies { api project(':elm') - api 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' - api 'jakarta.json:jakarta.json-api:2.1.3' implementation 'org.apache.commons:commons-text:1.10.0' } diff --git a/Src/java/elm/build.gradle b/Src/java/elm/build.gradle index d099d113c..2b9842213 100644 --- a/Src/java/elm/build.gradle +++ b/Src/java/elm/build.gradle @@ -4,8 +4,7 @@ plugins { } dependencies { - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' - implementation project(':model') + api project(':model') } generateSources { diff --git a/Src/java/engine-fhir/build.gradle b/Src/java/engine-fhir/build.gradle index c5732fdf8..389a431bd 100644 --- a/Src/java/engine-fhir/build.gradle +++ b/Src/java/engine-fhir/build.gradle @@ -6,10 +6,6 @@ plugins { dependencies { api project(':engine') - api 'org.apache.commons:commons-text:1.10.0' - api 'xpp3:xpp3_min:1.1.4c' - api 'xmlpull:xmlpull:1.1.3.1' - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' testImplementation 'com.github.tomakehurst:wiremock-jre8:2.35.0' testImplementation project(':cql-to-elm') testImplementation project(':model-jackson') diff --git a/Src/java/engine/build.gradle b/Src/java/engine/build.gradle index 07d7cc9db..b7b3e9535 100644 --- a/Src/java/engine/build.gradle +++ b/Src/java/engine/build.gradle @@ -3,10 +3,8 @@ plugins { } dependencies { - api 'org.apache.commons:commons-text:1.10.0' - api 'org.fhir:ucum:1.0.8' - implementation project(':elm') - implementation project(':cql-to-elm') + api project(':elm') + api project(':cql-to-elm') testImplementation project(':model-jackson') testImplementation project(':elm-jackson') diff --git a/Src/java/gradle.properties b/Src/java/gradle.properties index 914c1ba6d..8336f8c14 100644 --- a/Src/java/gradle.properties +++ b/Src/java/gradle.properties @@ -2,9 +2,9 @@ org.gradle.caching=true org.gradle.parallel=true group=info.cqframework -version=3.5.0-SNAPSHOT +version=3.4.1 specification.version=1.5.2 -hapi.version=6.8.3 +hapi.version=6.8.5 fhir-core.version=6.0.22.2 antlr.version=4.10.1 android.api.level=28 diff --git a/Src/java/model-jaxb/build.gradle b/Src/java/model-jaxb/build.gradle index c49f3b777..990a7efaf 100644 --- a/Src/java/model-jaxb/build.gradle +++ b/Src/java/model-jaxb/build.gradle @@ -3,7 +3,5 @@ plugins { } dependencies { - api 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' - api 'jakarta.json:jakarta.json-api:2.1.3' - implementation project(':model') + api project(':model') } diff --git a/Src/java/model/build.gradle b/Src/java/model/build.gradle index 916041374..1bb18cc98 100644 --- a/Src/java/model/build.gradle +++ b/Src/java/model/build.gradle @@ -5,7 +5,6 @@ plugins { dependencies { implementation 'org.apache.commons:commons-text:1.10.0' - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' } generateSources { diff --git a/Src/java/qdm/build.gradle b/Src/java/qdm/build.gradle index 43ae0ca0b..2047aec7c 100644 --- a/Src/java/qdm/build.gradle +++ b/Src/java/qdm/build.gradle @@ -4,9 +4,8 @@ plugins { } dependencies { - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' - implementation project(':elm') - implementation project(':model') + api project(':elm') + api project(':model') } generateSources{ diff --git a/Src/java/quick/build.gradle b/Src/java/quick/build.gradle index 915af4064..97275a85d 100644 --- a/Src/java/quick/build.gradle +++ b/Src/java/quick/build.gradle @@ -4,9 +4,8 @@ plugins { } dependencies { - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' - implementation project(':elm') - implementation project(':model') + api project(':elm') + api project(':model') } generateSources{ diff --git a/Src/java/tools/xsd-to-modelinfo/build.gradle b/Src/java/tools/xsd-to-modelinfo/build.gradle index 02f3182a3..de960982e 100644 --- a/Src/java/tools/xsd-to-modelinfo/build.gradle +++ b/Src/java/tools/xsd-to-modelinfo/build.gradle @@ -1,5 +1,6 @@ plugins { id 'cql.java-conventions' + id 'cql.library-conventions' id 'application' } @@ -8,8 +9,7 @@ application { } dependencies { - implementation project(':model') - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' + api project(':model') implementation 'net.sf.jopt-simple:jopt-simple:4.7' implementation 'org.apache.ws.xmlschema:xmlschema-core:2.2.5' implementation 'org.apache.ws.xmlschema:xmlschema-walker:2.2.5'