spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Can't fetch/build javadoc after upgrading to 3.3.x

Open nixel2007 opened this issue 1 year ago • 4 comments
trafficstars

Hello. I have an application based on spring boot that also produces the javadoc (both html and jar) with external links (to dependencies javadoc site) during the build.

After upgrading dependency to spring boot 3.3.0/3.3.1 this build started to fail with error:

error: Error fetching URL: https://docs.spring.io/spring-boot/docs/3.3.1/api/ (java.io.FileNotFoundException: https://docs.spring.io/spring-boot/docs/3.3.1/api/package-list) 

Broken build logs: https://github.com/1c-syntax/bsl-language-server/actions/runs/9611169437/job/26509211579?pr=3315

Normal build logs: https://github.com/1c-syntax/bsl-language-server/actions/runs/9534713350/job/26279577391#step:4:37

Was it an intended change? Any tips on what should he configured to make it work again?

nixel2007 avatar Jun 22 '24 05:06 nixel2007

I think you can change your javadoc configuration (most likely in your maven or gradle build) to use the following URL now: https://docs.spring.io/spring-boot/3.3.0/api/java/

Please let us know if this works for you.

bclozel avatar Jun 22 '24 06:06 bclozel

I tried to add javadoc links to 3.3.0 and latest, but error is the same:

https://github.com/1c-syntax/bsl-language-server/pull/3315/files

nixel2007 avatar Jun 23 '24 05:06 nixel2007

This is still using the wrong URL. Any idea where this can come from?

error: Error fetching URL: https://docs.spring.io/spring-boot/docs/3.3.1/api/ (java.io.FileNotFoundException: https://docs.spring.io/spring-boot/docs/3.3.1/api/package-list)

bclozel avatar Jun 23 '24 07:06 bclozel

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues avatar Jun 30 '24 07:06 spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

spring-projects-issues avatar Jul 07 '24 07:07 spring-projects-issues

Sorry for a big delay. I executed graldew javadoc --debug and found this in the logs:

2024-11-05T14:36:07.306+0100 [INFO] [org.gradle.api.Task] Using well known link 'https://docs.spring.io/spring-boot/docs/3.3.5/api/' for 'org.springframework.boot:spring-boot-autoconfigure:3.3.5'
2024-11-05T14:36:07.306+0100 [INFO] [org.gradle.api.Task] Using well known link 'https://docs.spring.io/spring-boot/docs/3.3.5/api/' for 'org.springframework.boot:spring-boot:3.3.5'
2024-11-05T14:36:07.306+0100 [INFO] [org.gradle.api.Task] Using well known link 'https://docs.spring.io/spring-boot/docs/3.3.5/api/' for 'org.springframework.boot:spring-boot-starter-logging:3.3.5'
2024-11-05T14:36:07.306+0100 [INFO] [org.gradle.api.Task] Using well known link 'https://docs.spring.io/spring-boot/docs/3.3.5/api/' for 'org.springframework.boot:spring-boot-starter-tomcat:3.3.5'
2024-11-05T14:36:13.894+0100 [INFO] [org.gradle.api.Task] Using well known link 'https://docs.spring.io/spring-boot/docs/3.3.5/api/' for 'org.springframework.boot:spring-boot-starter-json:3.3.5'
2024-11-05T14:36:13.894+0100 [INFO] [org.gradle.api.Task] Using well known link 'https://docs.spring.io/spring-boot/docs/3.3.5/api/' for 'org.springframework.boot:spring-boot-starter:3.3.5'
2024-11-05T14:36:14.155+0100 [INFO] [org.gradle.api.Task] Using well known link 'https://docs.spring.io/spring-boot/docs/3.3.5/api/' for 'org.springframework.boot:spring-boot-starter-websocket:3.3.5'
2024-11-05T14:36:14.155+0100 [INFO] [org.gradle.api.Task] Using well known link 'https://docs.spring.io/spring-boot/docs/3.3.5/api/' for 'org.springframework.boot:spring-boot-starter-web:3.3.5'

I'll try to specify links to javadoc.io for those libraries and check if it will help

cc @bclozel

nixel2007 avatar Nov 05 '24 13:11 nixel2007

Thanks for your feedback. I couldn't find any reference to this URL in our repository nor any link to a Gradle task that would log this message. Maybe this is a custom task being applied in your project.

bclozel avatar Nov 05 '24 14:11 bclozel

https://github.com/freefair/gradle-plugins/blob/90d4b404697b1693e99b15642092841f7b3f408b/maven-plugin/src/main/java/io/freefair/gradle/plugins/maven/javadoc/ResolveJavadocLinks.java#L115

I found a log line. it comes from frefair.javadoc-links plugin. I'll continue my investigations and will post my findings.

But once again it works well with spring-boot 3.2 and breaks with 3.3, so I guess something was changed in infra/pom/jar/whatever. I'll try to find what causes the plugin failure.

nixel2007 avatar Nov 05 '24 14:11 nixel2007

And here is a source of the links: https://github.com/freefair/gradle-plugins/blob/main/maven-plugin/src/main/java/io/freefair/gradle/plugins/maven/javadoc/linkproviders/SpringLinkProvider.java

nixel2007 avatar Nov 05 '24 14:11 nixel2007

@bclozel I check the javadoc logs for SB 3.2, and this is interesting. Link for 3.2.5 actually works: https://docs.spring.io/spring-boot/docs/3.2.5/api/

but not for 3.3.5: https://docs.spring.io/spring-boot/docs/3.3.5/api/

nixel2007 avatar Nov 05 '24 14:11 nixel2007

I think you should raise this against the project providing the task, not Spring Boot. We know the URL changed between versions, we redesigned our reference documentation so this is expected.

bclozel avatar Nov 05 '24 14:11 bclozel

Ok, got it, thank you. Is new URL available for old version of spring-boot or I need to compare versions and use ocs.spring.io/spring-boot/docs/$version for old ones, and https://docs.spring.io/spring-boot/api/java/ for new ones? also is there a way to specify version of javadoc for new site? I tried to substitute version into URL but either end up with 3.3.5 or get 404

nixel2007 avatar Nov 05 '24 14:11 nixel2007

3.3.x is located here: https://docs.spring.io/spring-boot/api/java/ upcoming 3.4.x is here: https://docs.spring.io/spring-boot/3.4/api/java/index.html

bclozel avatar Nov 05 '24 14:11 bclozel

Thanks again, Brian. I hope next update from me will be with a plugin version number, where issue is resolved :)

nixel2007 avatar Nov 05 '24 14:11 nixel2007

The issue was fixed in freefair plugins version 8.11

Thanks.

nixel2007 avatar Nov 21 '24 20:11 nixel2007