LoginSignup
0
0

More than 5 years have passed since last update.

アノテーションプロセッサーのMavenプロジェクトをビルドする時にエラーになる場合の対処法

Posted at

事象

[ERROR] error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider [アノテーションプロセッサクラス名]

どうやらMETA-INF/servicesに配置した内容を読み込んでおかしなことになっている模様。

対処法

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.5.1</version>
  <configuration>
    <fork>true</fork>
    <source>1.8</source>
    <target>1.8</target>
    <encoding>UTF-8</encoding>
    <compilerArgs>
      <compilerArg>-proc:none</compilerArg>
    </compilerArgs>
  </configuration>
</plugin>

compilerArg-proc:noneを指定してあげるとエラーにならない。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0