-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major
-
Component/s: repository-connector-plugin
-
None
-
Environment:Linux 2.6.32-358.el6.x86_64 Java 1.8.0_111
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