[
https://issues.apache.org/jira/browse/MJAVADOC-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17536017#comment-17536017
]
Phil edited comment on MJAVADOC-652 at 5/12/22 9:59 AM:
--------------------------------------------------------
I created a simple PR that adds a parameter to forcibly turn off support for
module paths if desired
(https://github.com/apache/maven-javadoc-plugin/pull/139)
This might not be the best approach, but could be a workaround.
was (Author: philsmart):
I created a simple PR that adds a parameter to forcibly turn off support for
module paths if desired
([https://github.com/apache/maven-javadoc-plugin/pull/139)]
This might not be the best approach, but could be a workaround.
> Dependencies on the patch-module path
> -------------------------------------
>
> Key: MJAVADOC-652
> URL: https://issues.apache.org/jira/browse/MJAVADOC-652
> Project: Maven Javadoc Plugin
> Issue Type: Bug
> Components: javadoc
> Affects Versions: 3.2.0, 3.3.0, 3.3.1, 3.3.2, 3.4.0
> Reporter: Phil
> Assignee: Robert Scholte
> Priority: Major
> Attachments: MJAVADOC-652-PATCHMODULE.zip, MJAVADOC-652.zip
>
>
> When building with Java 11 (so >9) the Javadoc options argument is built
> using the module-path and patch-module. Some of the dependencies I work with
> are ending up in patch-module which generates an error on Javadoc creation -
> class not found.
> From what I can see from the code (3.2.0), the decision of which argument to
> use is based on:
> # If the dependency jar has a module-info.class, add to module-path
> # If the dependency jar has a MANIFEST file with Automatic-Module-Name
> defined, add to module-path.
> # If neither of the above, add to patch-module.
> The javax.servlet-API-3.1.0.jar, for example, has neither 1 nor 2, so gets
> amended to the patch-module. This then prevents Javadoc generation because
> Java is unable to link classes from the servlet API. If I put the servlet API
> into the module-path manually it works fine.
> From my understanding, patch-module is used to either override classes in a
> module or augment contents of a module. In this case, it is its own 'module'
> (I think) and should not be patched into my module. I do not see a reason to
> put any of my dependencies into patch-module.
> Is this a bug, or just an unfortunate consequence of having to deal with
> non-modular dependencies when building under a Java version that supports
> modules. For what it is worth, the project I work on does not use modules,
> everything on -classpath works just fine.
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)