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

job-dsl-plugin depends on the deprecated fork of XStream

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The org.jvnet.hudson:xstream fork of XStream was removed from Jenkins in version 2.277 for JEP-228, see https://www.jenkins.io/doc/upgrade-guide/2.277/#xstream-update-jep-228

      job-dsl-plugin 1.77 (latest at time of writing) depends on the removed XStream, see https://github.com/jenkinsci/job-dsl-plugin/blob/job-dsl-1.77/build.gradle#L79

      My DSL project (which is hosted internally so I can't link to it) was unable to build with dependencies on org.jenkins-ci.plugins:job-dsl-core:1.77 and org.jenkins-ci.main:jenkins-war:2.277.2, however job-dsl-plugin is using XStream in a way that is compatible with upstream so this can be worked around by declaring the job-dsl-plugin dependency as:

      compile("org.jenkins-ci.plugins:job-dsl-core:1.77") {
        exclude module: 'xstream'
      }

      The error message was

      {{java.lang.VerifyError: (class: com/thoughtworks/xstream/core/util/SerializationMembers, method: getSerializablePersistentFields signature: (Ljava/lang/Class;)Ljava/util/Map Incompatible object argument for function call}}
        at hudson.util.RobustReflectionConverter.<init>(RobustReflectionConverter.java:106)}}
        at hudson.util.XStream2.setupConverters(XStream2.java:218)}}
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:574)}}
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:496)}}
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:465)}}
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:411)}}
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:378)}}
        at hudson.util.XStream2.<init>(XStream2.java:113)}}
        at jenkins.model.Jenkins.<clinit>(Jenkins.java:5439)}}
        at hudson.PluginManager.<clinit>(PluginManager.java:2227)}}
        at org.jvnet.hudson.test.JenkinsRule.<init>(JenkinsRule.java:336)}}
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)}}
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)}}

        Attachments

          Activity

          Hide
          udob Udo Bellack added a comment -

          Peter Maybe the title should be "job-dsl-plugin depends on the deprecated fork of XStream"?

          Show
          udob Udo Bellack added a comment - Peter Maybe the title should be "job-dsl-plugin depends on the deprecated fork of XStream"?
          Hide
          expephall Peter added a comment -

          Udo Bellack Thanks for pointing that out, it's fixed now.

          Show
          expephall Peter added a comment - Udo Bellack Thanks for pointing that out, it's fixed now.

            People

            Assignee:
            daspilker Daniel Spilker
            Reporter:
            expephall Peter
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated: