Cannot change version of project facet Dynamic web module to 3.0 解决方案

来源:互联网 发布:巨灵数据 金融界 编辑:程序博客网 时间:2024/06/06 01:58

1)修改web.xml

<web-app version="3.1"
         xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">


2)修改org.eclipse.jdt.core.prefs

1.7


3)修改org.eclipse.wst.common.component

1.7.0


4)修改org.eclipse.wst.common.project.facet.core.xml

3.1


5)配置maven setting.xml

<profile>
      <id>jdk-1.7</id>
      <activation>
          <activeByDefault>true</activeByDefault>
          <jdk>1.7</jdk>
      </activation>
      <properties>
          <maven.compiler.source>1.7</maven.compiler.source>
          <maven.compiler.target>1.7</maven.compiler.target>
          <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
      </properties>
    </profile>


6)修改项目pom.xml

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>


7)Maven->Update Project

0 0
原创粉丝点击