Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Version 1.8 of project facet java does not exist

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

In my POM I set the level to 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 I do 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 indeed there is no java 1.8 project facet under project->preferences->project facets->java

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

like image 765
Svetlin Zarev Avatar asked Feb 22 '14 13:02

Svetlin Zarev


2 Answers

There are additional patches available for Kepler SR2 officially. In ecliplse, go to "Help" --> "Market Place" --> Search for java 8 kepler. Then choose and install the following.

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

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

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

UPDATE: If you are using Spring Tool Suite (STS), then version 3.5.1 has included these features.

like image 114
Poorna Subhash Avatar answered Oct 17 '22 10:10

Poorna Subhash


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 Luna too.

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

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

like image 39
Yannick Mauray Avatar answered Oct 17 '22 10:10

Yannick Mauray