[
https://issues.apache.org/jira/browse/MCOMPILER-486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17825085#comment-17825085
]
ASF GitHub Bot commented on MCOMPILER-486:
------------------------------------------
slawekjaranowski commented on PR #96:
URL:
https://github.com/apache/maven-compiler-plugin/pull/96#issuecomment-1987302900
Thanks for examples .... I closed an issue so also close this one.
> annotationProcessors and annotationProcessorPaths accept incorrect child tags
> -----------------------------------------------------------------------------
>
> Key: MCOMPILER-486
> URL: https://issues.apache.org/jira/browse/MCOMPILER-486
> Project: Maven Compiler Plugin
> Issue Type: Bug
> Reporter: Daniel Norberg
> Priority: Major
>
> The compiler plugin seems to accept arbitrary tag names under
> {{annotationProcessors}} and {{annotationProcessorPaths}}. This causes users
> to produce incorrect pom.xml files that work in maven but fail in stricter
> tools that require child tag names to be {{annotationProcessor}} and
> {{path}}, respectively.
> See e.g. this incorrect configuration where {{annotationProcessor}} and
> {{path}} tag names have been replaced with {{arbitraryTag1}} and
> {{arbitraryTag2}} respectively:
> {code:xml}
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <annotationProcessors>
> <arbitraryTag1>org.issue.SimpleAnnotationProcessor</arbitraryTag1>
> </annotationProcessors>
> <annotationProcessorPaths>
> <arbitraryTag2>
> <groupId>org.issue</groupId>
> <artifactId>annotation-processor</artifactId>
> <version>1.0-SNAPSHOT</version>
> </arbitraryTag2>
> </annotationProcessorPaths>
> </configuration>
> </plugin>
> {code}
> The above configuration is accepted same as the below correct configuration:
> {code:xml}
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <annotationProcessors>
>
> <annotationProcessor>org.issue.SimpleAnnotationProcessor</annotationProcessor>
> </annotationProcessors>
> <annotationProcessorPaths>
> <path>
> <groupId>org.issue</groupId>
> <artifactId>annotation-processor</artifactId>
> <version>1.0-SNAPSHOT</version>
> </path>
> </annotationProcessorPaths>
> </configuration>
> </plugin>
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)