7

我正在开发一个非常基本的 Gradle 插件(主要是为了获得经验),并且我已经向我的 Bintray 存储库发布了一个版本,应该可以在这里查看。

我已经将我的存储库链接到 JCenter(并且可以在此处找到我的插件),现在,为了测试它是否正常工作,我正在尝试从 Gradle 构建脚本下载这些工件并将我的插件应用到一个模拟项目:

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

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

semver {
    versionFilePath = 'version.properties'
}

但是,Gradle 无法解决该依赖关系并引发此异常:

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

这是因为JCenter似乎没有托管我的文件(在 下com/github/tagc)。我不确定为什么会这样。在确认我的存储库与 JCenter 链接后,是否需要采取任何其他步骤来使其托管我上传的文件,以便我可以按照构建脚本中显示的方式访问它们?或者只是文件需要一些时间才能出现在 JCenter 上?自从我的存储库链接到 JCenter 以来已经有大约 5 个小时了。

任何帮助或建议将不胜感激。

4

1 回答 1

7

事实证明,我只需要耐心等待 JCenter 更新即可。它现在就在那里,我的构建脚本运行良好。

考虑到更新需要相当长的时间(对我来说大约 12 小时),我认为通过让初次使用的用户知道更新过程很长并且他们并没有简单地错过更新,可能会改善用户体验步。这将消除一些焦虑,想知道“我是否错过了一步,如果是,我会永远等待吗?”

除此之外,Bintray UX 绝对很棒。

于 2014-12-27T23:26:31.930 回答