Add javadoc cross-linking for Fabric8 modules and external dependencies#7445
Open
manusa wants to merge 1 commit intofabric8io:mainfrom
Open
Add javadoc cross-linking for Fabric8 modules and external dependencies#7445manusa wants to merge 1 commit intofabric8io:mainfrom
manusa wants to merge 1 commit intofabric8io:mainfrom
Conversation
2ba144e to
aecaed5
Compare
aecaed5 to
e91ef8f
Compare
Adds <offlineLinks> and <links> configuration to the maven-javadoc-plugin in both the release and javadoc-test profiles so that generated javadocs contain clickable hyperlinks to referenced types from other Fabric8 modules and external dependencies (Jackson, SLF4J) via javadoc.io. Fabric8 cross-module links use offlineLinks with static element-list files (in doc/javadoc-links/) to avoid network fetches for unpublished SNAPSHOT versions. External dependency links use regular links. A `make generate-javadoc-links` target is provided to regenerate the element-list files from source directories when packages change. Fixes fabric8io#1105 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e91ef8f to
afd8c74
Compare
Member
Author
|
@ash-thakur-rh I'm not sure if this is something we want to add or not. It adds more complexity to the build but it also improves the help discoverability. These days this is tantamount since many are starting to rely on coding agents which require context discovery. I'll leave this here waiting for feedback. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
<offlineLinks>configuration to themaven-javadoc-pluginin both thereleaseandjavadoc-testprofiles so that generated javadocs contain clickable hyperlinks to referenced types from other Fabric8 modules and external dependencies via javadoc.io.All links use offline mode (
-linkoffline) with staticelement-listfiles checked intodoc/javadoc-links/. This avoids any network fetches during javadoc generation, which is critical because:Cross-linked modules
kubernetes-model-core,kubernetes-model-common,kubernetes-client-api,kubernetes-client,openshift-client-api,openshift-clientjackson-databind,jackson-core,slf4j-apiGenerated link examples
KubernetesResource→javadoc.io/doc/io.fabric8/kubernetes-model-core/...ObjectMapper→javadoc.io/doc/com.fasterxml.jackson.core/jackson-databind/...TypeReference→javadoc.io/doc/com.fasterxml.jackson.core/jackson-core/...docs.oracle.com/en/java/javase/11/docs/api/...(unchanged, viadetectJavaApiLink)Files changed
pom.xml—<offlineLinks>and<detectOfflineLinks>false</detectOfflineLinks>in both profiles, plus<javadoc.links>property and user-agent headerdoc/javadoc-links/*/element-list— Static package lists for each linked artifact (9 files)Makefile—make generate-javadoc-linkstarget to regenerate element-list files from source directoriesCLAUDE.md— Documents the new make targetCHANGELOG.md— Entry under ImprovementsNotes
jackson-annotationsis excluded because its Maven artifact version (2.20) differs from${jackson.version}(2.20.0)element-listfiles are used (notpackage-list) — having both in the same directory causes JDK 11's javadoc tool to silently fail link resolutionfailOnErroris left at the default (true) so real javadoc errors still break the buildFixes #1105
Test plan
kubernetes-client-apiwith-Pjavadoc-test— build succeeds with no network errorsError fetching URLfailures)🤖 Generated with Claude Code