epubcheck icon indicating copy to clipboard operation
epubcheck copied to clipboard

Add a `module-info.java` Java module descriptor

Open rdeltour opened this issue 4 years ago • 2 comments

Currently, EPUBCheck only provides the bare-minimum support for Java modules by declaring a Automatic-Module-Name entry to the jar manifest (see #1128).

It would be nice to also provide a proper module descriptor (module-info.java file). We already declare imports/exports for OSGi, so doing it for Java modules can hopefully be straightforward.

rdeltour avatar May 01 '20 09:05 rdeltour

The main problem you face in doing this is that you can't really modularize until your dependencies have also modularized. I wrote a plugin to track the modularization status of module dependencies. Unfortunately, the situation isn't great for epubcheck:

https://ataxia.io7m.com/2020/05/01/modulechaser/modules.xhtml

Note that the plugin treats all dependencies as being mandatory, and that's not necessarily the case. If I remember correctly, the imageio dependencies are only needed if you're actually doing processing/checking of images in epub.

io7m avatar May 01 '20 11:05 io7m

Thanks for the info and analysis, very helpful. It looks like some of the core dependencies are not modularized…

rdeltour avatar May 01 '20 11:05 rdeltour