Cannot change version of project facet Dynamic Web Module to 3.1 (Eclipse Maven唯一解决方式)
If you want to use version 3.1 you need to use the following schema:
Note that 3.0 and 3.1 are different: in 3.1 there's no Sun mentioned, so simply changing 3_0.xsd to 3_1.xsd won't work
<?
xml version="1.0" encoding="UTF-8"?>
<web-app 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"
version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee">
</web-app>
Also, make sure you're depending on the latest versions in your pom.xml. That is,
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
...
</configuration>
</plugin>
and
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
Also, you should compile with Java 7 or 8:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
2016-02-20
加入,假设还有错,依照以下配置进行改动
Another way is to edit the project facet configuration file itself:org.eclipse.wst.common.project.facet.core.xmlChange the dynamic web module version in this line to 3.0 -<installed facet="jst.web" version="2.5"/>And then:You'll find this file in the
- Right-click on the project (in the Project Explorer panel).
- Select Maven » Update Project (or press Alt+F5)
.settingsdirectory within the Eclipse project.
Cannot change version of project facet Dynamic Web Module to 3.1 (Eclipse Maven唯一解决方式)的更多相关文章
- eclipse 创建Java web项目 Cannot change version of project facet Dynamic web module to xxx
问题描述: 用Eclipse创建Java web项目时选择的Artifact Id为maven-artchetype-webapp,由于这个archetype比较老,用的servlet还是2.3的. ...
- MAVEN解决Cannot change version of project facet Dynamic web module to 2.5
我们用Eclipse创建Maven结构的web项目的时候选择了Artifact Id为maven-artchetype-webapp,由于这个catalog比较老,用的servlet还是2.3的,而一 ...
- 解决Cannot change version of project facet Dynamic web module to 2.5
我们用Eclipse创建Maven结构的web项目的时候选择了Artifact Id为maven-artchetype-webapp,由于这个catalog比较老,用的servlet还是2.3的,而一 ...
- eclipse 导入新项目后报错:Cannot change version of project facet Dynamic web module to 2.5
错误原因: 我们用Eclipse创建Maven结构的web项目的时候选择了Artifact Id为maven-artchetype-webapp,由于这个catalog比较老,用的servlet还是2 ...
- 解决Cannot change version of project facet Dynamic web module to 3.0
我们用Eclipse创建Maven结构的web项目的时候选择了Artifact Id为maven-artchetype-webapp,由于这个catalog比较老,用的servlet还是2.3的,而一 ...
- 【转】解决Cannot change version of project facet Dynamic web module to 2.5
http://blog.csdn.net/steveguoshao/article/details/38414145 我们用Eclipse创建Maven结构的web项目的时候选择了Artifact I ...
- Maven导入时,Cannot change version of project facet Dynamic Web Module to 3.0.
今天手贱,在eclipse里面把项目删掉了,重新maven导入时,报出Cannot change version of project facet Dynamic Web Module to 3.0. ...
- eclipse中Cannot change version of project facet Dynamic Web Module to 2.5.
Cannot change version of project facet Dynamic Web Module to 2.5.这个错误可能很多人都碰到过,这里网上查了一些资料,解决的问题.所以这里 ...
- 解决maven项目Cannot change version of project facet Dynamic web module to 3.0
问题描述 用Eclipse创建Maven结构的web项目的时候选择了Artifact Id为maven-artchetype-webapp,由于这个catalog比较老,用的servl ...
- ERROR: Cannot change version of project facet Dynamic Web Module to 3.0?
Issue: When you create web app in eclipse with maven configuration, you may get following error. Can ...
随机推荐
- vue工程化:返回顶部和底部的动画效果
. <template> <div> <div class="scroll" :class="{show:isActive}"&g ...
- win7 命令行禁用开启usb存储
禁用: reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbstor" /v Start /t reg ...
- 微信小程序中自定义modal
微信小程序中自定义modal .wxml <modal hidden="{{hidden}}" title="这里是title" confirm-text ...
- jquery 应用
http://www.jq22.com/ gwj6396668@163.com
- [Luogu] P1131 [ZJOI2007]时态同步
题目描述 题目描述 小Q在电子工艺实习课上学习焊接电路板.一块电路板由若干个元件组成,我们不妨称之为节点,并将其用数字1,2,3…进行标号.电路板的各个节点由若干不相交的导线相连接,且对于电路板的任何 ...
- js 技巧 (三)
//无模式的提示框 function modelessAlert(Msg) { window.showModelessDialog("javascript:alert("&q ...
- 【数据库】DML-增删改查-SQL实现
一.数据插入-Insert 1. 插入单条记录 insert into 表名(字段名,字段名,字段名) //当插入所有字段时,字段名可以省略 values('值1','值2','值3'); 2. 插入 ...
- 8.url路由
1.单一路由对应 url(r'^index/$', views.index), 这里要注意的是,/$ 表示只有只/结尾的才有效,如果把$符号去掉的话,只要是以index/开头都会匹配到这个url. 2 ...
- mysql You can't specify target table 'sys_org_relation' for update in FROM clause 删除表条件不能直接包含该表
mysql中You can't specify target table for update in FROM clause错误的意思是说,不能先select出同一表中的某些值,再update这个表( ...
- Qt 安装与配置记录
一 安装的时候得选一个Qt安装啊!!不要忘了展开这一项,而只安装Qt creator 展开之后会发现有很多版本,为了方便,选自带编译器mingw,就不需要麻烦的配置了 二 打开Qt creator 后 ...