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

Change 3.0 to use module-info.java directly (and not via Moditect) #1380

Closed
cowtowncoder opened this issue Jan 9, 2025 · 3 comments
Closed
Labels
3.0 Issue planned for initial 3.0 release
Milestone

Comments

@cowtowncoder
Copy link
Member

In Jackson 2.x we use Moditect plugin to add module-info.class, instead of relying on javac. This because build is done using JDK 8 which cannot handle module-info.java.

But with Jackson 3.0 using JDK 17 or above we can and should convert.

NOTE: all modules should do this, except for jackson-annotations which remains JDK 8 built for now.

@pjfanning
Copy link
Member

pjfanning commented Jan 9, 2025

I think module-info.class needs to be put in META-INF/versions/11 (or 9). I'm not sure if fb5ad1b would do that.

@cowtowncoder
Copy link
Member Author

cowtowncoder commented Jan 9, 2025

I think module-info.class needs to be put in META-INF/versions/11 (or 9). I'm not sure if fb5ad1b would do that.

Not sure why -- minimum JDK for master/3.0 is JDK 17. Do you have a link to something that explains possible reasons to do so? (docs I saw just talked about src/main/java/ (and src/test/java for test version)

But either way I think it's shade plugin that is somehow filtering/not-copying module-info.class, regardless of where it needs to go.

@pjfanning
Copy link
Member

I think module-info.class needs to be put in META-INF/versions/11 (or 9). I'm not sure if fb5ad1b would do that.

Not sure why -- minimum JDK for master/3.0 is JDK 17. Do you have a link to something that explains possible reasons to do so? (docs I saw just talked about src/main/java/ (and src/test/java for test version)

But either way I think it's shade plugin that is somehow filtering/not-copying module-info.class, regardless of where it needs to go.

You are probably right - that the module-info.class only needs to be in META-INF/versions when you still support Java 8.

@cowtowncoder cowtowncoder changed the title Change 3.0 to use module-info.java directly, remove use of Moditect Change 3.0 to use module-info.java directly (and not via Moditect) Jan 10, 2025
@cowtowncoder cowtowncoder added this to the 3.0.0 milestone Jan 10, 2025
@cowtowncoder cowtowncoder added the 3.0 Issue planned for initial 3.0 release label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 Issue planned for initial 3.0 release
Projects
None yet
Development

No branches or pull requests

2 participants