2011-07-24 6 views
3

maven-compiler-pluginを使用してMavenビルド内から呼び出そうとしているJSR-269アノテーションプロセッサがあります。プロセッサは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> 

誰もがこれを行う方法を知っていますか?

答えて

0

私はプラグインの依存関係があなたのセットアップでうまくいくはずだから、通常のプロジェクト依存関係としてslf4jを追加すると思います。代わりに、Maven Annotation Plug-inを使用すると、注釈プロセッサ(およびその依存関係)をプラグインの依存関係として指定できます。

関連する問題