【问题标题】:Gradle uploadArchives from Travis mangles staging repositories来自 Travis 的 Gradle uploadArchives 破坏暂存存储库
【发布时间】:2018-10-13 00:05:36
【问题描述】:

我有一个 open source projecthooks to travis-ci.org 并使用 gradle 构建。

此项目使用 gradle maven 插件 使用 uploadArchives 目标将发布工件上传到 oss.sonatype.org。通常发生的情况是,此目标在 Sonatype 中创建一个单独的临时存储库,然后 Gradle nexus staging plugin 提升存储库并在几分钟后显示在 Maven Central 中。

然而,最近,uploadArchives 目标开始创建多个暂存存储库,每个存储库都包含所需工件的部分子集;只有在 Travis 中运行时才会发生这种情况,而不是在我从笔记本电脑上尝试时发生。

我在这里遗漏了什么,这使它在运行 ./gradlew uploadArchives 时可以在本地工作,但在 Travis 中失败?

一些可能有帮助的链接:

【问题讨论】:

    标签: gradle travis-ci sonatype maven-central


    【解决方案1】:

    最后出现this is a common error that started appearing this year。带有sudo: enabled 或 docker 的 Travis VM 将在工件上传之间更改 IP 地址,这将促使 Sonatype 认为这些工件属于不同的存储库。将此添加到我的travis.yml 修复它:

    sudo: false
    dist: trusty
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-02
      • 2017-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多