Quantcast
Channel: Build and Deploy, Tools
Viewing all articles
Browse latest Browse all 31

m2e-apt

$
0
0
Date Updated: 
Thu, 2018-11-22 18:11
Red Hat
Date Created: 
Tue, 2013-10-15 06:17

m2e-apt aims at providing automatic Annotation Processing configuration in Eclipse, based on your project's pom.xml and its classpath dependencies (Requires Java >= 1.6).

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. 

Go to Window > Preferences > Maven > Annotation Processing or right-click on your project Properties > Maven > Annotation Processing to select the Annotation Processing strategy of your choice. m2e-apt supports both Annotation Processing set on the maven-compiler-plugin or the maven-processor-plugin (the latter takes precedence over the former).

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.


Viewing all articles
Browse latest Browse all 31

Trending Articles