I'm using the latest version of IntelliJ IDEA (13.1.4) and I'm developing my own custom annotation.
I currently have two modules on my project
I was working in Eclipse but I'm trying to migrate ot IntelliJ because I can't stand Eclipse. I managed to make it kinda-of work in Eclipse by having an Ant build generating the .jar file of the main project and the Test classes would use this .jar.
But I can't make it work on IntelliJ.
In Settings -> Compiler -> Annotation Processor
I have a new profile, the test project is inside this profile, the profile is like:
I've also tried changing the Processor Path
to the output folder (where there're classes n META-INF) but no luck. The generated
folder is being created by the IDE, but it's not finding any processors.
Any tip on how to proceed here?
I ended up finding how to do it, if anyone is interested:
Project Structure
menu add an artifact
to the main project (the annotation processor project). This artifact exports a .jar
file with the annotation processor. Make sure to enable Build on Make
, that way a new .jar will be generated every time you ask to Rebuild Project
Settings - > Compiler -> Annotation Processor
Enable annotation processing, check Processor Path
and put the path of the exported .jar
file. Make sure to put the processor.and that should be all.
Now everytime rebuilt project
is clicked a new jar is generated and the second project will be re-generated with that new jar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With