-
Notifications
You must be signed in to change notification settings - Fork 37
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
JDK level compilation switched to v7 for Eclipse m2e #27
Conversation
Since commit ea5e38c, JDK v7 is used for compilation. Some class (Files, Path, ...) are now used and require JDK v7. This change is mainly to link a JDK v7 when Eclipse m2e is used (v6 used before, so compilation problem, manuel update required).
The PR is incomplete to me. Look at 6397c3e, two new classes have been introduced. They can be easily deprecated or removed. They also maybe other spots. |
labelled as bug? I would say enhancement... |
I don't thing so because enforcer requires 1.7. Why should MCOMPILER require 1.6 only? This looks like a mismatch or bug. Unless I do not fully understand the issue. |
Good catch, thanks.
Basically this feature was to have the correct JDK version linked in Eclipse when project is imported :-) |
DirectoryScanner.isSymbolicLink seems bugged: only parent tested, not the complete file => should be
|
@rfscholte that's the bug:
|
@axel3rd Incomplete tests should be separate PR. |
This is intended. By using source+target all classes get the right byte-code version and can be used by JDK. However, by compiling with JDK 7 we can classes from this distribution. Normally you would call it "leaking" and the animal-sniffer-maven-plugin prevents you from doing so, but now we are using this feature. Java 9 comes with a better option: JEP 247: Compile for Older Platform Versions |
Ok
After reviewing the content, perhaps could stay unchanged. This is an utility class who "simplify" the usage of |
@rfscholte Makes sense now, though ugly. Will be leave at 6 now or move to 7? If not, we can close this PR. |
Let's call it forward compatibility :) I'm not sure if this is the right moment to require Java 7, Plexus Utils is used a lot. |
@axel3rd I think this PR has to be dropped because it won't do what we want. I think the best is a profile for m2e action to override the |
PR updated with java 1.7 compilation level restricted to m2e Eclipse plugin usage (title updated). |
@rfscholte Any objections to merge this? Looks good to me now. |
I see that Eclipse is trying to pick the best matching JDK. You'll only see this issue when you have JDK6 installed. However, if you run any goal from the IDE, its bytecode version will be wrong. |
@rfscholte Agreed. Though, Eclipse ignores the Enforcer rule here. @axel3rd Do you have JDK 6 installed? |
@michael-o : Yes, I have the JDK 6 configured in my Eclipse. I have updated the profile comment with the exact cause. Even if this is a m2e bug, this workaround can't be added ? It is boring to configure the JRE System Library to JavaSE-1.7 manually under Eclipse on any checkout ; But I can continue to do that if this profile is not sustainable ... |
Thanks :-) |
Since commit ea5e38c, JDK v7 is used
for compilation.
Some class (Files, Path, ...) are now used and require JDK v7.
This change is mainly to link a JDK v7 when Eclipse m2e is used (v6 used
before, so compilation problem, manuel update required).