Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55572

Remove JAXB usages in codesonar plugin for Java 11 compatibility

    • 2.0.9

      Problem statement

      Codesonar plugin uses JAXB in many locations. Given this module has been extracted from the JDK in JDK11 (starting with 9+), this is likely to make it hard for this plugin to run in an environment that doesn't have this module explicitly allowed.

      Expected behavior

      If possible, the code should not depend on JAXB anymore so it can be easily used in a Jenkins running on Java 11. (Java 11 preview for Jenkins has been announced in last December, and GA is coming, hence also why I am filing this ticket).

      If you need any help, please feel free to reach out to us!

      Thanks!

          [JENKINS-55572] Remove JAXB usages in codesonar plugin for Java 11 compatibility

          Mads Nielsen added a comment -

          Can this be fixed just by following the advice here: https://stackoverflow.com/a/52502208 (adding the library as an explicit dependency) ? I'm not too sure on how to write a migrator that can read the existing XML with a new library.

           

          Mads Nielsen added a comment - Can this be fixed just by following the advice here: https://stackoverflow.com/a/52502208  (adding the library as an explicit dependency) ? I'm not too sure on how to write a migrator that can read the existing XML with a new library.  

          Please see https://wiki.jenkins.io/display/JENKINS/JAXB+Plugin.

          Basically, this JIRA is about recommending moving away from an API that got removed from the JDK itself. But if you don't want/have time to do this, then you should be able to depend indeed on the Jenkins JAXB API plugin to do something similar to https://stackoverflow.com/a/52502208 but in a Jenkins plugins' compatible way.

          Baptiste Mathus added a comment - Please see https://wiki.jenkins.io/display/JENKINS/JAXB+Plugin . Basically, this JIRA is about recommending moving away from an API that got removed from the JDK itself. But if you don't want/have time to do this, then you should be able to depend indeed on the Jenkins JAXB API plugin to do something similar to https://stackoverflow.com/a/52502208 but in a Jenkins plugins' compatible way.

          Mads Nielsen added a comment -

          Mads Nielsen added a comment - Thanks batmat i implemented the fix: https://github.com/jenkinsci/codesonar-plugin/commit/54dc96f740479cabd075d284165be816054d8a28

          nice.

          I think this would be very good to introduce a Jenkinsfile in this repo BTW. Ideally one that builds both on JDK8 and JDK11 as in https://github.com/jenkinsci/branch-api-plugin/pull/148/files#diff-58231b16fdee45a03a4ee3cf94a9f2c3R1 for example.

          Baptiste Mathus added a comment - nice. I think this would be very good to introduce a Jenkinsfile in this repo BTW. Ideally one that builds both on JDK8 and JDK11 as in https://github.com/jenkinsci/branch-api-plugin/pull/148/files#diff-58231b16fdee45a03a4ee3cf94a9f2c3R1 for example.

          Basil Crow added a comment -

          Basil Crow added a comment - Fixed in commit 54dc96f740479cabd075d284165be816054d8a28 . Released in 2.0.9 .

            praqma Praqma Support
            batmat Baptiste Mathus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: