2
votes

My server can't connect to jcenter (amazon cloud). Can I specify alternative jcenter-server ?

20:23:17 :microservice-wrapper:unspecified > org.akhikhl.gretty:gretty:2.0.0 20:23:17 > Could not resolve org.springframework.boot:spring-boot-loader-tools:1.5.4.RELEASE. 20:23:17 > Could not get resource '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 > Could not HEAD '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 > Connect to repo.jfrog.org:443 [repo.jfrog.org/34.227.55.218, repo.jfrog.org/34.200.155.151] failed: Connection refused (Connection refused) 20:23:17 > Could not resolve org.springframework.boot:spring-boot-devtools:1.3.3.RELEASE.

1

1 Answers

1
votes

Yes you can configure custom repositories as described in the Gradle documentation. Keep in mind jcenter is maven repository type. If you want to provide a custom maven repository you can define its URL the following way:

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

Alternatives to jcenter are described in the Gradle documentation as well, like: mavenCentral(). Also this and this similar answers illustrates how to achieve the expected behavior.