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

Remove JAXB usages in codesonar plugin for Java 11 compatibility

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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!

        Attachments

          Issue Links

            Activity

            Hide
            madsnielsen 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.

             

            Show
            madsnielsen 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.  
            Hide
            batmat 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.

            Show
            batmat 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.
            Show
            madsnielsen Mads Nielsen added a comment - Thanks Baptiste Mathus i implemented the fix: https://github.com/jenkinsci/codesonar-plugin/commit/54dc96f740479cabd075d284165be816054d8a28
            Hide
            batmat 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.

            Show
            batmat 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.

              People

              • Assignee:
                praqma Praqma Support
                Reporter:
                batmat Baptiste Mathus
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: