Skip to content
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

module-info.java is in META-INF/versions/11 instead of META-INF/versions/9 #3380

Closed
Vampire opened this issue Jan 21, 2022 · 6 comments
Closed
Milestone

Comments

@Vampire
Copy link

Vampire commented Jan 21, 2022

We build a lib using Jackson databind.
In 2.9.3 you had no module-info.java, but an Automatic-Module-Name in the manifest.
We wanted to update the used verison, but now you have a module-info.java file in META-INF/versions/11 and no Automatic-Module-Name anymore.
This effectively changes your module name for builds for Java 9 and 10 to being deduced from the JAR file name which is pretty bad.
We still are Java 8 compatible, so building our module-info.java to be compatible with Java 9 which now does not work properly anymore as the compiler complains that the module is not present.

Please put the module-info.java to the proper place META-INF/versions/9 or at least reintroduce the Automatic-Module-Name manifest attribute.

@Vampire Vampire added the to-evaluate Issue that has been received but not yet evaluated label Jan 21, 2022
@cowtowncoder
Copy link
Member

Hard no for Automatic-Module-Name: that should not be reintroduced (and doing so would likely cause issues with module awareness); there is no real upside here.

But I think this issue was earlier filed as:

https://github.com/FasterXML/jackson/issues/96

(which is not necessarily optimal place but it is what it is)

so follow-up discussion should go there. I am not against change to version baseline since it sounds like some tooling might suffer from use of JVM 11 over JVM 9.

Note, too, that I think Jackson 2.10 - 2.12 have module-info.class in different location (with different trade-offs): Automatic name was replaced with proper name in 2.10.0 as per #2273.
So in short term use of 2.12.6 might work better than 2.13.

@cowtowncoder
Copy link
Member

More info from FasterXML/jackson-modules-base#126 :

I think change needed in base/pom.xml of jackson-bom (https://github.com/FasterXML/jackson-bom).

@cowtowncoder
Copy link
Member

Fix at:

FasterXML/jackson-bom#47

/cc @GedMarc

@cowtowncoder
Copy link
Member

Fixed via:

FasterXML/jackson-bom#46

but will add separate release note entry for convenience.

@cowtowncoder cowtowncoder changed the title module-info.java is in META-INF/versions/11 instead of META-INF/versions/9 module-info.java is in META-INF/versions/11 instead of META-INF/versions/9 Jan 28, 2022
@cowtowncoder cowtowncoder modified the milestones: 21, 2.10.0, 2.13.2 Jan 28, 2022
@pjfanning
Copy link
Member

Should this be closed since the fix was released?

@cowtowncoder
Copy link
Member

Thank you @pjfanning , yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants