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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • job-dsl-plugin
    • Jenkins 2.277.2, job-dsl-plugin 1.77
    • 1.82

      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)}}

            basil Basil Crow
            expephall Peter
            Votes:
            8 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: