解决Description Resource Path Location Type Cannot change version

时间:2024-03-24 14:56:41

最近使用总是从别的位子导入项目至Eclipse,总是遇到如下错误,现将其解决方法记录以便以后查阅!

解决Description Resource Path Location Type Cannot change version

有如下几个步骤:

1:在工程目录下有个.settings的文件夹,打开org.eclipse.wst.common.project.facet.core.xml ,做如下修改

<installed facet="jst.web" version="3.0"/>  将2.5改为3.0

<installed facet="java" version="1.8"/>  将1.5改为1.6以上即可

2:在Eclipse中右键工程打开properties,编辑project Facets 以及java Compiler

解决Description Resource Path Location Type Cannot change version

解决Description Resource Path Location Type Cannot change version

3:在pom文件中配置maven插件

  <plugin>

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
  </plugin>

4:点击工程右键找到Maven目录下的Update Project

解决Description Resource Path Location Type Cannot change version

至此,问题完美解决