[core] Host own javadoc on docs.pmd-code.org#2417
Merged
Merged
Conversation
Note: the version now needs SNAPSHOT, so that the javadoc links work on master. This is not available, if javadoc.io is used.
Generated by 🚫 Danger |
6 tasks
13 tasks
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.
This PR obsoletes #1769 . It applies on master and can be merged to pmd/7.0.x as well - it should work on the pmd/7.0.x branch exactly the same - it uses the current version number, so the two branches don't override each other
PMD's own documentation is now additionally deployed to https://docs.pmd-code.org/pmd-doc-VERSION/ . On snapshot builds, a symlink is updated, so that https://docs.pmd-code.org/snapshot/ always points to the latest snapshot. Note: This is only done on branch master, so pmd/7.0.x has no symlink.
On a release, the symlink "latest" is created and the old snaphot doc is deleted.
The javadoc linking between modules is solved manually using a relative url. This means, it should work also on javadoc.io (I'm using the same folder hierarchy). Only the linking to the core modules (pmd-core, pmd-test, pmd-lang-test) is enabled. E.g. there should never be a dependency from pmd-core -> pmd-java. But the other way round is valid and the correct linking is generated.
The javadocs of all modules are uploaded and extracted to https://docs.pmd-code.org/apidocs/ . The javadoc_tag uses now this base URL for javadoc links. Now that we have snapshot javadocs, the links in the release notes work now before a release: https://docs.pmd-code.org/snapshot/pmd_release_notes.html
On a release, the snapshot versions of the javadocs are removed.
Open Points:
net.sourceforge.pmd.util.internal?lang.*.rule.*? IMO the rule implementations should be internal, their Javadoc is irrelevant (from [doc] Generate docs for PMD 7 #1769 (comment))net.sourceforge.pmd.lang. That's why the order of the offline links provided to javadoc matters... javadoc only looks at the package list and takes the last offline link, that matches. If the order is swapped, then e.g. the link on https://docs.pmd-code.org/apidocs/pmd-java/6.23.0-SNAPSHOT/net/sourceforge/pmd/lang/java/JavaLanguageHandler.html to AbstractLanguageVersionHandler would point to pmd-test, where the class is not found. For PMD 7, we should clean this up.