Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dietrich2013-11-04 18:21:20 -0500
committerIgor Fedorenko2013-11-04 19:08:41 -0500
commit18efa30c0781afe093157fd0a22fb49d3e4643ec (patch)
tree0395446c0bcf08869643f36bd4357d0b18ae4f8f
parentc33b31c48d0b0b61ea3bf645678530c540c65c3c (diff)
downloadm2e-core-18efa30c0781afe093157fd0a22fb49d3e4643ec.tar.gz
m2e-core-18efa30c0781afe093157fd0a22fb49d3e4643ec.tar.xz
m2e-core-18efa30c0781afe093157fd0a22fb49d3e4643ec.zip
420848 - maven-compiler-plugin source/target 1.8 not recognized
The jdt component of m2e v1.4 does not import java 1.8 projects correctly into eclipse. Instead of setting the compiler compliance level to java 1.8, java 1.4 is used. This patch fixes this issue by adding JavaSE-1.8 to the list of known java runtime environments and adding java 1.8 (respectively java 8) to the list of known source/target compliance levels. This contribution complies with http://www.eclipse.org/legal/CoO.php Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=420848 Signed-off-by: Daniel Dietrich <daniel.dietrich@gmx.net>
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
index d936dc4d..6fea0b9c 100644
--- a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
+++ b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
@@ -72,9 +72,10 @@ public abstract class AbstractJavaProjectConfigurator extends AbstractProjectCon
public static final String COMPILER_PLUGIN_GROUP_ID = "org.apache.maven.plugins";
- protected static final List<String> SOURCES = Arrays.asList("1.1,1.2,1.3,1.4,1.5,5,1.6,6,1.7,7".split(",")); //$NON-NLS-1$ //$NON-NLS-2$
+ protected static final List<String> SOURCES = Arrays.asList("1.1,1.2,1.3,1.4,1.5,5,1.6,6,1.7,7,1.8,8".split(",")); //$NON-NLS-1$ //$NON-NLS-2$
- protected static final List<String> TARGETS = Arrays.asList("1.1,1.2,1.3,1.4,jsr14,1.5,5,1.6,6,1.7,7".split(",")); //$NON-NLS-1$ //$NON-NLS-2$
+ protected static final List<String> TARGETS = Arrays
+ .asList("1.1,1.2,1.3,1.4,jsr14,1.5,5,1.6,6,1.7,7,1.8,8".split(",")); //$NON-NLS-1$ //$NON-NLS-2$
private static final String GOAL_RESOURCES = "resources";
@@ -95,6 +96,7 @@ public abstract class AbstractJavaProjectConfigurator extends AbstractProjectCon
ENVIRONMENTS.put("jsr14", "J2SE-1.5"); //$NON-NLS-1$ //$NON-NLS-2$
ENVIRONMENTS.put("1.6", "JavaSE-1.6"); //$NON-NLS-1$ //$NON-NLS-2$
ENVIRONMENTS.put("1.7", "JavaSE-1.7"); //$NON-NLS-1$ //$NON-NLS-2$
+ ENVIRONMENTS.put("1.8", "JavaSE-1.8"); //$NON-NLS-1$ //$NON-NLS-2$
}
protected static final String DEFAULT_COMPILER_LEVEL = "1.4"; //$NON-NLS-1$
@@ -469,6 +471,8 @@ public abstract class AbstractJavaProjectConfigurator extends AbstractProjectCon
source = "1.6";
} else if(source.equals("7")) {
source = "1.7";
+ } else if(source.equals("8")) {
+ source = "1.8";
}
// While "5" and "6" are valid synonyms for Java 5 and Java 6 target,
@@ -479,6 +483,8 @@ public abstract class AbstractJavaProjectConfigurator extends AbstractProjectCon
target = "1.6";
} else if(target.equals("7")) {
target = "1.7";
+ } else if(target.equals("8")) {
+ target = "1.8";
}
options.put(JavaCore.COMPILER_SOURCE, source);

Back to the top