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

Plugin depended by an optionally depended plugin gets non-optional

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Windows8 64bit
      JDK 1.7.0_17
      Jenkins 1.466
    • Similar Issues:

      Description

      Take a following case:

      • Plugin A depends optionally on Plugin B.
      • Plugin B depends optionally on Plugin C.

      In this case, Plugin A does not start without Plugin C.

      I found this in https://github.com/jenkinsci/parameterized-trigger-plugin/pull/41 .
      Project A is Parameterized Trigger plugin.
      Project B is Conditional Buildstep plugin.
      Project C is Run Condition plugin.

      I failed to start Parameterized Trigger plugin without Run Condition plugin with following logs (I run it on Jenkins 1.509.2):

      INFO: Listed all plugins
      8 11, 2013 10:45:00 PM jenkins.InitReactorRunner$1 onTaskFailed
      SEVERE: Failed Loading plugin parameterized-trigger
      java.io.IOException: Dependency run-condition (0.10) doesn't exist
              at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:479)
              at hudson.PluginManager$2$1$1.run(PluginManager.java:332)
              at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
              at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
              at jenkins.model.Jenkins$7.runTask(Jenkins.java:888)
              at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
              at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
      
      8 11, 2013 10:45:00 PM jenkins.InitReactorRunner$1 onAttained
      INFO: Prepared all plugins
      8 11, 2013 10:45:01 PM jenkins.InitReactorRunner$1 onAttained
      INFO: Started all plugins
      8 11, 2013 10:45:01 PM jenkins.InitReactorRunner$1 onAttained
      INFO: Augmented all extensions
      

      There are following lines in MANIFEST.MF in parameterized-trigger.jpi:

      Plugin-Version: 2.19-SNAPSHOT (private-08/11/2013 11:37-ikedam)
      Hudson-Version: 1.466
      Jenkins-Version: 1.466
      Plugin-Dependencies: conditional-buildstep:1.3;resolution:=optional,su
       bversion:1.25;resolution:=optional,run-condition:0.10,token-macro:1.5.1
      Plugin-Developers: Tom Huybrechts:huybrechts:,Kohsuke Kawaguchi:kohsuke:
      

      I think this is a issue for maven-hpi-plugin rather than jenkins-core.

        Attachments

          Activity

          Hide
          ikedam ikedam added a comment -

          I'll create a reproducing project to clarify the problem.

          Show
          ikedam ikedam added a comment - I'll create a reproducing project to clarify the problem.
          Hide
          ikedam ikedam added a comment -

          I wrote a reproducing code:
          https://github.com/ikedam/reproduce-jenkins-19152

          It is fixed in maven-hpi-plugin 1.91, 1448928.
          Jenkins core versions and versions of maven-hpi-plugin used default is:

          Jenkins maven-hpi-plugin
          1.466 1.74
          1.504 1.90
          1.505 1.93
          1.509.2 1.96

          The next problem is, how can I use Jenkins 1.466 and maven-hpi-plugin 1.96 at the same time ?

          Show
          ikedam ikedam added a comment - I wrote a reproducing code: https://github.com/ikedam/reproduce-jenkins-19152 It is fixed in maven-hpi-plugin 1.91, 1448928 . Jenkins core versions and versions of maven-hpi-plugin used default is: Jenkins maven-hpi-plugin 1.466 1.74 1.504 1.90 1.505 1.93 1.509.2 1.96 The next problem is, how can I use Jenkins 1.466 and maven-hpi-plugin 1.96 at the same time ?
          Hide
          ikedam ikedam added a comment -

          Jenkins >= 1.488, there is no version specification for maven-hpi-plugin in org.jenkins-ci.plugins.plugin .
          This seems enable property maven-hpi-plugin.version.

          Show
          ikedam ikedam added a comment - Jenkins >= 1.488, there is no version specification for maven-hpi-plugin in org.jenkins-ci.plugins.plugin . This seems enable property maven-hpi-plugin.version.
          Hide
          ikedam ikedam added a comment -

          Jenkins <= 1.487 and maven-hpi-plugin 1.96 can work with

            <build>
              <plugins>
                <plugin>
                  <groupId>org.jenkins-ci.tools</groupId>
                  <artifactId>maven-hpi-plugin</artifactId>
                  <version>1.96</version>
                  <extensions>true</extensions>
                  <configuration>
                    <showDeprecation>true</showDeprecation>
                  </configuration>
                </plugin>
              </plugins>
            </build>
          

          But I'm not sure for I'm not familiar with Maven.

          Show
          ikedam ikedam added a comment - Jenkins <= 1.487 and maven-hpi-plugin 1.96 can work with <build> <plugins> <plugin> <groupId>org.jenkins-ci.tools</groupId> <artifactId>maven-hpi-plugin</artifactId> <version>1.96</version> <extensions>true</extensions> <configuration> <showDeprecation>true</showDeprecation> </configuration> </plugin> </plugins> </build> But I'm not sure for I'm not familiar with Maven.
          Hide
          ikedam ikedam added a comment -

          Already fixed.
          Found workaround for older versions.

          Show
          ikedam ikedam added a comment - Already fixed. Found workaround for older versions.

            People

            • Assignee:
              ikedam ikedam
              Reporter:
              ikedam ikedam
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: