Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links to Framework and Servlet Javadoc from Framework's Kotlin API documentation are broken #32797

Closed
wilkinsona opened this issue May 11, 2024 · 5 comments
Assignees
Labels
status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Milestone

Comments

@wilkinsona
Copy link
Member

wilkinsona commented May 11, 2024

Affects: 6.0.x and 6.1.x

When the Kotlin API documentation links to types and methods in the Java API, those links are broken.

For example, https://docs.spring.io/spring-framework/docs/6.0.x/kdoc-api/spring-beans/org.springframework.beans.factory/index.html links to https://docs.spring.io/spring-framework/docs/6.0.x/kdoc-api/spring-beans/org.springframework.beans.factory/-listable-bean-factory/index.html which 404s.

5.3.x is not affected where, for example, https://docs.spring.io/spring-framework/docs/5.3.x/kdoc-api/spring-beans/org.springframework.beans.factory/index.html links to https://docs.spring.io/spring-framework/docs/5.3.x/javadoc-api/org/springframework/beans/factory/ListableBeanFactory.html.

We had the same problem in Spring Boot's Kotlin API documentation and fixed it by configuring the package list URL to point to the element list for the Java API. We're using Dokkatoo, but perhaps a similar fix is possible with the Dokka Gradle plugin.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label May 11, 2024
@sbrannen sbrannen added type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels May 12, 2024
@sbrannen sbrannen added this to the 6.1.7 milestone May 12, 2024
@github-actions github-actions bot added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-6.0.x labels May 12, 2024
@sbrannen sbrannen self-assigned this May 12, 2024
@sbrannen
Copy link
Member

sbrannen commented May 12, 2024

Indeed, when running the :spring-beans:dokkaHtmlPartial Gradle task on 6.1.x, we see the following error.

Failed to download package-list from https://docs.spring.io/spring-framework/docs/current/javadoc-api/package-list, this might suggest that remote resource is not available, module is empty or dokka output got corrupted

Thanks for reporting this!

I'm looking into it.


We see the same kind of error for the Servlet API.

Failed to download package-list from https://javadoc.io/doc/jakarta.servlet/jakarta.servlet-api/latest/package-list, this might suggest that remote resource is not available, module is empty or dokka output got corrupted

@aSemy
Copy link

aSemy commented May 12, 2024

Looks like the link has changed:

IIRC the default name changed in a newer Java version.

I just wanted to highlight this because it's a common problem. Maybe there's a way it can be made better on the Dokka side?

@sbrannen

This comment was marked as resolved.

@sbrannen sbrannen changed the title Links to Framework's Java API documentation from its Kotlin API documentation are broken Links to Framework and Servlet Javadoc from Framework's Kotlin API documentation are broken May 12, 2024
sbrannen added a commit that referenced this issue May 12, 2024
This commit fixes links from Spring Framework's Dokka HTML to Javadoc
for Spring Framework and Servlet APIs by explicitly configuring the
`element-list` page as the `package-list` in the Dokka Gradle plugin.

Closes gh-32797

(cherry picked from commit 7536980)
@aSemy

This comment was marked as resolved.

@sbrannen

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

4 participants