OiO.lk Blog java Cannot Build Spring Framework: ClientProtocolException when accessing spring-doc-resources
java

Cannot Build Spring Framework: ClientProtocolException when accessing spring-doc-resources


I’m trying to build the spring-framework project, v5.2.21.RELEASE, using these instructions; and when I run the following command, I get the error list below. It appears to be attempting to access a password-protected JFrog repo to containing "spring-doc-resources". I’m fine not building the docs if there’s a workaround that will get the project built and published to Maven local.

./gradlew pTML -PskipDocs

Starting a Gradle Daemon, 3 incompatible Daemons could not be reused, use --status for details
> Task :downloadResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':downloadResources'.
> de.undercouch.gradle.tasks.download.org.apache.http.client.ClientProtocolException: HTTP status code: 401, URL: https://repo.spring.io/release/io/spring/docresources/spring-doc-resources/0.2.1.RELEASE/spring-doc-resources-0.2.1.RELEASE.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 39s
24 actionable tasks: 24 executed

Gradle & Java Versions

I’m trying to build with JDK 11 because the project appears to be using Gradle 5.6.4, which relies on Groovy 2.5.4, which only supports JDKs up to 11.

./gradlew –version
------------------------------------------------------------
Gradle 5.6.4
------------------------------------------------------------

Build time:   2019-11-01 20:42:00 UTC
Revision:     dd870424f9bd8e195d614dc14bb140f43c22da98

Kotlin:       1.3.41
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM:          11.0.13 (Amazon.com Inc. 11.0.13+8-LTS)
OS:           Mac OS X 15.0.1 x86_64
java –version
openjdk 11.0.13 2021-10-19 LTS
OpenJDK Runtime Environment Corretto-11.0.13.8.1 (build 11.0.13+8-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.13.8.1 (build 11.0.13+8-LTS, mixed mode)



You need to sign in to view this answers

Exit mobile version