Yubico / java-webauthn-server

Server-side Web Authentication library for Java https://www.w3.org/TR/webauthn/#rp-operations
Other
443 stars 139 forks source link

Automatic-Module-Name #276

Closed jbb01 closed 1 year ago

jbb01 commented 1 year ago

For better compatibility with the JPMS (Java Platform Module System) it would be desirable to either have an Automatic-Module-Name defined in the META-INF file or a module-info.java (possibly as a multi-release JAR).

Otherwise (maven) builds using the JPMS that depend on this library will produce a warning:

[WARNING] ******************************************************************************************************************************************************************************
[WARNING] * Required filename-based automodules detected: [webauthn-server-core-2.4.1.jar]. Please don't publish this project to a public artifact repository! *
[WARNING] ******************************************************************************************************************************************************************************
emlun commented 1 year ago

Thanks for bringing this up! I agree, we should add an Automatic-Module-Name header in the next release. We'll have a think on what the module names should be.

We can't offer fully-realized modules yet, because for compatibility with Java 8 we need to compile with -release=8 (see issue #267), which refuses to compile a module-info.java.

Please note that the above warning mostly applies to other libraries that depend on java-webauthn-server modules, see "Depending on Automatic Modules". Applications with no dependents can prevent breakage by pinning the dependency version, or updating the imported module name if it changes.

emlun commented 1 year ago

Fixed in PR #303 and available in pre-release 2.5.0-RC1.