I support this.

Also good to know is that recently we managed to make the Jigsaw team reintroduce the NumberAtEnd[1] in the module name, which makes it again possible that commons-lang, commons-lang2 and commons-lang3 can live next to each other on the modulepath.

Robert

[1] http://mail.openjdk.java.net/pipermail/jpms-spec-experts/2017-March/000659.html


On Fri, 21 Apr 2017 14:00:06 +0200, Stephen Colebourne <scolebou...@joda.org> wrote:

Hi All,
Java 9 is coming soon (unless it is delayed again, but that seems
unlikely). The major feature is JPMS, the Java Platform Module System.
While JPMS is far from ideal, projects like Apache Commons and mine
Joda-* are going to be key to getting some adoption. This is
particularly true as Commons projects tend to be at the base of the
dependency tree.

I've written up my recommendations for naming modules here:
http://blog.joda.org/2017/04/java-se-9-jpms-module-naming.html
Basically, it strongly recommends reverse-DNS naming based on the
super-package of a project.

What is needed now?

Apache Commons, and Apache in general, needs to agree to use a
consistent naming strategy for modules. As per my writeup, I strongly
recommend using the super-package name as the module name, as most
Apache projects already have good separation by package name.

It will be important to ensure complete separation however, as JPMS
does not allow the same package to be in two modules.

Finally, it is important to note that modules are not the same as
artifacts. Modules, and thus their names, represent the JVMs view of
the structure of an application. Artifacts are a transport mechanism
(jar file), and many different artifacts can provide the same module.
This becomes apparent when considering the Apache branded JSR jar
files, for example the module name might be javax.servlet (ie. not
referencing Apache), but the artifactId is apache-jsr-360 (which does
reference Apache).


So, how to apply this to Commons (and Apache in general)?

Well, I haven't examined each commons subproject, but from my time
contributing years ago, each subproject has its own package name.
Thus:

Commons-IO
-> super-package org.apache.commons.io
-> module org.apache.commons.io

Commons-Lang3
-> super-package org.apache.commons.lang3
-> module org.apache.commons.lang3


If everyone agrees, the module name for each project should be
documented somewhere on the website. Note that this should be done
_now_, but does not require creating a module-info.java file, or
otherwise preparing for Java 9.

Comments? Questions?
thanks
Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to