[MCOMPILER-607] Build fails when annotation processor list is empty (but present)
dennis lucero opened MCOMPILER-607 and commented
The build fails when there is no annotationProcessor in the annotationProcessors block:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<annotationProcessors>
<!-- <annotationProcessor>org.example.MyAnnotationProcessor</annotationProcessor> -->
<!-- <annotationProcessor>com.example.OtherAnnotationProcessor</annotationProcessor> -->
</annotationProcessors>
</configuration>
</plugin>
— compiler:3.13.0:compile (default-compile) @ Test — Recompiling the module because of changed source code. Compiling 176 source files with javac [debug deprecation preview release 23] to target\classes
COMPILATION ERROR :
Annotationsprozessor "" nicht gefunden 1 error
BUILD FAILURE
Total time: 5.800 s Finished at: 2025-01-23T16:44:01+01:00
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project Test: Compilation failure Annotationsprozessor "" nicht gefunden
(Translation: Annotation processor "" not found)
The reason I keep the annotationProcessors block is that the OtherAnnotationProcessor was already commented out and I wanted to additionally disable the MyAnnotationProcessor. To put the whole annotationProcessors in a comment I would have to remove the comment characters from the OtherAnnotationProcessor (and possibly many more). Undoing that would also be more cumbersome than modifying a single line.
1 votes, 2 watchers