Migrate deprecated javax.annotation to jakarta.annotation

Apache 2.0

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

com.oracle.weblogic.rewrite.jakarta.JavaxAnnotationMigrationToJakarta9Annotation
mod run . --recipe=com.oracle.weblogic.rewrite.jakarta.JavaxAnnotationMigrationToJakarta9Annotation

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. Change Gradle or Maven dependency javax.annotation:javax.annotation-api
  2. Change Gradle or Maven dependency org.glassfish.main:javax.annotation
  3. Rename package name javax.annotation to jakarta.annotation
  4. Upgrade Gradle or Maven dependency versions jakarta.annotation:jakarta.annotation-api:2.0.x
  5. Rename package name jakarta.annotation.processing to javax.annotation.processing
  6. Rename package name jakarta.annotation.concurrent to javax.annotation.concurrent
  7. Change type jakarta.annotation.Nullable to javax.annotation.Nullable
  8. Change type jakarta.annotation.Nonnull to javax.annotation.Nonnull