Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-3453

Unable to use dynamic versions with an S3-based ivy respository

    XMLWordPrintable

    Details

      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

        Attachments

          Activity

            People

            Assignee:
            wolf Stefan Wolf
            Reporter:
            wolf Stefan Wolf
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: