Details
-
New Feature
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Won't Fix
Description
As discussed in JENKINS-51821, Jenkins won't work on Java 11 due to removed JAXB modules. I propose the following approach:
- Package 3 JAXB libs (jaxb-api-2.3.0.jar, jaxb-core-2.3.0.1.jar, jaxb-impl-2.3.0.1.jar) to a WAR resource which does not get classloaded by default. E.g. "WEB-INF/platform-compat/java11" (or 9 ?)
- When Jenkins starts up on Java 9+, Jenkins WAR exploder copies the libraries to "war/WEB-INF/lib" so that they get picked by classloader automatically
It will allow to have a transparent support of Java 9..11 within the WAR file (without adding modules, etc.)
A better way forward would be Multi-Version JAR, but we need a massive tooling update to support it
Attachments
Issue Links
- blocks
-
JENKINS-52186 Java 11: Upstream the JAXB bundling to the master branch
-
- Closed
-
- causes
-
JENKINS-55944 Remove JAXB dependencies for better Java 11 readiness
-
- Closed
-
- relates to
-
JENKINS-55620 SloccountPublisher fails on Java 11 without --add-modules java.xml.bind
-
- Resolved
-
-
JENKINS-46600 [JDK 9] Jenkins does not start with "java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter"
-
- Resolved
-
-
JENKINS-53938 Warnings plugin 'Record static analysis results - GNU Make + GNU C Compiler (gcc)’ gives exception with Java 10
-
- Resolved
-
-
JENKINS-55202 Performance Signature Plugin: JAXB API is missing with Java 11
-
- Closed
-
-
JENKINS-51821 Explore impact of Java EE removal in Jenkins Core with Java 11
-
- Resolved
-
-
JENKINS-55572 Remove JAXB usages in codesonar plugin for Java 11 compatibility
-
- Resolved
-
-
JENKINS-55704 Run jenkinsci/usage-in-plugins on JAXB usages
-
- Closed
-
-
JENKINS-52004 Add java.activation module to Java 10 Docker packages
-
- Resolved
-
-
JENKINS-55681 Release the JAXB Plugin
-
- Resolved
-
- links to
I've worked a bit in the last few days on checking the current state of Jenkins without the --add-modules switches: I've tried looking for an easy case to reproduce this issue, but it's actually not anymore easy to make Jenkins fail for a JAXB error, which is good. That is mostly because since when the issues were filed, many were fixed in plac to not use JAXB anymore where this was possible.
On the opensource side, it's close to impossible to check through the UI because of a few plugins have the majority javax.xml.bind imports
https://github.com/search?q=org%3Ajenkinsci+%22javax.xml.bind%22&unscoped_q=%22javax.xml.bind%22, so I had to go through the GitHub API using curl and some shell scripting to get the full list.
On the OSS side, the full list of repositories using "javax.xml.bind":
Some notes
Conclusion:
Given:
I'm inclined to say we should not bother adapting JAXB in Jenkins so plugins can work like before forever. At least I hope my summary above shows there's no real traction to do this.
I would rather encourage plugins to not depend on JAXB anymore.
What do you think?