By default, the Apt Maven Plugin will attempt to discover an annotation processor factory within the project's classpath using service provider configuration files. To explicitly set an annotation processor factory, use the factory configuration parameter as follows:
<project>
...
<build>
...
<plugins>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.0-alpha-4</version>
<configuration>
<factory>com.acme.Factory</factory>
</configuration>
</plugin>
...
</plugins>
...
</build>
...
</project>
This tells the Apt Maven Plugin to use the com.acme.Factory annotation processor factory, which must reside within the project's dependencies.
Annotation processor factory dependencies can also be specified local to the Apt Maven Plugin to keep them out of the project's main dependencies. For example, if com.acme.Factory resided within the deployed artifact com.acme:apt:1.0, then configure the pom as follows:
<project>
...
<build>
...
<plugins>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.0-alpha-4</version>
<configuration>
<factory>com.acme.Factory</factory>
</configuration>
<dependencies>
<dependency>
<groupId>com.acme</groupId>
<artifactId>apt</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
...
</plugins>
...
</build>
...
</project>