Today while converting Dynamic Web Project to Maven project I got below Error:
Cannot change version of project facet Dynamic Web Module to 3.0 One or more constraints have not been satisfied
What steps I’ve performed to fix this?
In order to fix this first thing I did is to change Project Facets
settings.
Right click on Project
in Eclipse- Click on
Properties
- Click on
Project Facets
Tab - Change value from
3.1
to3.0
for Dynamic Web Module as mentioned in below image.
Did it fix my problem? Unfortunately No
I was not able to apply setting as Apply
and OK
button was grayed out with error msg: Cannot change version of project facet Dynamic Web Module to 3.0
.
I was literally stuck at this point, then How did I fix this issue?
Step-1
- Go to your Eclipse Workspace location
- If you don’t find location then
- Right click on project
- Click on Resource
- Go to your Location
Step-2
Go to location and open file <workspace>/.settings/org.eclipse.wst.common.project.facet.core.xml
.
Step-3
Modify version for jst.web property to 3.0
from 3.1 and save file.
<?xml version="1.0" encoding="UTF-8"?> <faceted-project> <fixed facet="wst.jsdt.web"/> <installed facet="jst.jaxrs" version="2.0"/> <installed facet="wst.jsdt.web" version="1.0"/> <installed facet="java" version="1.8"/> <installed facet="jst.web" version="3.0"/> </faceted-project>
Step-4
- Refresh project
- Right click on Project
- Refresh (F5)
- Clean project
- Click on
Project
- Select
Clean
- Click on
- Again
- Right-click on project name
- Click on Maven
- Update project
- Now checkout
Project Facets
screen again and error should be gone for you.
Let me know if this solution doesn’t work for you, I’ll debug more.