Automatic module names
rfscholte at apache.org
Tue Feb 7 13:32:50 UTC 2017
On Tue, 07 Feb 2017 14:20:07 +0100, Brian Fox <brianf at infinity.nu> wrote:
> On Fri, Feb 3, 2017 at 10:40 AM, Alan Bateman <Alan.Bateman at oracle.com>
>> As regards the example naming clash then these two projects might
>> get complaints over their poor choice of artifacts, esp. when artifacts
>> both projects are in same directory (say where someone distributes with
>> JAR files in a `lib` directory).
> This is an incorrect assumption.
> At present these artifact names do not conflict, neither in the
> coordinates, nor in the the class package. It's in fact the auto module
> algorithm which ignores both the project's self chosen full coordinate,
> well as any version numbers present in the filename which is solely
> responsible for introducing the conflict.
For Maven, at compile time the absolute paths of the jars in the local
repository are used. In case of creating a distribution Maven is capable
of detecting filename collisions, in which case the files will be renamed
according to a strategy. Most common way is to prefix the name with the
groupId, but the renaming strategy is up to the end-user.
This also made me aware that this would suddenly change the name of the
automodule, unless the module-info is rewritten.
More information about the jigsaw-dev