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

Gradle JPI Plugin can't use coreVersion of Jenkins >= 2.64

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • gradle-jpi-plugin
    • None

      As of Jenkins 2.64, the 'war-for-test' is no longer published to http://repo.jenkins-ci.org/releases/org/jenkins-ci/main/jenkins-war/.

      This is expected, as it is the result of JENKINS-24064.

      However, currently, the Gradle JPI Plugin expects this artifact to always be available, regardless of Jenkins version:

      https://github.com/jenkinsci/gradle-jpi-plugin/blob/7c723c48d17b312fcf45cf10f2d66b07929f8445/src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy#L174

      This causes an issue when running, for example, 'gradle test' in a project applying the Gradle JPI Plugin, as it cannot find war-for-test.

      Here is a minimal reproduction, which can be run with 'gradle test'

      build.gradle:

      plugins {
          id 'org.jenkins-ci.jpi' version '0.22.0'
      }
      
      jenkinsPlugin {
          coreVersion = '2.74'
      }
      
      

      which yields:

      FAILURE: Build failed with an exception.
      
      * What went wrong:
      Could not resolve all files for configuration ':pluginResources'.
      > Could not find jenkins-war-war-for-test.jar (org.jenkins-ci.main:jenkins-war:2.74).
        Searched in the following locations:
            https://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-war/2.74/jenkins-war-2.74-war-for-test.jar
      

            daspilker Daniel Spilker
            roberthencke Robert Hencke
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: