I'm a fan of splitting packages up better due to OSGi support in the first place. Hierarchical packaging is definitely something new (OSGi doesn't care about that; each package is considered separately), and it could help in making some classes more organized.
On 21 April 2017 at 14:55, Stefan Bodewig <[email protected]> wrote: > On 2017-04-21, Ralph Goers wrote: > > > I have not started work on this yet, but from looking at > > http://blog.joda.org/2017/04/java-9-modules-jpms-basics.html > > <http://blog.joda.org/2017/04/java-9-modules-jpms-basics.html> it > > seems we are going to have problems with a) plugins that are in > > different jars (modules) that use the same namespace and b) log4j-core > > as it currently exists. > > > Item b is a problem because the module-info for log4j-core should have > > a requires ONLY for log4j-api. For example, I’m not sure how we can > > have an optional dependency on Jackson. > > requires static module-name-of-jackson; > > http://cr.openjdk.java.net/~mr/jigsaw/spec/lang-vm.html section 1.1.1 > > The requires keyword may be followed by the modifier static. This > specifies that the dependence, while mandatory at compile time, is > optional at run time. > > Of course "requires static" captures this way more clearly than "require > optional" which was proposed intially > http://openjdk.java.net/projects/jigsaw/doc/topics/optional.html > > :-) > > Without knowing the structure of log4j too well I agree the strict > package hierarchies mandated by JPMS will be a problem. Probably for > many other projects with more than one artifact as well. > > Stefan > -- Matt Sicker <[email protected]>
