29

I have a jhipster project which deploy on heroku with gitlab since several months

Since yesterday, I can not deploy new version because I have this error

FAILURE: Build failed with an exception.
32 * What went wrong:
33 A problem occurred configuring root project 'yvidya'.
34 > Could not resolve all artifacts for configuration ':classpath'.
35    > Could not resolve io.spring.gradle:propdeps-plugin:0.0.10.RELEASE.
36      Required by:
37          project :
38       > Could not resolve io.spring.gradle:propdeps-plugin:0.0.10.RELEASE.
39          > Could not get resource 'http://repo.spring.io/plugins-    release/io/spring/gradle/propdeps-plugin/0.0.10.RELEASE/propdeps-plugin-0.0.10.RELEASE.pom'.
40             > Could not GET 'http://repo.spring.io/plugins-release/io/spring/gradle/propdeps-plugin/0.0.10.RELEASE/propdeps-plugin-0.0.10.RELEASE.pom'. Received status code 403 from server:     Forbidden

Anyone know why this error? and how solve it?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
user1450740
  • 731
  • 10
  • 26
  • 4
    issue is with http call.. try with https. "http://repo.spring.io/plugins-release/io/spring/gradle/propdeps-plugin/0.0.10.RELEASE/propdeps-plugin-0.0.10.RELEASE.pom" – MyTwoCents Jan 16 '20 at 11:20

3 Answers3

47

Open your build.gradle file and replace the spring maven repository URL from http with https

Abhishek Shah
  • 1,394
  • 1
  • 16
  • 25
Slartibartfast
  • 1,605
  • 2
  • 16
  • 23
  • I changed the url in the build.gradle file in buildscript -> repositories -> maven with the new https endpoint – Abhishek Shah Feb 08 '20 at 05:06
  • I changed the url in the build.gradle file in buildscript -> repositories -> maven with the new https endpoint – Kumar Panchal Feb 13 '20 at 09:48
  • I think the accepted answer should incorporate @Nayeem's comment below. – Chaim Eliyah Sep 24 '20 at 00:07
  • I don't even have a spring repository repo defined in my pom.xml, so it should have resolved to Maven Central. In other words, there's no explicit repo URL to change from "http" to "https" – Chris Wolf Jan 14 '21 at 02:07
21

The issue is related to the deprecated repository link. Please update http with https of Spring repo URL.

Abhishek Shah
  • 1,394
  • 1
  • 16
  • 25
  • 1
    Yes, As per the post on Spring.io "In response to our nohttp announcement, Maven Central’s announcement, and JFrog’s announcement, beginning January 15 2020, Spring’s Maven Repository will no longer support HTTP. More concretely, http://repo.spring.io will not respond to requests." https://spring.io/blog/2019/09/16/goodbye-http-repo-spring-use-https – Nayeem Jan 21 '20 at 22:38
  • 1
    I changed the url in the build.gradle file in buildscript -> repositories -> maven with the new https endpoint – Ebsan Jan 29 '20 at 19:47
-1

The HTTP Response Code you are getting is 403 which means FORBIDDEN. one of the main reasons to get such an error requesting general repositories, could be the restrictions that are applied for some countries due to some sort of sanctions. countries like North Korea, Syria, Iran and some other places.

If that's the case, i suggest using some kind of proxy that isn't located in those countries. and then try again. this time i think you would be able to fetch dependencies from Spring repositories.

chubock
  • 834
  • 8
  • 16
  • In general a 403 status does not indicate that any sanctions have been imposed. The accepted answer above is the actual reason for the error here. – mgrstnr Jan 31 '20 at 13:53
  • i said one of the main reasons could be the restrictions. Here in Iran developers face FORBIDDEN response code a lot when they try to fetch dependencies from several repositories. and that's mostly because of sanctions. I thought maybe this answer could be helpful for those developers developing at such circumstances. – chubock Feb 01 '20 at 08:09
  • 1
    Some non-sanctioned country developers should consider that restricted country firewalls might return 403, although I would think it could also be 503. – Chris Wolf Jan 14 '21 at 02:01
  • I miss you bro, good luck. – AmerllicA Feb 15 '22 at 10:49