gnodet opened a new pull request, #1161: URL: https://github.com/apache/maven-compiler-plugin/pull/1161
## Summary Simplify `amendincrementalCompilation()` to always add `REBUILD_ON_ADD` and `REBUILD_ON_CHANGE` when annotation processors are detected, instead of the previous multi-branch logic that completely disabled incremental compilation for explicit `proc=only` and `proc=full` modes. Depends on #1155 (ABI-fingerprint incremental compilation strategy). ## Changes ### AbstractCompilerMojo - **`amendincrementalCompilation()`**: Simplified from a 3-branch conditional (JDK version check, proc value check, fallback) to a single unconditional add of `REBUILD_ON_ADD` + `REBUILD_ON_CHANGE`. The old behavior was overly conservative — it called `aspects.clear()` + `NONE` when processors were explicitly configured, which completely bypassed incremental compilation for any build using annotation processors. - **`hasAnnotationProcessor()` Javadoc**: Removed "In case of doubt" qualifier since the method no longer drives JDK-version-dependent branching. ### Removed tests - `testCompilerProcOnlyRunsWhenSourcesAreUnchanged`: verified the old NONE behavior (proc=only ⇒ always recompile) - `testCompilerProcFullRunsWhenSourcesAreUnchanged`: verified the old NONE behavior (proc=full ⇒ always recompile) - Test resource directories: `compiler-proc-only-test/`, `compiler-proc-full-test/` The `testCompilerProcOnlyRespectsExplicitIncrementalCompilation` test is retained — it verifies that an explicit `incrementalCompilation` configuration is not overridden by processor detection. ## Rationale With the ABI incremental strategy (#1155) handling annotation processors through `ProcessorClassification` (isolating/aggregating/unknown cascade logic), the timestamp strategy no longer needs to disable incremental compilation entirely when processors are present. The new behavior is: detect processors → add rebuild-on-add/change aspects → let the active strategy handle the details. Part 3 of 3: MRJAR infrastructure (#1151) → ABI strategy (#1155) → **annotation processor handling**. -- 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]
