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.

Comment From: pjfanning

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

Comment From: cowtowncoder

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.

Comment From: pjfanning

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.

Comment From: cowtowncoder

I think we should not put it under META-INF/versions/ any longer for 3.0.0 -- but not sure how to prevent Moditect from doing that...

Comment From: pjfanning

@cowtowncoder I asked a GenAI tool and it agrees that module-info.class should be in jar root dir if we don't support Java 8 any more. The META-INF/versions location for module-info.class is only needed if we need to support Java 8 users.

Comment From: cowtowncoder

Alas, after trying to change this, I suspect we actually still need it, unfortunately... because of shading of different versions of "FastDoubleParser" (I also consulted GenAI which showed how to change things, but no change in inclusion).

Comment From: pjfanning

Alas, after trying to change this, I suspect we actually still need it, unfortunately... because of shading of different versions of "FastDoubleParser" (I also consulted GenAI which showed how to change things, but no change in inclusion).

We still need META-INF/versions for the FastDoubleParser versioned classes but module-info.class should move to root.

Comment From: cowtowncoder

Right; that seems legal. I suspect Moditect plug-in is just being cautious, or not considering this use case.

Still, none of the changes I attempted moved module-info.class to root. Maybe someone can figure it out.