New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add Automatic-Module-Name manifest entries #589

Closed
io7m opened this Issue Dec 7, 2017 · 5 comments

Comments

3 participants
@io7m

io7m commented Dec 7, 2017

Hello!

It'd be great if javapoet published Automatic-Module-Name entries in the jar manifest for each module. This would assign the modules stable names to be used in (modular) Java 9 projects.

Of course, full modularization would be better, but Automatic-Module-Name is quick and easy.

sormuras added a commit to sormuras/javapoet that referenced this issue Dec 7, 2017

Set com.squareup.javapoet as automatic module name
Claim`com.squareup.javapoet` as Automatic-Module-Name in the JAR MANIFEST.

See http://branchandbound.net/blog/java/2017/12/automatic-module-name/ for details and background.

Closes square#589
@sormuras

This comment has been minimized.

Contributor

sormuras commented Dec 7, 2017

Adding a module descriptor is not that difficult either -- but needs an upgade to jdk 9. At least for compiling the module-info.java source file.

@JakeWharton

This comment has been minimized.

Collaborator

JakeWharton commented Dec 7, 2017

@sormuras

This comment has been minimized.

Contributor

sormuras commented Dec 7, 2017

You mean having a module-info.class in the root of the JAR file breaks tools? Because it ends with .class and can not be instantiated (or ignored) by older Java runtimes and custom class parsers/loaders?

@JakeWharton

This comment has been minimized.

Collaborator

JakeWharton commented Dec 7, 2017

io7m added a commit to io7m/jpra that referenced this issue Dec 7, 2017

Modularize and update dependencies
This publishes Java 9 modules. Currently, the com.io7m.jpra.compiler.java
module depends on the not-yet-reliably-named JavaPoet. It also replaces a
few types with Immutables types.

See square/javapoet#589
Affects #28
@io7m

This comment has been minimized.

io7m commented Dec 7, 2017

Thanks for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment