How to name modules, automatic and otherwise
Stephan Herrmann
stephan.herrmann at berlin.de
Fri Feb 17 00:15:20 UTC 2017
On 02/17/2017 12:19 AM, Stephen Colebourne wrote:
> The simplest and most consistent option is reverse DNS everywhere.
> Everyone understand it and few will object!
>
> An alternative option would be that open source can use short names,
> but companies "must" use reverse DNS. But this is far from ideal given
> how projects move from private to public, or how companies merge.
>
> Another alternative is some form of group, that may or may not map
> onto maven's group, where most of the time it does not have to be
> specified:
>
> module mainlib from com.mycompany {
> requires base; // implicit, favours group 'com.mycompany' if there is a clash
> requires willow; // uses 'com.mycompany' because there is a clash
> requires willow from org.joda; // explicitly specified, but only
> needed to resolve a clash
> }
From here, wouldn't it be trivial to change Mark's counter example:
module com.bar:foo.data {
exports com.bar.foo.data;
requires org.hibernate:hibernate.core;
requires org.hibernate:hibernate.jcache;
requires org.hibernate:hibernate.validator;
}
into a positive example:
import org.hibernate:*;
module com.bar:foo.data {
exports com.bar.foo.data;
requires hibernate.core;
requires hibernate.jcache;
requires hibernate.validator;
}
best,
Stephan
More information about the jigsaw-dev
mailing list