-
Notifications
You must be signed in to change notification settings - Fork 6
JSTEP 11
(Back to JSTEP page)
Tatu Saloranta (@cowtowncoder)
- 2025-01-14: Initial version
Jackson 2.x requires Java 8 as the minimum version, and as such cannot build Java module (JPMS) info (module-info.class
) via normal build process. Instead, Moditect plug-in is used to create minimally processed version from module-info.java
, to be embedded.
But while Moditect can produce legal module-info.class
, it does not (and probably cannot) validate goodness to same degree as build does.
This means that catching invalid module info declarations is difficult and cannot be done during development or build time, or even CI (at least without extensive external tooling).
These problems can be resolved for Jackson 3.0 when the JDK baseline is raised to 17.
Conversion requires doing following:
- Copy
src/moditect/module-info.java
as bothsrc/main/java/module-info.java
andsrc/test/java/module-info.java
- Remove
src/moditect/module-info.java
- Remove
moditect-maven-plugin
invocation frompom.xml
- Modify
src/main/java/module-info.java
to work for building main artifact (often adding a module dependency or two; possibly needing changes to "upstream" dependency) - Modify
src/test/java/module-info.java
to work for unit tests (may need changes to main artifactmodule-info.java
)
And once full build (./mvnw clean install
) works, initial conversion should be complete.
Note, tho, that further changes may be needed by "downstream" components once they use full "modularized" build
-
jackson-annotations
-
jackson-core
-
jackson-databind
-
jackson-dataformat-xml
-
jackson-dataformats-text