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

Repoistory Connector plugin fails to resolve LATEST version

    XMLWordPrintable

Details

    Description

      I upgraded to version 1.0.1 from 0.8.2, and now it will not resolve LATEST version anymore. Instead of downloading the latest version it throws an exception

      Here is the plugin section of the config.xml:

          <org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver plugin="repository-connector@1.0.1">
            <targetDirectory>target</targetDirectory>
            <artifacts>
              <org.jvnet.hudson.plugins.repositoryconnector.Artifact>
                <groupId>com.flexlink.fucd</groupId>
                <artifactId>fucd-console</artifactId>
                <classifier></classifier>
                <version>LATEST</version>
                <extension>jar</extension>
                <targetFileName>console.jar</targetFileName>
              </org.jvnet.hudson.plugins.repositoryconnector.Artifact>
            </artifacts>
            <failOnError>true</failOnError>
            <enableRepoLogging>false</enableRepoLogging>
            <snapshotUpdatePolicy>always</snapshotUpdatePolicy>
            <releaseUpdatePolicy>always</releaseUpdatePolicy>
            <snapshotChecksumPolicy>warn</snapshotChecksumPolicy>
            <releaseChecksumPolicy>warn</releaseChecksumPolicy>
          </org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver>
      

      Here is the exception:

      INFO: define repo: [Repository id=central, type=default, url=http://repo1.maven.org/maven2, isRepositoryManager=false]
      failed collecting dependency info for [Artifact com.flexlink.fucd:fucd-console:jar::LATEST]
      org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for com.flexlink.fucd:fucd-console:jar:LATEST (provided)
      	at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:197)
      	at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308)
      	at org.jvnet.hudson.plugins.repositoryconnector.aether.Aether.resolve(Aether.java:154)
      	at org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver.download(ArtifactResolver.java:129)
      	at org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver.perform(ArtifactResolver.java:101)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      	at hudson.model.Build$BuildExecution.build(Build.java:199)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
      	at hudson.model.Run.execute(Run.java:1745)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:89)
      	at hudson.model.Executor.run(Executor.java:240)
      Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.flexlink.fucd:fucd-console:jar:LATEST
      	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:243)
      	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:172)
      	at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:191)
      	... 13 more
      Caused by: org.sonatype.aether.resolution.VersionResolutionException: Failed to resolve version for com.flexlink.fucd:fucd-console:jar:LATEST: Could not find metadata com.flexlink.fucd:fucd-console/maven-metadata.xml in local (C:\Windows\TEMP\repositoryconnector-repo)
      	at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:273)
      	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:236)
      	... 15 more
      Caused by: org.sonatype.aether.transfer.MetadataNotFoundException: Could not find metadata com.flexlink.fucd:fucd-console/maven-metadata.xml in local (C:\Windows\TEMP\repositoryconnector-repo)
      	at org.sonatype.aether.impl.internal.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:215)
      	at org.sonatype.aether.impl.internal.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:173)
      	at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:211)
      	... 16 more
      Build step 'Artifact Resolver' marked build as failure
      

      I will have to downgrade to 0.8.2. I hope you can figure out what the problem is.

      Attachments

        Activity

          "LATEST" is not a valid version string for an arbitrary artifact. It works consistently for maven plugins only. See http://articles.javatalks.ru/articles/32 for some details - it is about Nexus mostly but applies to the other repository managers too.

          kirill_evstigneev Kirill Evstigneev added a comment - "LATEST" is not a valid version string for an arbitrary artifact. It works consistently for maven plugins only. See http://articles.javatalks.ru/articles/32 for some details - it is about Nexus mostly but applies to the other repository managers too.

          In general this should work, I have tested it with 'http://repo1.maven.org/maven2' to resolve 'commons-logging:commons-logging:jar:LATEST' and 'commons-logging:commons-logging:jar:RELEASE'

          But looking at your stacktrace, it looks more that you have not configured the correct repository in the global Jenkins configuration. Please see the screenshot here: https://wiki.jenkins-ci.org/display/JENKINS/Repository+Connector+Plugin

          If this is not the case, please feel free to reopen this issue.

          domi Dominik Bartholdi added a comment - In general this should work, I have tested it with 'http://repo1.maven.org/maven2' to resolve 'commons-logging:commons-logging:jar:LATEST' and 'commons-logging:commons-logging:jar:RELEASE' But looking at your stacktrace, it looks more that you have not configured the correct repository in the global Jenkins configuration. Please see the screenshot here: https://wiki.jenkins-ci.org/display/JENKINS/Repository+Connector+Plugin If this is not the case, please feel free to reopen this issue.

          People

            Unassigned Unassigned
            redsolo redsolo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: