-
Notifications
You must be signed in to change notification settings - Fork 19
Some UI options to make m2e-apt more effective #30
Comments
Wei Cai, these look like interesting ideas.
I'd be happy to review separate pull requests so we can keep the discussion focused on each problem |
I have alternative compiler plugin implementation that has proc:none by default ;-) I am not familiar with maven-processor-plugin, but most likely you don't want to run it inside IDE, especially during incremental build. The whole annotation processing design seems quite broken to me. Really bad mixture of different concerns that is hard to map into IDE and build workflows. |
Hi Fred,
We have a very low level library referenced by almost all projects in workspace, and the library contains annotation processors. We have only one project defines maven-processor-plugin(let's name it "A"), while all other projects inherited a maven-compiler-plugin with no "-proc:none". We wish only project "A" get apt enabled, however almost all projects have apt enabled. That's why I bring out a workspace preference option, I was thinking of users will either use processor-plugin or use compiler-plugin within workspace, they should not mix together. Options in preference page could look like:
|
|
Thanks for your comments.
I'm also wondering why proc:none is the flag to determine enable apt or not, usually maven-compiler-plugin won't have this particular argument, so maven-compiler-plugin is get enabled silently for most projects which is probably not user's purpose. Shall we bring a new argument, like only if apt.enabled is configured in maven-compiler-plugin, m2e-apt will then start to work. User should enable this configuration if they wish to use apt. Default enabling apt for compiler plugin is a real performance killer for big projects.
|
concerning topic 2) with the proposed reconcile option ... Is there already a full solution for this request implemented in any new version of the me2-apt plugin? Or is there a pull request existing already? The approach to disable it on default when applying the configurations automatically from the pom.xm through the m2e-apt connector, like caiwei-ebay mentioned, would also be ok for us. |
PR #31 has been applied and m2e-apt 1.2.0-SNAPSHOT is available from http://download.jboss.org/jbosstools/builds/staging/m2e-apt/all/repo/ Adding |
works fine, thx |
m2e-apt's code is now included in https://github.com/eclipse-m2e/m2e-core , please consider reporting issue to https://github.com/eclipse-m2e/m2e-core/issues if it's still relevant. |
Hi Fred,
Is there a possibility to provide a preference option like "Do not automatically configure APT for project having maven-compiler-plugin in pom.xml".
I know there is a workaround to avoid, add "-proc:none" to maven-compiler plugin or remove depenencies that has defined annotation processors. This is not ideal. Right?
AbstractAptProjectConfigurator#configure is called when configure maven projects,
so we can put code like:
IJavaProject jp = JavaCore.create(project);
if(jp != null && AptConfig.isEnabled(jp) && AptConfig.shouldProcessDuringReconcile(jp)) {
AptConfig.setProcessDuringReconcile(jp, false);
}
Your feedback is highly appreciated, I can submit patch if you would like to make these options possible.
Thanks.
The text was updated successfully, but these errors were encountered: