hgschmie commented on code in PR #200:
URL:
https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1369182520
##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends
AbstractMojo {
* <ul>
* <li><code>none</code> - no annotation processing is performed.</li>
* <li><code>only</code> - only annotation processing is done, no
compilation.</li>
+ * <li><code>full</code> - annotation processing and compilation.</li>
* </ul>
*
+ * <code>full</code> is the default. Starting with JDK 21, this option
must be set explicitly.
Review Comment:
if you don't set it on JDK 21, you will be greeted with a warning that
"soon, not setting proc:full will result in no longer doing annotation
processing".
It is a very unsatisfying situation:
JDK < 21: proc:full is not allowed, results in `error: invalid flag:
-proc:full`
JDK == 21: proc:full works, a warning is reported without it
JDK > 21: proc:full is *required* at some point, no more annotation
processing without it
which puts the compiler plugin in the unfortunate situation of having to
check the version of javac first before either not passing in `-proc:full`
(because it is JDK < 21 and it is set by default) or passing it in for JDK >=
21.
That's why the comment reads "requires more thought". I have not found time
to deal with it. Right now, I have a conditional profile in my poms... 😵💫
##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends
AbstractMojo {
* <ul>
* <li><code>none</code> - no annotation processing is performed.</li>
* <li><code>only</code> - only annotation processing is done, no
compilation.</li>
+ * <li><code>full</code> - annotation processing and compilation.</li>
* </ul>
*
+ * <code>full</code> is the default. Starting with JDK 21, this option
must be set explicitly.
Review Comment:
if you don't set it on JDK 21, you will be greeted with a warning that
"soon, not setting proc:full will result in no longer doing annotation
processing".
It is a very unsatisfying situation:
JDK < 21: proc:full is not allowed, results in `error: invalid flag:
-proc:full`
JDK == 21: proc:full works, a warning is reported without it
JDK > 21: proc:full is *required* at some point, no more annotation
processing without it
which puts the compiler plugin in the unfortunate situation of having to
check the version of javac first before either not passing in `-proc:full`
(because it is JDK < 21 and it is set by default) or passing it in for JDK >=
21.
That's why the comment reads "requires more thought". I have not found time
to deal with it. Right now, I have a conditional profile in my poms... 😵💫
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]