Version 1.8 of java project grant does not exist

I'm trying to build a Dynamic Web Application in eclipse using Java 8 (and the Wildfly appServer, if that matters), but I can't get Eclipse Luna M5 to use Java 8 (I have Java 8 BETA support installed and it works on projects JavaSE).

In my POM, I set the level in Java 8:

 <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> 

But after doing maven -> update project I get the following error:

 Could not update project ExampleApp configuration Version 1.8 of project facet java does not exist. 

And really, there is no java 1.8 facet under project->preferences->project facets->java

Can I manually create such a facet and add It to to eclipse or will I have to wait until java 8 is released and the guys from eclipse decide to add it?

+46
java eclipse maven java-8 m2eclipse
Feb 22 '14 at 13:51
source share
6 answers

Additional patches are officially available for Kepler SR2. In ecliplse, go to the "Help" section β†’ "Market" β†’ Search java 8 kepler. Then select and install the following.

  • install Java 8 eclipse kepler sr2 support,
  • Java 8 Borders for eclipse kepler sr2 web tools
  • Java 8 support for m2e for Eclipse Kepler SR2 (if required)

Link: http://www.eclipse.org/downloads/java8/

After that, my multi-module maven project with java 8 builds fine without any error in eclipse kepler SR2.

UPDATE If you use the Spring Tool Suite (STS), then these features are included in version 3.5.1.

+73
Apr 24 '14 at 5:34
source share

There is an official bug report / patch for Kepler SR2. It also works with Spring Tool Suite 3.5.0.RC4 (which is based on Kepler). It should work for the moon.

Error report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=430637 (see comment No. 12)

Refresh the site for Java 8 frontend: http://download.eclipse.org/webtools/patches/drops/R3.5.2/P-3.5.2-20140329045715/repository

+9
Apr 01 '14 at 6:15
source share

While we expect official support for Java 1.8, I created a github widget that contains what I consider necessary changes - first they require Java 8 fixes: https://wiki.eclipse.org/JDT_Core/Java8

To install 1.8 facet support (assuming you are using 4.3.1 or 4.3.2, and you have write access to the main ... / eclipse / plugins directory):

  • git clone https://github.com/stevestorey/webtools.common.fproj
  • git checkout java8-support
  • Import various projects from this function into your Eclipse development environment (maybe in a new workspace). In particular, you need the org.eclipse.wst.common.project.facet.core and org.eclipse.wst.common.project.facet.core file
  • Right-click on the org.eclipse.jst.common.project.facet.core project and select "Export" and then "Plugin Development \ Deployable Plugins and Slices"
  • In the Export dialog box, select only the org.eclipse.jst.common.project.facet.core plugin and select the Install to Host bottom radio button and select the appropriate path (I believe I went with the default, but I don’t think that is especially important).
  • By clicking Finish, you will create a plugin and then start the installation in the Eclipse environment.

After restarting Eclipse, you should find that 1.8 is now selected as the Java facet :) (and it also works with M2E-enabled projects that indicate the source / target of 1.8).

Note the instructions in the standard patch 1.8 instructions that the installed JDK / should / be named "JavaSE-1.8" in the Eclipse properties.

Also note that if / when upgrading Eclipse (for example, to upgrade to 4.3.2), you probably need to install the corrected version again, as the update will return the β€œofficial” version of the plugin.

+4
Mar 01 '14 at 17:58
source share

I hit the exact same problem a few days ago. It looks like this will be included in the next release of Eclipse Luna.

Java version 1.8 of java project grant does not exist

The Eclipse Luna M6 is scheduled to be released on March 14, so I hope it will be included then.

+1
Mar 02 '14 at 21:52
source share

Java recently upgraded to Java 8, so you need to upgrade to the new Eclipse for it to work. I ran Eclipse 4.3 (Kepler) and I had to upgrade to Eclipse 4.4 (Luna) enter image description here

0
10 Oct '14 at 15:09
source share

Go to your Project Property to search for a project grant and change the java version

enter image description here

0
Mar 12 '15 at 8:16
source share



All Articles