JSTEP 11 - FasterXML/jackson-future-ideas GitHub Wiki
(Back to JSTEP page)
module-info.java
JSTEP-11: Use native JPMS Author
Tatu Saloranta (@cowtowncoder)
Version History
- 2025-04-11: Update wrt
jackson-module-kotlin
- 2025-04-10: Update wrt
javax.money
datatype module completion - 2025-01-18: Updates
- 2025-01-14: Initial version
Background
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.
Scope
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
Status
Overall: completed as of 2025-04-11 as far as feasible -- 1 and only remaining module (jackson-module-scala
) unlikely to get completed by Jackson 3.0.0.
Completed
Completed, core
jackson-annotations
jackson-core
jackson-databind
Completed, data format modules
jackson-dataformat-xml
jackson-dataformats-text
jackson-dataformats-binary
Completed, base modules
jackson-modules-base
jackson-modules-java8
Completed, data type modules
- 'jackson-datatype-joda'
- 'jackson-datatypes-collections'
- jackson-datatypes-misc'
Completed, Providers
Completed, JVM language modules
Completed, other
In-progress
Planned, JVM language modules
- jackson-module-scala
- NOTE: Scala module does not currently produce
module-info.class
at all (does it have Automatic-Module-Name?) - https://github.com/FasterXML/jackson-module-scala/issues/700 for any improvements (even if no
module-info.java
)
- NOTE: Scala module does not currently produce