Abhinay Agarwal created MJAVADOC-806:
----------------------------------------

             Summary: Modular vs Non-modular: difference in behaviour
                 Key: MJAVADOC-806
                 URL: https://issues.apache.org/jira/browse/MJAVADOC-806
             Project: Maven Javadoc Plugin
          Issue Type: Bug
    Affects Versions: 3.8.0
            Reporter: Abhinay Agarwal


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 

{color:#8c8c8c}<docfilessubdirs>true</docfilessubdirs>

{color}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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to