René's URL Explorer Experiment


Title: Improve our approach to javadoc linking · Issue #130 · scijava/pom-scijava · GitHub

Open Graph Title: Improve our approach to javadoc linking · Issue #130 · scijava/pom-scijava

X Title: Improve our approach to javadoc linking · Issue #130 · scijava/pom-scijava

Description: The pom-scijava-base ancestor POM includes configuration hardcoding several links for the javadoc tool. This configuration makes classes for SciJava-based projects clickable, pointing uniformly to javadoc.scijava.org endpoints aggregatin...

Open Graph Description: The pom-scijava-base ancestor POM includes configuration hardcoding several links for the javadoc tool. This configuration makes classes for SciJava-based projects clickable, pointing uniformly to ...

X Description: The pom-scijava-base ancestor POM includes configuration hardcoding several links for the javadoc tool. This configuration makes classes for SciJava-based projects clickable, pointing uniformly to ...

Opengraph URL: https://github.com/scijava/pom-scijava/issues/130

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve our approach to javadoc linking","articleBody":"The [pom-scijava-base](https://github.com/scijava/pom-scijava-base) ancestor POM includes [configuration hardcoding several links](https://github.com/scijava/pom-scijava-base/blob/master/pom.xml#L412-L455) for the javadoc tool. This configuration makes classes for SciJava-based projects clickable, pointing uniformly to [javadoc.scijava.org](https://javadoc.scijava.org/) endpoints aggregating multiple components. For example, the URL https://javadoc.scijava.org/SciJava/ includes javadoc for many components in the [scijava GitHub org](https://github.com/scijava) with groupId `org.scijava`. The general pattern is \"Maven groupId = GitHub org = javadoc.scijava.org endpoint\".\r\n\r\n## Problems\r\n\r\n1. __Reproducibility.__ The javadoc.scijava.org endpoints are not reproducible. They are like SNAPSHOTs, always serving the latest javadoc. Properly, we should be linking to stable API javadoc corresponding to the versions depended upon by each built project. Otherwise, rebuilding the javadoc later will produce a different result, and potentially javadoc build errors if e.g. a class was later removed.\r\n\r\n2. __Performance.__ The more `\u003clink\u003e` entries hardcoded by pom-scijava-base, the longer everyone's javadoc builds take, because the javadoc tool scrapes the index from each linked URL.\r\n\r\n3. __Extensibility.__ Projects wanting to extend their javadoc with links other than what pom-scijava-base hardcodes must add those links manually to their project POMs.\r\n\r\n4. __Separation of concerns.__ The pom-scijava-base should not be hardcoding links related to components from the pom-scijava BOM. Or to put another way: the list of javadoc links should be defined here in pom-scijava, and fully correspond to all the components managed here.\r\n\r\n## Solutions\r\n\r\n### How to extend a project POM with more links\r\n\r\nThe following block adds more javadoc URL links:\r\n\r\n```xml\r\n\u003cbuild\u003e\r\n  \u003cpluginManagement\u003e\r\n    \u003cplugins\u003e\r\n      \u003cplugin\u003e\r\n        \u003cartifactId\u003emaven-javadoc-plugin\u003c/artifactId\u003e\r\n        \u003cconfiguration\u003e\r\n          \u003clinks combine.children=\"append\"\u003e\r\n            \u003clink\u003ehttps://javadoc.io/static/commons-io/commons-io/${commons-io.version}\u003c/link\u003e\r\n            \u003clink\u003ehttps://javadoc.io/static/org.ojalgo/ojalgo/${ojalgo.version}\u003c/link\u003e\r\n          \u003c/links\u003e\r\n        \u003c/configuration\u003e\r\n      \u003c/plugin\u003e\r\n    \u003c/plugins\u003e\r\n  \u003c/pluginManagement\u003e\r\n\u003c/build\u003e\r\n```\r\n\r\n### How to achieve link reproducibility\r\n\r\nNote the use of the wonderful `javadoc.io` service to link _reproducibly_ to individual component javadoc available from Maven Central! I think `javadoc.io` is the nicest way forward for reproducible javadoc permalinks. We don't have to deploy our own javadoc infrastructure—just continue working toward publishing as many of our artifacts as possible to Maven Central as they mature.\r\n\r\n### How to balance javadoc build times with correct linking\r\n\r\nFirstly: __we shouldn't unilaterally add javadoc links for the entire component collection.__ I tried updating pom-scijava to use granular javadoc.io links instead of our fuzzy aggregating javadoc.scijava.org links. This changed the configuration from 37 unstable (javadoc.scijava.org) links to 231 stable ones (javadoc.io). Unfortunately, javadoc build time appears to scale pretty much linearly with this number: 0 links -\u003e 11s; 37 links -\u003e 48s; 231 links -\u003e 215s.\r\n\r\nTherefore, every project should include links in its javadoc configuration matching its direct dependencies. (Assuming a project's dependencies are structured correctly, with `mvn dependency:analyze` not reporting problems: transitive dependencies are not part of the project's public API, and thus no such links will be needed for that project's javadoc.)\r\n\r\nIt would be nice is the maven-javadoc-plugin had a feature that did this automatically. The [`\u003cdetectLinks\u003e` option](https://maven.apache.org/plugins/maven-javadoc-plugin/aggregate-jar-mojo.html#detectLinks) is _almost_ what we need—but because there is no way to know what remote javadoc URL you want for each given `groupId:artifactId` dependency, it uses a simple heuristic, `${project.url}/apidocs`, which will fail for the vast majority of components.\r\n\r\n## Conclusion\r\n\r\nWe could enhance the maven-javadoc-plugin to support configuration declaring a mapping from groupId:artifactId to javadoc link URL, with the `\u003cdetectLinks\u003e` feature using this mapping preferentially when discerning the links. For performance, we would need to double check that `\u003cdetectLinks\u003e` only includes links for _direct_ dependencies, not transitive ones—or else add a flag controlling this behavior.","author":{"url":"https://github.com/ctrueden","@type":"Person","name":"ctrueden"},"datePublished":"2020-06-15T15:01:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/130/pom-scijava/issues/130"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8a4161aa-1282-2174-9c2d-985ce4aba65d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBF8A:D2C2F:79676E:AB03DA:69724D94
html-safe-nonce5f72d1772a07bca6ba77d63ec409941bdf500f9b37414a6d80bfdaf5ebf2daef
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjhBOkQyQzJGOjc5Njc2RTpBQjAzREE6Njk3MjREOTQiLCJ2aXNpdG9yX2lkIjoiMjA2MTA3ODcwODg4ODk0ODExNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac381fbe72eeb40b42f33121a56ec007d8ea6fa7107361872a60a5994a99592691
hovercard-subject-tagissue:638924338
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/scijava/pom-scijava/130/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3d7cde6ba6334d5fd7962f9073c5c8b9ea50678a3340d9dca015d42f0e8ddbff/scijava/pom-scijava/issues/130
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3d7cde6ba6334d5fd7962f9073c5c8b9ea50678a3340d9dca015d42f0e8ddbff/scijava/pom-scijava/issues/130
og:image:altThe pom-scijava-base ancestor POM includes configuration hardcoding several links for the javadoc tool. This configuration makes classes for SciJava-based projects clickable, pointing uniformly to ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamectrueden
hostnamegithub.com
expected-hostnamegithub.com
None0bf8f9c572ee803398ae08d37b5c4215b9e90e3afebbe4c722ebdecb8f680830
turbo-cache-controlno-preview
go-importgithub.com/scijava/pom-scijava git https://github.com/scijava/pom-scijava.git
octolytics-dimension-user_id1262770
octolytics-dimension-user_loginscijava
octolytics-dimension-repository_id15903202
octolytics-dimension-repository_nwoscijava/pom-scijava
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id15903202
octolytics-dimension-repository_network_root_nwoscijava/pom-scijava
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef1a765aea9b6f5dcd4bf980043cb1434723fac64
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/scijava/pom-scijava/issues/130#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fscijava%2Fpom-scijava%2Fissues%2F130
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fscijava%2Fpom-scijava%2Fissues%2F130
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=scijava%2Fpom-scijava
Reloadhttps://patch-diff.githubusercontent.com/scijava/pom-scijava/issues/130
Reloadhttps://patch-diff.githubusercontent.com/scijava/pom-scijava/issues/130
Reloadhttps://patch-diff.githubusercontent.com/scijava/pom-scijava/issues/130
scijava https://patch-diff.githubusercontent.com/scijava
pom-scijavahttps://patch-diff.githubusercontent.com/scijava/pom-scijava
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fscijava%2Fpom-scijava
Fork 35 https://patch-diff.githubusercontent.com/login?return_to=%2Fscijava%2Fpom-scijava
Star 28 https://patch-diff.githubusercontent.com/login?return_to=%2Fscijava%2Fpom-scijava
Code https://patch-diff.githubusercontent.com/scijava/pom-scijava
Issues 9 https://patch-diff.githubusercontent.com/scijava/pom-scijava/issues
Pull requests 0 https://patch-diff.githubusercontent.com/scijava/pom-scijava/pulls
Actions https://patch-diff.githubusercontent.com/scijava/pom-scijava/actions
Projects 0 https://patch-diff.githubusercontent.com/scijava/pom-scijava/projects
Wiki https://patch-diff.githubusercontent.com/scijava/pom-scijava/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/scijava/pom-scijava/security
Please reload this pagehttps://patch-diff.githubusercontent.com/scijava/pom-scijava/issues/130
Insights https://patch-diff.githubusercontent.com/scijava/pom-scijava/pulse
Code https://patch-diff.githubusercontent.com/scijava/pom-scijava
Issues https://patch-diff.githubusercontent.com/scijava/pom-scijava/issues
Pull requests https://patch-diff.githubusercontent.com/scijava/pom-scijava/pulls
Actions https://patch-diff.githubusercontent.com/scijava/pom-scijava/actions
Projects https://patch-diff.githubusercontent.com/scijava/pom-scijava/projects
Wiki https://patch-diff.githubusercontent.com/scijava/pom-scijava/wiki
Security https://patch-diff.githubusercontent.com/scijava/pom-scijava/security
Insights https://patch-diff.githubusercontent.com/scijava/pom-scijava/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/scijava/pom-scijava/issues/130
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/scijava/pom-scijava/issues/130
Improve our approach to javadoc linkinghttps://patch-diff.githubusercontent.com/scijava/pom-scijava/issues/130#top
https://patch-diff.githubusercontent.com/ctrueden
next-releasehttps://github.com/scijava/pom-scijava/milestone/5
https://github.com/ctrueden
https://github.com/ctrueden
ctruedenhttps://github.com/ctrueden
on Jun 15, 2020https://github.com/scijava/pom-scijava/issues/130#issue-638924338
pom-scijava-basehttps://github.com/scijava/pom-scijava-base
configuration hardcoding several linkshttps://github.com/scijava/pom-scijava-base/blob/master/pom.xml#L412-L455
javadoc.scijava.orghttps://javadoc.scijava.org/
https://javadoc.scijava.org/SciJava/https://javadoc.scijava.org/SciJava/
scijava GitHub orghttps://github.com/scijava
optionhttps://maven.apache.org/plugins/maven-javadoc-plugin/aggregate-jar-mojo.html#detectLinks
ctruedenhttps://patch-diff.githubusercontent.com/ctrueden
next-releaseNo due datehttps://github.com/scijava/pom-scijava/milestone/5
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.