【问题标题】:gradle jcenter alternative or mirrorgradle jcenter 替代或镜像
【发布时间】:2018-10-15 06:35:05
【问题描述】:

我的服务器无法连接到 jcenter(亚马逊云)。 我可以指定替代的 jcenter-server 吗?

20:23:17 :microservice-wrapper:unspecified > org.akhikhl.gretty:gretty:2.0.0 20:23:17 > 无法解决 org.springframework.boot:spring-boot-loader-tools:1.5.4.RELEASE。 20:23:17 > 无法获取资源 'https://jcenter.bintray.com/org/springframework/boot/spring-boot-loader-tools/1.5.4.RELEASE/spring-boot-loader-tools-1.5.4.RELEASE.pom'。 20:23:17 > 无法头部 'https://jcenter.bintray.com/org/springframework/boot/spring-boot-loader-tools/1.5.4.RELEASE/spring-boot-loader-tools-1.5.4.RELEASE.pom'。 20:23:17 > 连接到 repo.jfrog.org:443 [repo.jfrog.org/34.227.55.218,repo.jfrog.org/34.200.155.151] 失败: 连接被拒绝(连接被拒绝) 20:23:17 > 不能 解决 org.springframework.boot:spring-boot-devtools:1.3.3.RELEASE.

【问题讨论】:

    标签: java spring maven gradle repository


    【解决方案1】:

    是的,您可以按照Gradle 文档中的说明配置自定义存储库。请记住 jcenter 是 maven 存储库类型。如果你想提供一个自定义的 Maven 存储库,你可以通过以下方式定义它的 URL:

    repositories {
        maven {
            url "http://repo.mycompany.com/maven2"
        }
    }
    

    Gradle 文档中也描述了 jcenter 的替代方案,例如:mavenCentral()thisthis 类似的答案也说明了如何实现预期的行为。

    【讨论】:

      猜你喜欢
      • 2021-05-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-11
      • 2011-04-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多