unitsofmeasurement/uom-lib

Investigate why Jackson build fails with Java 10+11 after module-info added but passes everywhere else?

Closed this issue · 2 comments

keilw commented

There is a strange bug which might be in the JDK or Maven, see https://www.mail-archive.com/search?l=commits@netbeans.apache.org&q=subject:%22%5C%5Bjira%5C%5D+%5C%5BCommented%5C%5D+%5C%28NETBEANS%5C-2397%5C%29+Java%27s+provide+...+with+NOT+working+in+maven+projects%22&o=newest&f=1

Only Java 10 and 11 fail with a very similar problem

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project uom-lib-jackson: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile failed: Unsupported major.minor version 56.0 -> [Help 1]

but all the other Java versions 8, 9 and 12-14 pass without problems.
For now we simply exclude them from the Travis build as it has no effect on the runtime for all we know.
Yet weird, if anybody knows what causes it, help is appreciated.

keilw commented

This is related to unitsofmeasurement/indriya#301, There was at least one bug in the JDK where multi-release JARs and non-multi-release JARs did not work together resolving the module-info or the entire multi-release content. It was resolved in Java 12, therefore 10 and 11 must not be used to build any more.
It is fine to run it with either of these, but the multi-release aspects and classes even for those versions won't be usable, instead it falls-back to the default JDK (8) and finds the module via the automatic-module-name in the MANIFEST.

keilw commented

This only fails on PPC, so as a consequence we have to scrap the PPC builds because only JDK 9 would pass ;-/
travis-ci.org/github/unitsofmeasurement/uom-lib/builds/744090516