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

Correct Pom for build-monitor-plugin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: build-monitor-plugin
    • Labels:
      None
    • Environment:
      Jenkins-2.32.3
      gradle - 2.12
      build-monitor-plugin-1.11+build.201701152243
      job-dsl-plugin - 1.58
    • Similar Issues:

      Description

      We run tests against our job-dsl code using gradle before kicking off the dsl processing job. For dsl code referencing various plugins, we include the dependancies via build.gradle

      dependancies {
         testPlugins 'org.jenkins-ci.main:maven-plugin:2.3'
      }

      when including build-monitor-plugin:
      testPlugins 'org.jenkins-ci.plugins:build-monitor-plugin:1.11+build.201701152243'

      I get an error saying:
      > Could not resolve org.jenkins-ci.plugins:build-monitor-plugin:1.11+build.201701152243.
      > Could not parse POM http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/build-monitor-plugin/1.11+build.201701152243/build-monitor-plugin-1.11+build.201701152243.pom
      > Could not find org.jenkins-ci.plugins:build-monitor:1.11+build.201701152243.

      After a little digging, it appears the pom is not set-up per https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial#Plugintutorial-pom.xml

      I was able to add the pom & hpi to our local repository and successfully got the tests running by making the following changes:

      <parent>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>plugin</artifactId>
      <version>1.609.3</version>
      </parent>

      This was set to <artifactId>build-monitor</artifactId> - which doesn't seem to exist.

      With the required jenkins version in the correct place (the parent), a separate verison tag needs to be added:
      <version>1.11+build.201701152243</version>

      A version for the hamcrest dependancy was needed for it to be correctly found

      <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>3.1</version>
      <scope>test</scope>
      </dependency>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cruhl Chaz Ruhl
            • Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: