I am using QueryDsl, so my source depends on generated code.
FIRST
Whenever IDEA (auto) imports pom.xml, the following setting is always empty:
Build, Execution, Deployment -> Compiler -> Annotation Processors -> Annotation Processors
I have to set it manually, which is very troublesome.
SECOND
I have multi-modules using QueryDsl, which I want to be grouped into one profile with the QueryDsl com.mysema.query.apt.jpa.JPAAnnotationProcessor
applied.
Build, Execution, Deployment -> Compiler -> Annotation Processors -> profile
I currently have to group these modules into one profile manually.
I also have to write a README and inform all members to follow the guide to set IDEA manually.
How can I config pom.xml, so that IDEA can fill these two settings automatically?
Press Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment | Compiler | Annotation Processors.
In the Settings/Preferences dialog ( Ctrl+Alt+S ), click Editor | General | Auto Import. Enable the Optimize imports on the fly option and apply the changes.
I would recommend you add .idea/* under version control as well as the project .iml file.
Annotation Processors
Annotation Processors settings are stored in .idea/compiler.xml. Having all this under CVS will make it a lot easier for other developers to open the project as they will open a project file, not a pom file, already containing project settings, run configurations, etc.
Details onto what should go in CVS and what not could be found on the official IntelliJ guide on How to manage projects under Version Control Systems
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