Discussion:
Clarification needed regarding modulepath containing multiple modules with the same name
cowwoc
2018-12-05 13:01:49 UTC
Permalink
(Apologies if this gets posted twice. My first attempt didn't seem to go
through)

Hi,

Can one of the committers for project jigsaw please post a comment in this
issue https://issues.apache.org/jira/browse/MJLINK-27

I have been trying, unsuccessfully, to reach consensus with Maven
committers.

It is my interpretation that the modulepath may contain multiple modules
with the same name, so long as the module entries are JAR files as opposed
to directories.

Maven committers are of the opinion that the modulepath may never contain
multiple modules with the same name.

It is also worth considering whether the spec wording needs some further
clarifications on this point.

Thank you,
Gili



--
Sent from: http://jigsaw-dev.1059479.n5.nabble.com/
Alan Bateman
2018-12-05 13:52:48 UTC
Permalink
Post by cowwoc
(Apologies if this gets posted twice. My first attempt didn't seem to go
through)
Hi,
Can one of the committers for project jigsaw please post a comment in this
issue https://issues.apache.org/jira/browse/MJLINK-27
I have been trying, unsuccessfully, to reach consensus with Maven
committers.
It is my interpretation that the modulepath may contain multiple modules
with the same name, so long as the module entries are JAR files as opposed
to directories.
Maven committers are of the opinion that the modulepath may never contain
multiple modules with the same name.
JEP 261 reads: "When searching a module path for a module of a
particular name, the module system takes the first definition of a
module of that name. "

so yes, if you've got say two directories on the module path and they
both contain module M then M will be found in the first directory, the M
in the second directory will be ignored.

The linked comment about it being an error to have a directory on the
module path containing multiple versions of the same module is also correct.

I can't tell from the linked issues if this is an issue with Maven's
module path implementation or something specific to the Maven jlink
plugin. I'm sure Robert will know.

-Alan

Loading...