Setting the generated source directory for annotation processors in Maven
问题 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: <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <fork>true</fork> <compilerArgument>-s ${project.build.directory}/target/generated-sources/annotation-processing</compilerArgument> </configuration> </plugin> </plugins> But javac fails with [INFO] Compilation failure