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.xml
- Change the dynamic web module version in this line to 3.0 -
<installed facet="jst.web" version="2.5"/>
- And then:
- Right-click on the project (in the Project Explorer panel).
- Select Maven » Update Project (or press Alt+F5)
- You'll find this file in the
.settings
directory 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 ...
随机推荐
- Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>' 点开错误的文 ...
- Java Servlet 非英文乱码
response.setHeader("Content-Type", "text/json; charset=UTF-8"); request.setChara ...
- vue 中slot 的具体用法
子组件 <template> <div class="slotcontent"> <ul> <!--<slot></sl ...
- Linux忘记root密码,密码找回,图片展示
忘记root密码 CentOS 7参考地址如下:https://www.baidu.com/s?wd=CentOS7+%E6%89%BE%E5%9B%9Eroot%E5%AF%86%E7%A0%81& ...
- awk输出指定列
awk '{print $0} file' #打印所有列awk '{print $1}' file #打印第一列 awk '{print $1, $3}' file #打印第一和第三列 cat fil ...
- CSS——可视化格式模型
CSS的可视化格式模型 CSS中规定每一个元素都有自己的盒子模型(相当一规定了这个元素如何显示): 然后可视化格式模型则是把这些盒子模型按照规则摆放到页面上,也就是如何布局: 换句话说,盒子模型规定了 ...
- c#数据库连接学习
/*通过C#winform程序访问数据库数据 用到的命名空间和变量类型: using System.Data.SqlClient; SqlConnection:数据库连接类 SqlCommand:数据 ...
- 对Spring框架的理解(转)
① spring框架是一个开源而轻量级的框架,是一个IOC和AOP容器 ② spring的核心就是控制反转(IOC)和面向切面编程(AOP) ③ 控制反转(IOC):是面向对象编程中的一种设计原则 ...
- BNUOJ 7697 Information Disturbing
Information Disturbing Time Limit: 3000ms Memory Limit: 65536KB This problem will be judged on HDU. ...
- 如何把DEBIAN变成UBUNTU-DESKTOP最少化安装
Ubuntu 18.04没有32位,老电脑要装32位下面方法可以实现 Debian 9.6变成Ubuntu-Desktop 最少化 1 安装Debian 9.6时用expert mode 安装,安装过 ...