ICU4J and SaxonJ EE

By Norm Tovey-Walsh on August 24, 2023 at 12:15p.m.

We’ve recently discovered a small discrepancy in how we manage the dependencies between ICU4J and SaxonJ EE.

If you download the EE release from our website, you get a distribution that includes SaxonJ EE, XML Resolver, ICU4J, and JLine (used by Gizmo). The manifest in the SaxonJ EE jar file puts those additional dependencies on your classpath automatically.

If you get the EE release from our Maven repository, ICU4J is an optional dependency. So Maven won’t automatically put it on your classpath. That’s the discrepancy.

Saxon EE will function without ICU4J, so it is technically optional. I’m unsure which would be better: making it optional in both places or non-optional in both places. Having it different certainly seems like the worst choice and we should fix it.

In the short term, if you’re using Saxon EE and you want the collations supported by ICU4J, make sure you’re also arranging for ICU4J to be on your classpath.

We discovered this in the course of examining issue #6183. For slightly complicated reasons involving our type hierarchy, if ICU4J is missing, you can get an error message that suggests you’re running Saxon HE even when you’re running EE. We’ll fix that too.