Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8321314 Reinstate disabling the compiler's default active annotation processing
  3. JDK-8338926

Release Note: Annotation processing in `javac` disabled by default

XMLWordPrintable

      As of JDK 23, annotation processing is only run with some explicit configuration of annotation processing or with an explicit request to run annotation processing on the `javac` command line. This is a change in behavior from the existing default of looking to run annotation processing by searching the class path for processors _without_ any explicit annotation processing related options needing to
      be present.

      Invocations of `javac` that rely on annotation processing without any explicit annotation processing configuration will need to be updated to keep running annotation processors. In JDK 21 and 22, `javac` prints a note identifying such invocations. To preserve the old behavior, "-proc:full" can be passed to `javac`. Support for "-proc:full" has been backported to several update release trains and is also supported as of a recent version of the Maven Compiler plugin. In updated versions of the Compiler plugin, the property in question will appear as: "User Property: maven.compiler.proc" and users can configure it via `-Dmaven.compiler.proc=full` on the command-line.

            darcy Joe Darcy
            darcy Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: