[
https://issues.apache.org/jira/browse/MJLINK-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16317597#comment-16317597
]
Gili edited comment on MJLINK-7 at 1/9/18 3:05 AM:
---------------------------------------------------
[~khmarbaise] Per https://stackoverflow.com/a/46573805/14731 no single
directory may contain two elements that export the same module (because
iteration order of a directory is undefined) but two separate elements on the
modulepath (whose ordering is explicit) are allowed to export the same name. My
understanding is that when importing a module, the first element exporting that
name gets used.
Further, if you test this outside of Maven (using {{javac}} and {{java}})
tools, they work just fine with modulepath-style shadowing.
was (Author: cowwoc):
[~khmarbaise] Per https://stackoverflow.com/a/46573805/14731 no single
directory may contain two elements that export the same module (because
iteration order of a directory is undefined) but two separate elements on the
modulepath (whose ordering is explicit) are allowed to export the same name. My
understanding is that when importing a module, the first element exporting that
name gets used.
> Code incorrectly assumes that two modules won't have the same name
> ------------------------------------------------------------------
>
> Key: MJLINK-7
> URL: https://issues.apache.org/jira/browse/MJLINK-7
> Project: Maven JLink Plugin
> Issue Type: Bug
> Affects Versions: 3.0.0-alpha-2
> Reporter: Gili
>
> https://github.com/apache/maven-plugins/blob/bfa65c310d7f16671db672773f73fd64f05edfd0/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java#L327
> wrongfully assumes that two modules won't share the same name (this is legal
> as discussed at https://stackoverflow.com/a/46573805/14731).
> Please review this code to make sure it correctly handles multiple modules
> having the same name.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)