Cannot change version of project facet Dynamic Web Module to 3.1 (Eclipse Maven唯一解决方式)
2017-06-28 08:29
666 查看
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
<?Also, make sure you're depending on the latest versions in your pom.xml. That is,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/javaeehttp://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee"></web-app>
<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: [code]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
.settingsdirectory within the Eclipse project.[/code]
相关文章推荐
- Cannot change version of project facet Dynamic Web Module to 3.1 (Eclipse Maven唯一解决方案)
- 【转】Cannot change version of project facet Dynamic Web Module to 3.1 (Eclipse Maven唯一解决方案)
- eclipse maven cannot change version of project facet Dynamic web module to 3.1
- maven 不能设置为web3.0人解决方法 Cannot change version of project facet Dynamic Web Module to 3.0.
- Cannot change version of project facet Dynamic web module to 3.1报错解决
- Cannot change version of project facet Dynamic web module to 3.1报错解决
- maven(二)创建一个maven的web项目中解决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报红叉,解决Cannot change version of project facet Dynamic web module to 2.5
- 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 3.1
- maven解决Cannot change version of project facet Dynamic Web Module to 3.0.
- Maven下解决Cannot change version of project facet Dynamic Web module to 3.0
- MAVEN解决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解决Cannot change version of project facet Dynamic Web Module to 3.0.
- Maven下解决Cannot change version of project facet Dynamic Web module to 3.0
- 解决创建Maven项目时出现Cannot change version of project facet Dynamic web module to 2.5的问题
- 解决maven项目上有红叉,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