【发布时间】:2011-10-11 23:26:34
【问题描述】:
我有一个 JSR-269 注释处理器,我试图使用 maven-compiler-plugin 从 Maven 构建中调用它。处理器依赖于 SLF4J 库,但我无法弄清楚如何将其正确传递给编译器插件,以便处理器可以找到它。因此,当它找不到日志绑定时,我会收到标准 SLF4J 错误。
目前我的插件定义如下:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessors>
<annotationProcessor>com.mycompany.MyProcessor</annotationProcessor>
</annotationProcessors>
<proc>only</proc>
</configuration>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.1</version>
</dependency>
</dependencies>
</plugin>
有人知道怎么做吗?
【问题讨论】:
标签: maven annotations compilation slf4j processor