-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add -proc:full
to javac args for plugins
#811
Comments
Hello, Yes, the To be explicit as it what is likely to change in the future, it is the implicit running of annotation processors out of the class path without any annotation processing configuration options. For example, without using Quoting the new javac note:
If you see this note from a JDK 21 or 22 build in a project's build logs, it is subject to the future policy change without changing the options in one of the listed ways. To change the configuration of a JDK 17u or 11u build to future proof it against the policy change, I'd recommend setting HTH |
Thanks for the detailed note @jddarcy!
Exactly, this is what the Jenkins project relies on. (So does NetBeans, even more heavily.) It does not look like the Maven plugin currently supports this workaround: https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationprocessorpaths says
What would be needed would be a mojo option that sets |
At least plugin builds, and probably some other component builds such as core (maybe just do this also in the generic parent POM), should be given the
-proc:full
argument when this is available (21+?). Otherwise builds may be broken in some future Java version (22?) due to JDK-8306819. See openjdk/jdk#14499 by @jddarcy.There is some discussion of a bare
-proc
argument in older versions but I do not see this in the JDK 11 help; it does not appear that there is any argument which can be passed to JDK 11 which will prevent the build from breaking in the future, which seems unfortunate as it would mean that we would need to detect the JDK version with a profile to support building with newer JDKs even when targeting 11 or 17.Switching to an explicit list of annotation processors would be awkward since there are a bunch of them in the Maven classpath and we do rely on the service detection to run them all. (In fact there is at least one proprietary plugin in CloudBees CI which adds its own, under the expectation that plugins depending on it will automatically run that processor.)
The text was updated successfully, but these errors were encountered: