1

Is there a way to use the maven-processor-plugin (or any other plug-in) to execute annotation processors listing the ones to skip? I have little control on the processors my dependencies might use but I do know the one I want skipped.

The only option in the usage page is to list the ones you want to include but not the other way around.

Is there a way to do this in Maven?

4

1 回答 1

0

这不是 maven 插件的问题,而是javac选项的可用性问题。根据注解处理的javac参考

处理器通过搜索路径上名为 META-INF/services/javax.annotation.processing.Processor 的服务提供者配置文件定位。此类文件应包含要使用的任何注释处理器的名称,每行列出一个。或者,可以使用 -processor 选项显式指定处理器。

因此,目前无法删除注释处理器,只需将您要运行的那些列入白名单即可。

于 2012-10-30T07:38:12.307 回答