I had the same symptom with a different cure. I was trying to upgrade my JSF 2.2.4/Spring 3.0 webapp to JSF 2.3 in order to enjoy the new JSF websocket hooks there and Eclipse (actually STS) would not cooperate. In Eclipse's Project Facets, JSF 2.3 never became available until I edited directly the org.eclipse.wst.common.project.facet.core.xml file as directed in previous answers - the highest it would go was 2.2.
Here are the hoops I jumped through. I don't know that all of these were necessary because I fundamentally don't understand all this configuration.
In Eclipse I frequently got a scary warning, "Modifying a faceted project when implementations of one or more installed facets are not available can potentially result in a corrupted project. Are you sure you want to proceed?" This prompted me to do more frequent commits but no corruption occurred.
- Upgrade JDK from 1.7 to 1.8 in POM, Eclipse compiler, and Eclipse Project Facets.
Update the following Maven dependencies:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
... to:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
... and ...
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.4</version>
</dependency>
... to:
<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>2.0</version>
</dependency>
I had to update my web.xml namespace declarations from:
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
... to:
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
I had to update Project Facets -> Dynamic Web Module from 2.5 to 3.0. I tried 3.1 but got errors.
In this process I frequently got the error in the title of this post, "Cannot change version of project facet Dynamic Web Module to 3.0" and Eclipse refused to compile the project or offer JSF 2.3 in the Project Facets. When I edited the org.eclipse.wst.common.project.facet.core.xml file as directed the errors disappeared, Eclipse offered JSF 2.3 in Project Facets, and the project compiled and ran fine on Tomcat 9.0.8. However, Project Facets still warned "Implementation of version 2.3 of project facet jst.jsf could not be found. Functionality will be limited." I suspect this simply means that autocomplete and other Eclipse conveniences will not be available because it cannot find the JSF 2.3 implementation declared in my POM.
Hope this helps someone. Google searches yielded only this post by Ali Bassam and indirectly BalusC which helped.