首页 > Web开发 > 详细

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

时间:2018-05-28 18:49:32      阅读:181      评论:0      收藏: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> 

  

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

原文:https://www.cnblogs.com/achengmu/p/9101669.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!