Skip to content

Support Java Modules #727

@aalmiray

Description

@aalmiray

v2.4.4 defines an automatic module name

$ jarviz module name --gav com.networknt:json-schema-validator:1.0.8
subject: json-schema-validator-1.0.8.jar
name: json.schema.validator
source: filename
automatic: true
valid: true

$ jarviz module descriptor --gav com.networknt:json-schema-validator:1.0.8
subject: json-schema-validator-1.0.8.jar
name: json.schema.validator
version: 1.0.8
open: false
automatic: true
requires:
  java.base mandated
contains:
  com.networknt.schema
  com.networknt.schema.url

$ jarviz bytecode show --gav com.networknt:json-schema-validator:1.0.8
subject: json-schema-validator-1.0.8.jar
Unversioned classes. Bytecode version: 50 (Java 6) total: 72

I'd be great if the library supplied a full Java module descriptor. It's possible to keep bytecode baseline compatible with Java 8 while providing a full module descriptor thanks to ModiTect. This will help modular projects that consume this library, specifically those that create custom Java Runtimes with jlink, as the latter does not support automatic modules but explicit modules. If interested I can send a PR to make it happen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions