I like the approach with "from" syntax. It would also great to support from-grouping like this:
module mainlib from com.mycompany { requires base; requires willow; from org.joda { requires willow; requires willow-one-more; } } The project I'm working on consists of 187 Maven modules and has 348 dependencies to external 3th party libs in total. Some core module will have large module-info files, grouping would help us to maintain and keep the overview without additional tools. Regards Reto On 02/17/2017 01:15 AM, Stephan Herrmann wrote: > 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