-
Enhancement
-
Resolution: Fixed
-
P3
-
9
-
None
-
b01
This leads to a very cluttered top-level directory, and worse, it allows the possibility of files for one module overwriting some of the files for a different module, in the case when both modules contain a like-named package. While that may be uncommon, it is not disallowed, because javadoc does not have equivalent to the constraints on modules being analyzed by the compiler (javac) and runtime.
A better organization would be to have a top-level directory per module, and to create the package-hierarchy for the types in the module as a directory tree under the top-level module directory. Module-specific files, like the module summary page then become <module-name>/<page-kind>.html instead of <module-name>-<page-kind>.html.
For the most part, this change will be transparent to the authors writing doc-comments, because for the most part, the links are either generated by the doclet itself, to link to other program elements, or the links are generated in response to `@see` and `{@link}` tags in the documentation comment, which just abstractly reference program elements, which any details of the file layout. The one other case is when an author writes an explicit `<a href=...>` in a doc comment. The two reasons to use such links is (1) to reference user-written anchors `<a id=...>` within the documentation and (2) to reference auxiliary files, such as in `doc-files` subdirectories. We do not currently support top-level `doc-files` in a module, because of the issues being presented here. While we could support them in the current layout scheme, it would be better to settle on the preferred layout scheme before we open up the ability to use top-level `doc-files` in a module. (See JDK-8194553)
Because of the potential to negatively impact user-written `<a href=...>` links, we should provide a temporary option to have the doclet revert to its current package-oriented behavior. Using such an option should generate a warning, advising authors to update their docs to accomodate the module-oriented layout.
- csr for
-
JDK-8196112 Organize output files by module/package, not just package
- Closed
- relates to
-
JDK-8197865 @moduleGraph taglet generates incorrect link to module graph
- Resolved
-
JDK-8209358 Broken links in API docs for css page, fxml page, and all image files
- Resolved
-
JDK-8217270 Broken link to cssref.html in javafx.controls package docs
- Resolved
-
JDK-8199465 {@docRoot} references need to be updated to reflect new module/package structure
- Closed
-
JDK-8196720 Remove --no-module-directories option
- Resolved
-
JDK-8194553 Allow doc-files for module-info.java
- Open
-
JDK-8201396 fix broken links generated by javadoc doclet
- Resolved
-
JDK-8205646 Broken link in jdk.jsobject
- Resolved
-
JDK-8195796 Reduce the size of relative URLs in generated docs
- Resolved