Eclipse 4.3.0 with Java 8 patch 2 unrecognized source level 1.8
I am using eclipse 4.3 with patches for Java 8 2, as well as M2e and subclipse, completely update all contents to the latest version
I entered Maven POM for our project and changed Maven compiler plugin to:
<groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <configuration> <source>1.8</source> <target>1.8</target>
I updated all my Maven projects and tried to do a complete cleanup and build There are mistakes everywhere Ignore the internal compiler error temporarily. The error I see is:
Syntax error,static imports are only available if source level is 1.5 or greater
I'm running Java 1.8 - why did I get this message? Is M2e to blame? maven-compiler-plugin? Or is eclipse Java 1.8 support not ready for prime time?
Solution
If you do not want to use the earlier 1.5 milestones, please note M2e 1.4 1 also supports Java 8, which you can install from this update site:
http://download.eclipse.org/technology/m2e/releases/1.4/1.4.1.20140328-1905
It is also available on the eclipse marketplace:
https://marketplace.eclipse.org/content/java%E2%84%A2 -8-support-m2e-eclipse-kepler
If you happen to be a fan of JBoss tools, it will go directly to JBoss central:
https://issues.jboss.org/browse/JBIDE-17002