-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed #12: Restrict lifecycle-mapping #23
base: master
Are you sure you want to change the base?
Conversation
Trigger the ClasspathConfigurator only for "eclipse" or "jdt" compiler. Otherwise running the extension is just unnecessary overhead. Similar to https://github.com/jbosstools/m2e-jdt-compiler/blob/master/org.jboss.tools.m2e.jdt.core/lifecycle-mapping-metadata.xml
I'm not sure if both jdt as well as eclipse are required.. I've only used jdt in the examples, and eclipse seems to be for plexus-compiler-eclipse, which ... is old? Would the JDT null analysis ever work with it? I was tempted to not add it, but then went for "better safe than sorry" - unless you guys all agree its not needed? @kwin this is for your #12 - looks about right? @fbricon OK? |
I know next to nothing about how null analysis works, but I think doesn't hurt to have |
Actually, guys... especially @kwin ... on thinking this through further, I now think we do NOT want this!
This feedback got me thinking more about this change, based on @kwin issue #12 ... I now think we got this wrong - IMHO the point of the eclipse-external-annotations-m2e-plugin is (only) that it configures JDT null analysis properties for us (incl. EEA paths). Whether or not one chooses to also enforce this same on the mvn CLI build is an entirely different question, no? Sure I'm the first one to agree that it is nice to do that. But should this M2E extension enforce that, and only work for POM which do that? I actually don't think so, no. One could well just be interested in using this plugin to have it set EEA path from Maven dependencies - without ever wanting to enforce it on the CLI mvn build (thus not changing the compilerId). Therefore, IMHO we proably should NOT at all restrict the lifecycle-mapping to trigger the ClasspathConfigurator only for certain compilerId? So I would actually like to close this PR and issue #12, without merging. OK with you @kwin or NOK? BTW: If @kwin you had raised this for M2E workspace performance reasons (which is very important! had you noticed it slowing your workspace down, I'm curious?) then I think we should rather try to find some other way for this plugin to add the least overhead possible to M2E if it's "not used" (as in if it has nothing to do , because there are no properties AND no EEA to configure).
@fbricon we got that covered here in this project... see http://www.lastnpe.org !
If you're interested, you can see how this can be done in https://github.com/lastnpe/eclipse-null-eea-augments/blob/master/examples/maven/parent/pom.xml. And these slides here have some background. |
IMHO there are different aspects of this m2e extension. It is used for the following aspects:
For 1. it is useful to also consider the compiler id, because only the options given for either Therefore I agree that in general disabling the m2e extension for other compiler ids is not a good idea. But maybe you can quickly comment on point 1. Which compiler options are useful to transfer from the m-c-p settings to the Eclipse Project's compiler settings? Is this also useful in case the CLI build uses |
Not sure if it would affect it in any way, but there's the aspectj compiler, which handles pretty much a super-set or java, probably using jdt in the background. In eclipse it appears as a builder in a project, it's named |
Trigger the ClasspathConfigurator only for "eclipse" or "jdt" compiler.
Otherwise running the extension is just unnecessary overhead.
Similar to
https://github.com/jbosstools/m2e-jdt-compiler/blob/master/org.jboss.tools.m2e.jdt.core/lifecycle-mapping-metadata.xml