hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2.04k stars 1.33k forks source link

Missing org.apache.commons:commons-collections4 dependency in hapi-fhir-base #6307

Open jamesnetherton opened 2 months ago

jamesnetherton commented 2 months ago

CollectionUtil in hapi-fhir-base imports org.apache.commons.collections4.CollectionUtils.

However, commons-collections4 seems to be present on the classpath only because it's a transitive of optional dependency jena-base:

$ mvn dependency:tree -Dincludes=org.apache.commons:commons-collections4

[INFO] ------------------< ca.uhn.hapi.fhir:hapi-fhir-base >-------------------
[INFO] Building HAPI FHIR - Core Library 7.5.1-SNAPSHOT
[INFO] -------------------------------[ bundle ]-------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) @ hapi-fhir-base ---
[INFO] ca.uhn.hapi.fhir:hapi-fhir-base:bundle:7.5.1-SNAPSHOT
[INFO] \- org.apache.jena:jena-core:jar:4.9.0:compile (optional)
[INFO]    \- org.apache.jena:jena-base:jar:4.9.0:compile (optional)
[INFO]       \- org.apache.commons:commons-collections4:jar:4.4:compile (optional)

Thus in user applications there's the potential for ClassNotFoundException.