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

The Manifest of the job-dsl JAR is empty, making it unuseable for tests

XMLWordPrintable

      Hi,

      I'm using the Job DSL plug-in from another plug-in, and need to use it for my integration tests as well:

      dependencies {
          ...
          jenkinsPlugins 'org.jenkins-ci.plugins:job-dsl:1.32@jar'
          ...
      }
      

      I'm using the JenkinsRule and it fails because it cannot resolve job-dsl:1.32. After looking into the code of JenkinsRule, I've seen that the JAR location is fetched using Manifest information, in the Short-Name attribute.

      Although this information is filled in correctly in the JPI file, it is absent in the JAR file. I had a look at other plug-ins, and the manifest information is generated for both the JAR and the HPI/JPI file. So it might have something to do with the Gradle JPI plug-in.

      In order to make the Job DSL plug-in useable from other plug-ins, especially in their integration tests using the JenkinsRule, the JAR needs the Manifest information.

      Best regards,
      Damien.

            daspilker Daniel Spilker
            damien_coraboeuf Damien Coraboeuf
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: