elk icon indicating copy to clipboard operation
elk copied to clipboard

Add full module declarations to relevant .jar files to enable the use of jlink on Java apps (which access ELK via "Plain Java Layer")

Open tcfurrer opened this issue 4 years ago • 2 comments

It was essential that #429 at least added Automatic-Module-Name to the manifest of all .jar files. This request is to continue further down the road of support for JPMS. In order for Java applications (i.e. outside Eclipse) to depend on ELK's .jars and also make use of jlink (and jpackage), it will be necessary for the ELK .jars to contain proper module declarations (i.e. module-info.java). This would be necessary at least for all of the .jar files which could potentially be relevant to those standalone Java applications, while automatic modules may remain sufficient for some other .jar files.

The jlink tool strictly disallows dependencies upon automatic modules. Although it is possible for the aforementioned apps to workaround that using jdeps --generate-module-info, doing so is awkward / error prone / invokes some significant secondary limitations (...even when making use of partial automation tools like https://github.com/moditect/moditect ). This request is to eliminate the need for that kind of workaround. It is particularly important for any future uses of ELK in new Java applications, since many new Java projects would prefer to take advantage of the full benefits of JPMS.

tcfurrer avatar Oct 30 '21 00:10 tcfurrer

Please correct me if I am wrong. Adding module-infos would require us to drop Java 8 support, which we currently do not want to do but may do in the future.

soerendomroes avatar Mar 03 '22 13:03 soerendomroes