解决maven项目Cannot change version of project facet Dynamic web module to 3.0/3.1

解决maven项目Cannot change version of project facet Dynamic web module to 3.0

1.打开项目所在目录下的.settings文件夹

打开org.eclipse.wst.common.project.facet.core.xml

把<installed facet="java" version="1.5"/>改成<installed facet="java" version="1.8"/>,把  <installed facet="jst.web" version="2.3"/>改成  <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.在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>

  

上一篇:你应该知道的CSS文字大小单位PX、EM、PT


下一篇:一个简单的Kubernetes应用部署示例