eclipse创建maven项目时如何修改web的版本和jdk的版本

eclipse创建maven项目时如何修改web的版本和jdk的版本

1、首先找到项目下面的.settings下面的org.eclipse.wst.common.project.facet.core.xml文件

2、修改里面的文件为我们需要的jdk和web的版本

<?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.1"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>

3、在我们的maven项目的pom文件里面添加编译插件

  <build>
    <finalName>SSM</finalName>
    	<plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
  </build>

4、更新我们的maven项目

右击我们的项目名,Maven->Update Project...

  

猜你喜欢

转载自www.cnblogs.com/hglibin/p/8946795.html