[GRADLE-3453] Unable to use dynamic versions with an S3-based ivy respository Created: 12/May/16  Updated: 25/Jan/17  Resolved: 20/May/16

Status: Resolved
Project: Gradle
Affects Version/s: 2.13
Fix Version/s: 3.0-milestone-1, 3.0-rc-2

Type: Bug
Reporter: Stefan Wolf Assignee: Stefan Wolf
Resolution: Fixed Votes: 0


 Description   

I'm using a custom plugin that is stored in a private S3-backed ivy repository, but I'm having trouble using dynamic versions when referencing it in my gradle build script. Using a specific version works just fine with the S3-backed repository, and dynamic versions work correctly if I put the plugin in a local standard-file-based repository.

The S3 credentials that I'm using have the ability to list the contents of the bucket (tested using a separate S3 command-line tool), including the contents of the directory that gradle reports as having no versions.

This is what I'm trying to do:

buildscript {
    repositories {
        ivy {
            name "s3Ivy"
            url 's3://ivy-bucket/repo'
            credentials(AwsCredentials) {
                accessKey S3_ACCESS_KEY
                secretKey S3_SECRET_KEY
            }
       }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0'
        classpath 'com.razerzone:library-publishing:1.0.+'
    }
}

And this is what it results in:

> Could not find any matches for com.razerzone:library-publishing:1.0.+ as no versions of com.razerzone:library-publishing are available.
     Searched in the following locations:
         s3://ivy-bucket/repo/com.razerzone/library-publishing/

This is what is actually in the S3 repo:

s3cmd -c ~/s3cfg.ivy-bucket ls s3://ivy-bucket/repo/com.razerzone/library-publishing/
                   DIR   s3://ivy-bucket/repo/com.razerzone/library-publishing/1.0.0/
                   DIR   s3://ivy-bucket/repo/com.razerzone/library-publishing/1.0.2/
                   DIR   s3://ivy-bucket/repo/com.razerzone/library-publishing/1.0.3/
                   DIR   s3://ivy-bucket/repo/com.razerzone/library-publishing/1.0/

If I reference one of the versions directly via classpath 'com.razerzone:library-publishing:1.0.2' then it works correctly.

See https://discuss.gradle.org/t/unable-to-use-dynamic-versions-with-an-s3-based-ivy-respository/16893 and https://github.com/gradle/gradle/pull/636


Generated at Wed Jun 30 12:49:14 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.