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


##########
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:
   The current branch now derives the context dry-run flag centrally in 
AbstractUpgradeGoal.execute() from shouldSaveModifications(), so individual 
goals cannot omit the mapping. The remaining inference messages use the shared 
logChange helper and report “would be applied” during check.



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