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

During test executions optional transitive plugin dependencies don't get correctly loaded

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • core
    • None

      When you are testing a plugin with Jenkins for test by using the Jenkins rule, if you have an optional transitive dependency and the Jenkins for test war already has that dependency but in an older version, it will fail to load the plugin:

      SEVERE: Failed Loading plugin Operations Center Context v2.19.0.2-SNAPSHOT (private-263c8f8a-alobato) (operations-center-context)
      java.io.IOException: Operations Center Context v2.19.0.2-SNAPSHOT (private-263c8f8a-alobato) failed to load.
       - Maven Integration plugin v2.7.1 is older than required. To fix, install v2.11 or later.
       - Matrix Project Plugin v1.4.1 is older than required. To fix, install v1.7.1 or later.
              at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:621)
              at hudson.PluginManager$2$1$1.run(PluginManager.java:516)
              at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
              at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
              at jenkins.model.Jenkins$7.runTask(Jenkins.java:1026)
              at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
              at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      

      In this case I was testing a Cloudbees plugin OC-server which has a dependency on Operations Center Context and the later has an optional dependency to maven plugin 2.11 and matrix-project 1.7.1, they both are provided by Jenkins for test in an older version.

      The workaround in this case was to add the failing dependencies to OC-Server

      This is happening with Jenkins 2.19.1

            Unassigned Unassigned
            alobato Alvaro Lobato
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: