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

Plugins have transitive plugin dependencies but Jenkins cannot know

XMLWordPrintable

      Plugins with a dependency on a plugin A get the plugin dependencies of A added to their class path.

      When those dependencies are removed in later versions of A, or made optional, Jenkins has no way to know that dependency ever even existed, since it only knows about what's currently installed.

      Therefore dependencies from plugins should not be made available transitively, and attempts to access such classes should fail. (For compatibility reasons, we probably need a maven-hpi-plugin option here.)


      Inspired by discussion with daspilker in https://github.com/jenkinsci/gradle-jpi-plugin/pull/92 where this behavior was actually implemented for Gradle JPI plugin.

      This seems to be a real potential problem with e.g. the matrix-project MatrixAggregatable extension effort, and similar changes that aim to make dependencies optional. They may not be considered to be optional in dependent plugins, as per the above PR discussion. See also JENKINS-44200.

      CC jglick

       

            Unassigned Unassigned
            danielbeck Daniel Beck
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: