Trouble downloading my published files on Bintray from JCenter
Asked Answered
F

1

7

I'm developing a very basic Gradle plugin (mainly to get experience) and I've published a version to my Bintray repository which should be viewable here.

I've linked my repository to JCenter (and can find my plugin here) and now, to test it all works, I'm trying to download those artifacts from a Gradle build script and apply my plugin to a mock project:

apply plugin: 'semver'
apply plugin: 'java'

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.github.tagc:semver-plugin:0.1.0'
    }
}

semver {
    versionFilePath = 'version.properties'
}

However, Gradle can't resolve that dependency and throws this exception:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'TestSemver'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not find com.github.tagc:semver-plugin:0.1.0.
     Searched in the following locations:
         https://jcenter.bintray.com/com/github/tagc/semver-plugin/0.1.0/semver-plugin-0.1.0.pom
         https://jcenter.bintray.com/com/github/tagc/semver-plugin/0.1.0/semver-plugin-0.1.0.jar
     Required by:
         :TestSemver:unspecified

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.703 secs

This is because JCenter doesn't seem to be hosting my files (under com/github/tagc). I'm not sure why this is the case. After getting a confirmation that my repository is linked with JCenter, are there any additional steps I need to take to make it host my uploaded files so that I can access them in the way shown in the build script? Or is just that it takes some time for the files to appear on JCenter? It's been about 5 hours since my repository was linked to JCenter.

Any help or advice would be appreciated.

Famine answered 27/12, 2014 at 16:42 Comment(4)
You have to log into bintray and approve the artifacts before they are public. Did you do that?Trichomoniasis
@MarkVieira I'm very sure they've been published. I can see my files while logged out, and my feed says 'tagc has released version 0.1.0 of gradle-semver-plugin'.Famine
And on your repository settings page, JCenter is listed under the "Linked To" section?Trichomoniasis
@MarkVieira It is. This is how I'm seeing the page. puu.sh/dLruN/93316a1233.pngFamine
F
7

It turns out that I just needed to be patient and let JCenter update. It's on there now, and my build script runs fine.

Considering that it takes a fair amount of time to update (~12 hours for me), I think that the user experience might be improved by letting first-time users know that there's a lengthy update process and that they haven't simply missed a step. This would remove some of the anxiety of wondering "Have I missed a step, and if so will I be waiting forever?"

Other than that, the Bintray UX is absolutely wonderful.

Famine answered 27/12, 2014 at 23:26 Comment(12)
Just to make your answer more clear: In order to resolve from JCenter, your package should be linked to JCenter. As with any inclusion request, it should be approved by the other repo owner (Bintray org, in this case). Since it involves manual process of reviewing your package, it might take some time (specially during weekends/holidays). Good news - it's one time procedure (per package).Urey
@Urey Thanks - to add to this, though, I meant that the 12 hours update process was after I'd received confirmation that my package was approved. I got the confirmation at around 11 AM GMT but couldn't find my package on JCenter until around 11 PM/12 AM. Perhaps I'm just slower than the average user but if it becomes a common problem, a notification that the package is being synced or a mention of it at the bottom of the relevant doc page could help. Otherwise, a fantastic process. :)Famine
Hm, that shouldn't happen. Once your package is linked, the other repo should show the same files right away (it's just a link).Urey
@Urey If it's of any help, this is what happened: (1) I had v0.1.0 of my plugin in my repo, my repo was not linked to JCenter at this stage (2) I received an email confirming my repo had been linked to JCenter (3) I configured a mock project to try to download my plugin from JCenter instead of the local Maven repo, which failed consistently for the next 12 hours. During this time, there was no 'tagc' directory here (5) After about 12 hours, my build suddenly worked and the 'tagc' directory had appeared at the linked page.Famine
Additional info: I was frequently deleting and re-adding versions of the plugin (just to get a handle on the process). A few hours after I'd received the confirmation and the build was still failing, I tried deleting v0.1.0 and re-uploading it to see if that did anything.Famine
Could be some problem in Bintray. I don't see any other reason.Urey
just had similar issue, i can search my lib name in jcenter website, it shows up, but gradle can not download it yetNeonate
I've been waiting 48 hours and my package still isn't downloadable by my gradle script. The repo is linked to JCenter and the latest version appears on the bintray website but not in JCenterCommunist
Same scenario here: I've been several days waiting to my files to show up in JCenter. How long took for you @CuiPengFei and @barry?Demagogic
@Demagogic just a few hours, if it's been days, it'll probably not show upNeonate
Yes, I wrote to [email protected]. They told me it was as sync issue from their end and fix it right away. It's working now. Thanks @CuiPengFeiDemagogic
Happening for me as well. Published an initial version 0.0.1 which is publicly resolvable and then published a subsequent 3.0.14 which for the past 2 days is still not available or linked though it's clearly there. bintray.com/project-aries/libs-release-local/docker-java-shadedHerbst

© 2022 - 2024 — McMap. All rights reserved.