neilalexander / jnacl

Pure Java implementation of curve25519, salsa20, hsalsa20, xsalsa20 and poly1305 cryptographic primitives, along with a NaCl "Box" implementation
BSD 2-Clause "Simplified" License
105 stars 34 forks source link

Add automatically generated JPMS module descriptor #24

Open ppkarwasz opened 11 months ago

ppkarwasz commented 11 months ago

This PR adds configuration to bnd-maven-plugin to generate a module-info.class descriptor.

BND adds the module-info.class descriptor (and META-INF/MANIFEST.MF) directly into the generated JAR and works even on JDK 8 (cf. documentation).

The decompiled module descriptor is:

module eu.neilalexander.jnacl@1.0.1.SNAPSHOT {
  requires java.base;
  exports com.neilalexander.jnacl.crypto;
  exports com.neilalexander.jnacl;
}

The lack of a stable module name is a (partial) blocker for zeromq/jeromq#591: users that require curve encryption can not (reliably) use JPMS.