Migrate classes from Jackson Codehaus (legacy) to Jackson FasterXML

Apache 2.0

In Jackson 2, the package and dependency coordinates moved from Codehaus to FasterXML.

org.openrewrite.java.jackson.CodehausClassesToFasterXML
mod run . --recipe=org.openrewrite.java.jackson.CodehausClassesToFasterXML

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Migrate to Jackson @JsonInclude
  2. Migrate serialization annotation processor
  3. Remove Codehaus Jackson annotations if doubly annotated
  4. Change type org.codehaus.jackson.map.JsonSerializer to com.fasterxml.jackson.databind.JsonSerializer
  5. Change type JsonSerialize$Inclusion to JsonInclude$Include
  6. Change type org.codehaus.jackson.map.annotate.JsonSerialize$Typing to com.fasterxml.jackson.databind.annotation.JsonSerialize$Typing
  7. Change type org.codehaus.jackson.map.annotate.JsonSerialize to com.fasterxml.jackson.databind.annotation.JsonSerialize
  8. Change type Pair to AnnotationIntrospectorPair
  9. Change type org.codehaus.jackson.map.AnnotationIntrospector to com.fasterxml.jackson.databind.AnnotationIntrospector
  10. Change type org.codehaus.jackson.xc.JaxbAnnotationIntrospector to com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector
  11. Change type org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector to com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
  12. Change type org.codehaus.jackson.map.introspect.NopAnnotationIntrospector to com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector
  13. Change type org.codehaus.jackson.map.ObjectMapper to com.fasterxml.jackson.databind.ObjectMapper
  14. Change type SerializationConfig$Feature to SerializationFeature
  15. Change type DeserializationConfig$Feature to DeserializationFeature
  16. Rename package name org.codehaus.jackson.annotate to com.fasterxml.jackson.annotation
  17. Rename package name org.codehaus.jackson.map.ext to com.fasterxml.jackson.databind.ext
  18. Rename package name org.codehaus.jackson.map.ser to com.fasterxml.jackson.databind.ser