jib-core: incompatible with jackson 2.12.0 (Java 8 date/time type java.time.Instant
not supported by default)
#2931
Labels
java.time.Instant
not supported by default)
#2931
Environment:
Description of the issue:
I'm writing a gradle plugin leveraging jib-core 0.16.0, and while it works fine on most projects, I've found that if gradle's plugin classpath happens to contain a newer version of jackon (specifically 2.12.0), then
Cache#retrieve
throws:It seems like this behaviour change landed in jackson in this commit: FasterXML/jackson-databind@85c9c85#diff-4119ee3f674d1d2c64d16e0118a6cad1277bc30849b60970025af744453158e5R312-R320 and it seems the fix is pretty straightforward,
:jib-core
just needs to explicitly register a JavaTime module when setting up its ObjectMapper rather than relying on the old implicit behaviour to serialize & deserialize Instant types. I'm happy to submit a PR for this.Expected behavior:
Ideally jib-core would work with a variety of different jackson versions, but most importantly latest (2.12.0 at time of writing).
Steps to reproduce:
./gradlew :jib-core:test -i
and see existing tests fail, e.g.The text was updated successfully, but these errors were encountered: