efegokdemir commented on code in PR #1136:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/1136#discussion_r4106719917


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -708,12 +708,20 @@ final EnumSet<IncrementalBuild.Aspect> 
incrementalCompilationConfiguration() {
     }
 
     /**
-     * Amends the configuration of incremental compilation for the presence of 
annotation processors.
+     * Amends the configuration of incremental compilation. If annotation 
processing only is requested
+     * ({@code proc=only}), incremental compilation is disabled so that 
processors always run.
+     * Otherwise, if an annotation processor is present, the incremental 
configuration is amended
+     * to also rebuild on source additions and changes.
      *
      * @param aspects the configuration to amend if an annotation processor is 
found
      * @param dependencyTypes the type of dependencies, for checking if any of 
them is a processor path
      */
     final void amendincrementalCompilation(EnumSet<IncrementalBuild.Aspect> 
aspects, Set<PathType> dependencyTypes) {
+        if ("only".equalsIgnoreCase(proc)) {
+            aspects.clear();
+            aspects.add(IncrementalBuild.Aspect.NONE);
+            return;

Review Comment:
   Applied the requested control-flow formatting in commit 010495c. The scoped 
Spotless check for AbstractCompilerMojo.java and git diff --check pass. The 
repository-level Maven test invocation remains blocked locally by the available 
Maven/JDK toolchain (Maven 3.9.16 is below the project’s Maven 4.0.0-rc-7 
requirement, and JDK 27 triggers the existing palantir-java-format javac 
incompatibility); CI will provide the canonical build validation.



-- 
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]

Reply via email to