-
Notifications
You must be signed in to change notification settings - Fork 182
Description
Affected version
3.5.9
Bug description
the java module system supports the ability to compile and execute "patch modules" these are patches to existing modules that override pre-existing content with replacements.
in order to compile (patch) classes for inclusion as a "patch module" the javac compiler supports a cmdline option: --patch-module <module-name>=<path-to-module-source-root>
invoking javac directly with the --patch-module... option specified works as intended, however when attempting to use the maven plugin compiler with:
<compilerArgs> <arg>--patch-module</arg> <arg>java.base=${project.basedir}/...</arg> </compilerArgs>
specifying the same '' as with the invocation of javac the plugin fails to compile the patch classes.
the failures reported suggest that the compiler is failing to resolve dependencies expressed in the sources of the patch classes against the target module being patched...
e.g:
I have a module that contains a number of classes and packages, and I wish to patch an existing class therein
so I create a "patch" class in tne maven project.
such a class may of course refer to other classes that already exist in the module to be patch, but those dependencies are not patched themselves.
the patched class compilation will fail (when compiled by the plugin) with errors naming any references to
dependencies in the target module as non-existent