3
我有一個JSR-269註釋處理器,我試圖從Maven構建中使用maven-compiler-plugin調用。處理器依賴於SLF4J庫,但我無法弄清楚如何正確地將它傳遞給編譯器插件,以便處理器可以找到它。因此,當它找不到日誌記錄綁定時,我得到標準的SLF4J錯誤。如何將JSR-269處理器的依賴關係傳遞給maven-compiler-plugin
目前我的插件的定義是這樣的:
<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>
任何人都知道如何做到這一點?