dennis lucero created MCOMPILER-607:
---------------------------------------

             Summary: Build fails when annotation processor list is empty (but 
present)
                 Key: MCOMPILER-607
                 URL: https://issues.apache.org/jira/browse/MCOMPILER-607
             Project: Maven Compiler Plugin
          Issue Type: Bug
         Environment: Maven 3.9.9, Compiler Plugin 3.13.0, Java 23, Windows 10
            Reporter: dennis lucero


The build fails when there is no annotationProcessor in the 
annotationProcessors block:
{code:xml}
<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>
{code}
{quote}— 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
{quote}
(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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to