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

Range parameter ignored as build selector

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When using a range to as build selector to limit the version to 1x, where the artefact has versions 1.x and 2.x available in nexus repository.

      [,1.999)
      

      This works in version: Repository Connector 1.1.3

      INFO: define repo: [Repository id=nexus, type=default, url=http://localhost/nexus/content/groups/public/, isRepositoryManager=true]
      INFO: define repo: [Repository id=snapshots, type=, url=http://localhost/nexus/content/repositories/snapshots, isRepositoryManager=false]
      Resolving metadata uk.co.egl.accountinfo:eglAccountInformationBroker/maven-metadata.xml from /tmp/repositoryconnector-repo (enhanced)
      Resolved metadata uk.co.egl.accountinfo:eglAccountInformationBroker/maven-metadata.xml from /tmp/repositoryconnector-repo (enhanced)
      Resolving metadata uk.co.egl.accountinfo:eglAccountInformationBroker/maven-metadata.xml from nexus (http://localhost/nexus/content/groups/public/, releases+snapshots, managed)
      Resolved metadata uk.co.egl.accountinfo:eglAccountInformationBroker/maven-metadata.xml from nexus (http://localhost/nexus/content/groups/public/, releases+snapshots, managed)
      Resolving metadata uk.co.egl.accountinfo:eglAccountInformationBroker/maven-metadata.xml from snapshots (http://localhost/nexus/content/repositories/snapshots, releases+snapshots)
      Resolved metadata uk.co.egl.accountinfo:eglAccountInformationBroker/maven-metadata.xml from snapshots (http://localhost/nexus/content/repositories/snapshots, releases+snapshots)
      Resolving metadata uk.co.egl.accountinfo:eglAccountInformationBroker:1.6-SNAPSHOT/maven-metadata.xml from /tmp/repositoryconnector-repo (enhanced)
      Resolved metadata uk.co.egl.accountinfo:eglAccountInformationBroker:1.6-SNAPSHOT/maven-metadata.xml from /tmp/repositoryconnector-repo (enhanced)
      Resolving metadata uk.co.egl.accountinfo:eglAccountInformationBroker:1.6-SNAPSHOT/maven-metadata.xml from nexus (http://localhost/nexus/content/groups/public/, releases+snapshots, managed)
      Resolved metadata uk.co.egl.accountinfo:eglAccountInformationBroker:1.6-SNAPSHOT/maven-metadata.xml from nexus (http://localhost/nexus/content/groups/public/, releases+snapshots, managed)
      Resolving metadata uk.co.egl.accountinfo:eglAccountInformationBroker:1.6-SNAPSHOT/maven-metadata.xml from snapshots (http://localhost/nexus/content/repositories/snapshots, releases+snapshots)
      Resolved metadata uk.co.egl.accountinfo:eglAccountInformationBroker:1.6-SNAPSHOT/maven-metadata.xml from snapshots (http://localhost/nexus/content/repositories/snapshots, releases+snapshots)
      Resolving artifact uk.co.egl.accountinfo:eglAccountInformationBroker:pom:1.6-20170302.174336-38
      Resolved artifact uk.co.egl.accountinfo:eglAccountInformationBroker:pom:1.6-20170302.174336-38 from /tmp/repositoryconnector-repo (enhanced)
      Resolving artifact uk.co.egl.accountinfo:eglAccountInformationBroker:bar:1.6-SNAPSHOT
      Resolving metadata uk.co.egl.accountinfo:eglAccountInformationBroker:1.6-SNAPSHOT/maven-metadata.xml from /tmp/repositoryconnector-repo (enhanced)
      Resolved metadata uk.co.egl.accountinfo:eglAccountInformationBroker:1.6-SNAPSHOT/maven-metadata.xml from /tmp/repositoryconnector-repo (enhanced)
      Resolving metadata uk.co.egl.accountinfo:eglAccountInformationBroker:1.6-SNAPSHOT/maven-metadata.xml from nexus (http://localhost/nexus/content/groups/public/, releases+snapshots, managed)
      Resolved metadata uk.co.egl.accountinfo:eglAccountInformationBroker:1.6-SNAPSHOT/maven-metadata.xml from nexus (http://localhost/nexus/content/groups/public/, releases+snapshots, managed)
      Resolving metadata uk.co.egl.accountinfo:eglAccountInformationBroker:1.6-SNAPSHOT/maven-metadata.xml from snapshots (http://localhost/nexus/content/repositories/snapshots, releases+snapshots)
      Resolved metadata uk.co.egl.accountinfo:eglAccountInformationBroker:1.6-SNAPSHOT/maven-metadata.xml from snapshots (http://localhost/nexus/content/repositories/snapshots, releases+snapshots)
      Resolved artifact uk.co.egl.accountinfo:eglAccountInformationBroker:bar:1.6-20170302.174336-38 from /tmp/repositoryconnector-repo (enhanced)
      

       

      The following error occurs in version: Repository Connector 1.2.3

      INFO: define repo: [Repository id=nexus, type=default, url=http://localhost/nexus/content/groups/public/, isRepositoryManager=true]
      INFO: define repo: [Repository id=snapshots, type=, url=http://localhost/nexus/content/repositories/snapshots, isRepositoryManager=false]
      Resolving metadata uk.co.egl.accountinfo:eglAccountInformationBroker/maven-metadata.xml from /tmp/repositoryconnector-repo (enhanced)
      Resolved metadata uk.co.egl.accountinfo:eglAccountInformationBroker/maven-metadata.xml from /tmp/repositoryconnector-repo (enhanced)
      Resolving metadata uk.co.egl.accountinfo:eglAccountInformationBroker/maven-metadata.xml from nexus (http://localhost/nexus/content/groups/public/, releases+snapshots, managed)
      Resolving metadata uk.co.egl.accountinfo:eglAccountInformationBroker/maven-metadata.xml from snapshots (http://localhost/nexus/content/repositories/snapshots, releases+snapshots)
      Downloading: http://localhost/nexus/content/groups/public/uk/co/egl/accountinfo/eglAccountInformationBroker/maven-metadata.xml
      762 B   
              
      Downloaded: http://localhost/nexus/content/groups/public/uk/co/egl/accountinfo/eglAccountInformationBroker/maven-metadata.xml (762 B at 18.1 KB/sec)
      Resolved metadata uk.co.egl.accountinfo:eglAccountInformationBroker/maven-metadata.xml from nexus (http://localhost/nexus/content/groups/public/, releases+snapshots, managed)
      Resolved metadata uk.co.egl.accountinfo:eglAccountInformationBroker/maven-metadata.xml from snapshots (http://localhost/nexus/content/repositories/snapshots, releases+snapshots)
      failed to expand tokens for [Artifact uk.co.egl.accountinfo:eglAccountInformationBroker:bar::${BUILD_SELECTOR}]
      java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
      	at java.util.ArrayList.get(ArrayList.java:429)
      	at org.jvnet.hudson.plugins.repositoryconnector.aether.ReleasedVersionRangeResolver.getLatest(ReleasedVersionRangeResolver.java:181)
      	at org.jvnet.hudson.plugins.repositoryconnector.aether.ReleasedVersionRangeResolver.resolveVersionRange(ReleasedVersionRangeResolver.java:134)
      	at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:160)
      	at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308)
      	at org.jvnet.hudson.plugins.repositoryconnector.aether.Aether.resolve(Aether.java:216)
      	at org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver.download(ArtifactResolver.java:217)
      	at org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver.perform(ArtifactResolver.java:154)
      	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      	at hudson.model.Build$BuildExecution.build(Build.java:206)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
      	at hudson.model.Run.execute(Run.java:1727)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      ERROR: Failed to resolve artifact
      

        Attachments

          Activity

          Hide
          lahres Christian Lahres added a comment -

          I have the same Issue as described above.

           

          I noticed that resolving didn't work if the module was on second level in our git repo. Example:

          RepoName

          • Module1
          • Module2
            • Submodule1
            • Submodule2

          Module 1 and 2 could be resolved. Submodule 1 and 2 not.

           

          This seems strange as the git and nexus structure have nothing to do with each other.

          Marcus Collins What VCS do you use? How's your structure?

           

          Thanks in advance.

          Show
          lahres Christian Lahres added a comment - I have the same Issue as described above.   I noticed that resolving didn't work if the module was on second level in our git repo. Example: RepoName Module1 Module2 Submodule1 Submodule2 Module 1 and 2 could be resolved. Submodule 1 and 2 not.   This seems strange as the git and nexus structure have nothing to do with each other. Marcus Collins What VCS do you use? How's your structure?   Thanks in advance.
          Hide
          mbtc Marcus Collins added a comment -

          We use subversion with a layout:

          repo/module1/trunk/

          repo/module2/trunk/

          But this has no affect on the artifact retrieved from Nexus repository or the POM describing the version.

          Show
          mbtc Marcus Collins added a comment - We use subversion with a layout: repo/module1/trunk/ repo/module2/trunk/ But this has no affect on the artifact retrieved from Nexus repository or the POM describing the version.

            People

            • Assignee:
              Unassigned
              Reporter:
              mbtc Marcus Collins
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: