On 2017-12-30 Stefan Bodewig wrote:
> if XZ for Java is used as a Java9 module java will derive the name of
> the module from the jar name and will most likely be "xz". If you add
> an "Automatic-Module-Name" entry to the jar's manifest you can
> control the name yourself, without turing XZ into a proper Java9
> module.

I read a little about Java modules. I got an impression that
Automatic-Module-Name is a good start and the minimum that libraries
should do. So adding that entry sounds good.

Would it be too complicated to turn XZ into a proper module? How useful
is that? From what I read, it needs module-info.java which should be
easy to write as XZ doesn't depend on external packages. I don't know
how to set it up with Ant. It would be very good if XZ could be built
on older JDKs too, even if those compilers cannot build the
module-info.java file.

> As XZ uses org.tukaani.xz as its OSGi bundle name, it seems logical to
> use the same name for a module. The simple change below would achieve
> that.

Thanks. I will add that. There needs to be a new release soon anyway to
fix the issue of XZ for Java 1.7 binaries in the Maven Central requiring
Java 9.

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode

Reply via email to