Skip to content

Add an automatic module name #67

Closed
@carlosame

Description

While I'm not an enthusiast of Java modularization, unfortunately Java libraries that aren't module-aware are increasingly being a source of compiler warnings as people migrate to newer JDKs.

It would help if dom4j set up an automatic module name in the Jar manifest, like:

Automatic-Module-Name: org.dom4j

I'm not familiar with gradle, but apparently the following would work:

jar {
  manifest {
    attributes('Automatic-Module-Name': 'org.dom4j')
  }
}

See https://guides.gradle.org/building-java-9-modules/#optional_add_code_automatic_module_name_code_manifest_entries_for_all_other_projects

Of course that a full module-info would also be a good thing, but the above solution is simple and solves the main issue of having to rely on generated module names.

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions