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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Won't Do
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      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

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

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

            Yes, as test scope of course. That is what we do. I think this can be closed, pending a rewrite of JenkinsRule to mimic a realistic class loading environment rather than blindly relying on java.class.path.

            Show
            jglick Jesse Glick added a comment - The workaround in this case was to add the failing dependencies to OC-Server Yes, as test scope of course. That is what we do. I think this can be closed, pending a rewrite of JenkinsRule to mimic a realistic class loading environment rather than blindly relying on java.class.path .
            Hide
            alobato Alvaro Lobato added a comment -

            Jesse Glick if there is an issue already for that rewrite, I'm ok with closing this issue.

            Show
            alobato Alvaro Lobato added a comment - Jesse Glick if there is an issue already for that rewrite, I'm ok with closing this issue.
            Hide
            jglick Jesse Glick added a comment -
            Show
            jglick Jesse Glick added a comment - See JENKINS-41827 .

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: