We are using maven annotation plugin (aka maven-processor-plugin) for supporting JSR269 processor in the java compilation time. Annotation processors replaces old APT technology and is introduced with JDK6 compiler. Firstly we setup the property (jsr269.generated.dir) where all the generated files resides. ``` target/generated ``` Unfortunatelly, maven-compiler plugin can start only one annotation processor during the compile time, we have to disable processors support and use another solution. ``` org.apache.maven.plugins maven-compiler-plugin -proc:none ``` During the generating sources we start all available processors on the classpath. Output directory is target/generated. ``` org.bsc.maven maven-processor-plugin 1.3.1 ${jsr269.generated.dir} process process generate-sources ``` Also we have to include new directory (target/generated) as the source path so it will be included on the classpath and will be part of the released JAR. ``` org.codehaus.mojo build-helper-maven-plugin 1.3 ${jsr269.generated.dir} add-source generate-sources add-source ``` And finally, integration with the eclipse. We are adding 3 factory libraries into the "processor classpath" so it will be used in the generation process. And why 3 libraries? * acris-binding jar contains bean wrapper annotation processor * acris-json jar contains JSON aware annotation processor (if you do not want to work with the JSON, you can remove this factory path) * acris-client-core jar contains common classes used in annotation processors and it have to be included in the classpath At the end, we are enablind the annotation processing support in the eclipse with the correct output directory target/generated ``` org.apache.maven.plugins maven-eclipse-plugin 2.7 .factorypath ]]> .settings/org.eclipse.jdt.apt.core.prefs .settings/org.eclipse.jdt.core.prefs ```