I have a maven project generating a new class from an annotation processor during a compile process. The class is successfully generated in /target/generated-sources/annotations/
, but it is not compiled into the .jar
. Why?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${project.build.source}</source>
<target>${project.build.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<compilerArgument>-Xlint</compilerArgument>
<annotationProcessors>
<annotationProcessor>net.preprocessing.MyAnnotationProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
</plugin>
EDIT
This seems to be a known bug. If anyone has an operational workaround, it is welcome.
EDIT 2
I have performed some tests yesterday, but the suggested workaround in the ticket does not work. I have provided a test case. If anyone has insight on how to solve this issue, it is welcome. Keep in mind that I am a newbie at annotation processing, so there might be something obvious I am missing.