Skip to content

Conversation

@JINU-CHANG
Copy link

Fixes #5273

What's Changed?

  • Improved the handling of the hard-coded
    https://docs.junit.org/current link in Javadoc by making it conditional on the build environment.
  • When building documentation locally, links to the User Guide in Javadoc now point to the
    locally built User Guide generated as part of the same build.
    This allows cross-references to documentation for unreleased features to be verified locally.
  • In CI or release build environments, the existing behavior is preserved and links continue to
    point to https://docs.junit.org/current, ensuring that published documentation remains unchanged.

Below are the results showing that the links were correctly updated after building the project.

Before

스크린샷 2026-01-18 오후 3 47 15

After

image 스크린샷 2026-01-18 오후 3 57 02

I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

@JINU-CHANG JINU-CHANG changed the title fix: javadoc links fix javadoc links Jan 18, 2026
@JINU-CHANG JINU-CHANG force-pushed the issue-5273-fix-javadoc-links branch from 0d94b3b to 71b4dd2 Compare January 18, 2026 08:02
@mpkorstanje mpkorstanje changed the title fix javadoc links Pin links to user guide in javadoc to specific version Jan 20, 2026
Copy link
Contributor

@mpkorstanje mpkorstanje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you have grepped to confirm that a substitution happened, I don't think you have tested by actually clicking through the documentation. 😉

@JINU-CHANG JINU-CHANG force-pushed the issue-5273-fix-javadoc-links branch from 937de7e to 941bf1a Compare January 21, 2026 12:08
@JINU-CHANG
Copy link
Author

JINU-CHANG commented Jan 21, 2026

@mpkorstanje

Thank you for the review!
With your feedback, I tested the links again by clicking through the documentation.
I also fixed the incorrect path, so when building locally, the links now successfully navigate to the locally build documentation.

  1. The link has been replaced.
image
  1. The link navigates to the locally build documentation.
image

Copy link
Contributor

@mpkorstanje mpkorstanje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better! But while that does up date the Javadoc for the different project modules. The actual javadoc for the website is generated and aggregated in the documentation module. You'll want to look at documentation.gradle.kts for details.

To test you'll have to run ./gradlew antora and open the url that is logged in the console.

@JINU-CHANG JINU-CHANG force-pushed the issue-5273-fix-javadoc-links branch from 941bf1a to 966a345 Compare January 28, 2026 04:37
@JINU-CHANG
Copy link
Author

@mpkorstanje

I had missed that javadoc is generated in the documentation module 😅
I've moved the code to documentation.gradle.kts and confirmed the links are changed correctly by running ./gradlew antora. To distinguish between local and CI environments, I used System.getenv("CI") == "true".

Thank you for your helpful guidance!

image

@mpkorstanje mpkorstanje self-requested a review January 28, 2026 16:07
@mpkorstanje
Copy link
Contributor

mpkorstanje commented Jan 28, 2026

Looks good now.

I had missed that javadoc is generated in the documentation module 😅

No worries. Your changes weren't bad. The documentation of each modules goes into its javadoc.jar for that module. And it wouldn't be a bad thing to pin that documentation too. Could you please restore the code that updated those modules and add it to the current changes.

You might be able to restore the code by finding the original commit in git reflog.

@testlens-app
Copy link

testlens-app bot commented Jan 31, 2026

🔎 No tests executed 🔎

🏷️ Commit: d935857
▶️ Tests: 0 executed
⚪️ Checks: 0/0 completed


Learn more about TestLens at testlens.app.

@JINU-CHANG
Copy link
Author

JINU-CHANG commented Feb 2, 2026

@mpkorstanje
I've restored the earlier changes and added them back to this PR !
Unlike in the documentation module, this code was written without considering the local environment, since the User Guide is built with Antora. Is this the right code change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pin links to user guide in javadoc to specific versions

2 participants