I\'m trying to move a build which generates sources using an annotation processor to Maven. I\'ve tried configuring the maven-compiler-plugin as follows:
<
I've been using the maven-processor-plugin
as follows:
org.bsc.maven
maven-processor-plugin
2.2.4
process-my-annotations
process
generate-test-sources
x.y.z.MyAnnotationProcessor
${project.build.directory}/generated-test-sources/test-annotations
${project.build.directory}/test-classes
The generated code goes into target/generated-test-sources/test-annotations, and generated resources into target/test-classes (the default for the process goal is target/generated-sources and target/classes, respectively).
I also need to use maven-build-helper-plugin
to add target/generated-test-sources/test-annotations to the test source path so that test-compile phase will compile the generated code.