Tag Archives: Maven Project Error

How to Solve Maven Project Error: Cannot change version of project facet Dynamic web module to 3.0/3.1

How to Solve maven project: Cannot change version of project facet Dynamic web module to 3.0

1. Open the .settings folder in the project directory

open org.eclipse.wst.common.project.facet.core.xml

<installed facet=”java” version=”1.5″/> chane to <installed facet=”java” version=”1.8″/>,把 <installed facet=”jst.web” version=”2.3″/> chane to <installed facet=”jst.web” version=”3.0″/>

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <fixed facet="wst.jsdt.web"/>
  <installed facet="java" version="1.8"/>
  <installed facet="jst.web" version="3.0"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>

2. Add in pom.xml

<!-- define the project compile level -->  
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>          
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>