1

So, I am trying to build the sample spring security saml project provided in https://docs.spring.io/spring-security-saml/docs/1.0.x/reference/html/chapter-quick-start.html but i get the following error when I try to build:

* What went wrong:
A problem occurred configuring root project 'spring-security-saml'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.gradle.api.plugins:gradle-tomcat-plugin:1.2.4.
     Required by:
         project :
      > Could not resolve org.gradle.api.plugins:gradle-tomcat-plugin:1.2.4.
         > Could not get resource 'https://repo.spring.io/plugins-release/org/gradle/api/plugins/gradle-tomcat-plugin/1.2.4/gradle-tomcat-plugin-1.2.4.pom'.
            > Could not GET 'https://repo.spring.io/plugins-release/org/gradle/api/plugins/gradle-tomcat-plugin/1.2.4/gradle-tomcat-plugin-1.2.4.pom'. Received status code 401 from server: Unauthorized

I cannot find a clear explanation for this but even if i try to navigate to https://repo.spring.io/plugins-release/org/gradle/api/plugins/gradle-tomcat-plugin/1.2.4/gradle-tomcat-plugin-1.2.4.pom on the browser i get the same error.

Any ideas would be appreciated!

1 Answers1

1

Hello I had the same problem, according to this answer it's due to the fact that spring repos cache artifact and when the artifact hasn't yet been cached it returns 401. I solved this problem simply adding jcenter to the my configured repositories in gralde.build like the following :

repositories {
         jcenter()
         maven { url "https://repo.spring.io/plugins-release" }
}
Youssef NAIT
  • 1,362
  • 11
  • 27