Maven integration with Eclipse JDT Annotation Processor Toolkit.
m2e-apt aims at providing automatic Annotation Processing configuration in Eclipse based on your project's pom.xml and its classpath dependencies. m2e-apt requires Java >= 1.8 to run, but will work on Java 6 projects.
Due to some rogue annotation processors at large, we decided to disable automatic annotation processing by default. By default, your manual settings for Eclipse JDT APT apply.
Window > Preferences > Maven > Annotation Processing or right-click on your project
Properties > Maven > Annotation Processing to select the Annotation Processing strategy of your choice.
When Annotation Processing is managed by Eclipse JDT APT, any change in your source classes triggers incremental processing automatically, however subtle differences in Annotation classpath might lead to unexpected results. Moreover, main and test sources separation only works in Eclipse Photon or more recent versions. You can change the workspace or project preferences to delegate annotation processing to maven, instead of JDT APT. This will result in slower incremental builds (all classes will be processed) but will provide identical results to maven command line builds. Note this only works when using maven-processor-plugin. When annotation processing is driven by maven-compiler-plugin, JDT APT is always used in eclipse.
See this blog post for more informations.
Default m2e-apt activation mode (from workspace preferences) can be overridden by an
<m2e.apt.activation> Maven property in a project's pom.xml
settings section. Valid values are :
disabled: m2e-apt activation is disabled for this project
jdt_apt: enable m2e-apt on this project and delegate Annotation Processing to JDT APT
maven_plugin: enable m2e-apt on this project and delegate Annotation Processing to the proper maven plugin execution Project preferences supercede existing pom properties.
m2e-apt can be installed from :
- the m2e discovery catalog : Window > Preferences > Maven > Discovery > Open Catalog
- the Stable update site : http://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-apt
- the Dev builds update site : http://download.jboss.org/jbosstools/photon/snapshots/builds/m2e-apt/latest/all/repo/
m2e-apt requires m2e 1.5+