desruisseaux commented on code in PR #1136:
URL:
https://github.com/apache/maven-compiler-plugin/pull/1136#discussion_r4105615318
##########
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:
Formatting: replace `return;} if` by `} else if`.
--
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]