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

Cannot retrieve artifact from jenkins repository, wrong SNAPSHOT version used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins master: v1.509.1, Ubuntu Server 12.04 64bit
      Jenkins Maven Repository Server Plugin v1.0
      Sonatype Nexus Open Source Edition, Version: 1.9.2.2
      Maven 2.2.1

      I've been trying all week to get this Jenkins repository working, but I cannot get past this error in my build:

      [DEBUG] Connecting to repository: 'jenkins-upstream' with url: 'http://opss-jenkins.bigcorp.com.au/jenkins/view/zSpikes/job/PL10_Unit_AC/15/maven-repository/repository/'.
      Downloading: http://opss-jenkins.bigcorp.com.au/jenkins/view/zSpikes/job/PL10_Unit_AC/15/maven-repository/repository//au/com/bigcorp/opss/opss-common-build-resources/1.0.2-SNAPSHOT/opss-common-build-resources-1.0.2-20130521.060427-24.jar
      [DEBUG] Unable to locate resource in repository

      After investigation, I found that version 1.0.2-20130521.060427-24 exists on our nexus server, but does not exist in the jenkins repository. The jenkins repository does contain a build of 1.0.2-SNAPSHOT (v1.0.2-20130527.164756-15).

      So it appears that maven is resolving the version it needs from nexus, then trying to retrieve it from jenkins repository, which fails.

      It is worth noting that in this example, the snapshot version published in jenkins is more recent than the one in nexus. In our system, we always want to use the snapshot version from jenkins (if present), and fall back to nexus if it does not exist.

      I have experimented with many different configurations in the settings files around ordering the repository entries (and other tricks), but I cannot find a way past this problem.

      I believe the cause may be the metadata that is being written to the jenkins repository. I have attached a sample to compare between jenkins and nexus for the same artifact. Note that the <snapshot> element is entirely missing in the jenkins version - this may be the root cause of the issue?

            magnayn magnayn
            aidanc Aidan Carter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: