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

Correct Pom for build-monitor-plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • build-monitor-plugin
    • None
    • Jenkins-2.32.3
      gradle - 2.12
      build-monitor-plugin-1.11+build.201701152243
      job-dsl-plugin - 1.58

      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>

            rahulsom Rahul Somasunderam
            cruhl Chaz Ruhl
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: