Eclipse compiler with APT
What is the correct way to call the Eclipse compiler with an APT processor from Java?
I am using the following Maven dependency for the compiler
<dependency>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>3.5.1</version>
</depen开发者_如何学Godency>
I want to test an APT processor with the Eclipse compiler in addition to Javac.
I did this using a custom builder. Right click project -> properties -> builders setup a new one that uses apt
AndroidAnnotations is a framework that generates java code based on annotations using APT.
This framework uses Maven as the default build environnement and have documentation on how to integrate AndroidAnnotations onto a maven based project.
I think you will find all what you need by looking the code.
You could have a look to : * The presentation page : http://androidannotations.org/ * The github repository : https://github.com/excilys/androidannotations
精彩评论