I have a custom annotation and it’s processor & processorFactory. How do I configure my Ant build file such that:
-
The annotation processor is applied on annotated classes and generates source files inside “gen” folder
-
The generated source files(from annotation processing) could be used by other source files in project.
This is not pretty, but it is what I do. (Sources javac ant task javac man page) Using the compilerarg attribute I can pass in the annotation processing related arguments that are not directly supported by the javac ant task.
I do not use the APT tool because the documentation states
If you really don’t care for compiler args, you can jar your annotation processors like this
Then you can do