apache / apache/maven-javadoc-plugin
[MJAVADOC-806] Modular vs Non-modular: difference in behaviour
- Dominant language
- Java
- Stars
- 107
- Forks
- 116
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 16
Description
**[Abhinay Agarwal](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=abhinay)** opened **[MJAVADOC-806](https://issues.apache.org/jira/browse/MJAVADOC-806?redirect=false)** and commented
For modular projects, inside apidocs a separate directory with the module name is created. All class files are placed inside this directory, along with the `module-summary.html`.
For non-modular projects, html against all class files are directly placed in apidocs.
This works with no issues until I want to include doc-files. These files are placed directly inside apidocs irrespective of whether it is a modular or non-modular project, which breaks the html files if I want to move from non-modular setup to modular.
javadoc plugin should check and place the doc-files inside the module directory if the project is a modular project.
Also, I found that doc-files are copied in modular project only when I set
\true\
where as, it is copied in non-modular setup irrespective of this flag. Any particular reason for this behaviour?
Here is a sample project: https://github.com/abhinayagarwal/JavadocTest
It tries to add an image to the javadoc. Deleting the `module-info.java` file will create html files with images, as the doc-files are present in the correct directory relative to the html files.
If you run javadoc goal with module-info.java, the image in doc-file is placed out the `module` directory, breaking the html.
---
**Affects:** 3.8.0
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with the linked JavadocTest sample by running the javadoc goal with and without module-info.java. Compare the generated apidocs layout and doc-files placement, including the effect of docfilessubdirs. Done means modular and non-modular output both keep doc-files beside the HTML files that reference them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100