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

Plugin dependencies are not downloaded when running `server` task?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • gradle-jpi-plugin
    • None
    • gradle-jpi-plugin 0.6.0
      Oracle Java 1.7.0

      It seems that the plugin doesn't install the `jenkinsPlugins` dependencies when running the `server` task?

      For example, if I depend on the Git plugin and start the server, I get this output. The Git dependency is correctly downloaded and the server does start, but neither the Git plugin nor its dependencies are present under work/plugins/:

      $ ./gradlew clean server
      Parallel execution is an incubating feature.
      :clean
      :localizer
      :stapler
      :compileJava
      :compileGroovy UP-TO-DATE
      :processResources
      :classes
      :server
      Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0
      Running from: /home/chris/.m2/repository/org/jenkins-ci/main/jenkins-war/1.554/jenkins-war-1.554.war
      webroot: System.getProperty("JENKINS_HOME")
      Jenkins home directory: /home/chris/code/jenkins/foobar-plugin/work found at: System.getProperty("JENKINS_HOME")
      Failed Loading plugin foobar
      java.io.IOException: Dependency git (2.2.7) doesn't exist
              at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:488)
              at hudson.PluginManager$2$1$1.run(PluginManager.java:352)
              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:899)
              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:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      

      My build.gradle looks like this:

      buildscript {
          repositories {
              mavenCentral()
              maven {
                  url 'http://repo.jenkins-ci.org/releases/'
              }
          }
          dependencies {
              classpath 'org.jenkins-ci.tools:gradle-jpi-plugin:0.6.0'
          }
      }
      
      apply plugin: 'jpi'
      
      group = 'org.jenkins-ci.plugins'
      version = '0.1'
      
      jenkinsPlugin {
          coreVersion = '1.554'
          displayName = 'Jenkins XXX plugin'
          url = 'https://wiki.jenkins-ci.org/display/JENKINS/XXX+Plugin'
          gitHubUrl = 'https://github.com/jenkinsci/xxx-plugin'
      }
      
      dependencies {
          jenkinsPlugins 'org.jenkins-ci.plugins:git:2.2.7@jar'
      }
      
      task wrapper(type: Wrapper) {
          gradleVersion = '1.8'
      }
      

      Am I missing something here?

            daspilker Daniel Spilker
            orrc Christopher Orr
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: