maven error
1、问题描述:maven项目出现如下错误
JavaServer Faces 2.0 requires Dynamic Web Module 2.5 or newer..Maven Java EE Configuration Problem
JavaServer Faces 2.0 can not be installed : One or more constraints have
not been satisfied..line 1 Maven Java EE Configuration Problem
解决方法:修改web.xml头文件具体如下:
<!DOCTYPE web-app PUBLIC"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" >
替换为
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns /javaee/web-app_3_0.xsd" version="3.0">
最后 mavern update
2、问题描述:maven项目出现如下错误
JAX-RS (REST Web Services) 2.0 can not be installed : One or more constraints have not been satisfied. message-board line 1 Maven Java EE Configuration Problem
JAX-RS (REST Web Services) 2.0 requires Java 1.6 or newer. message-board line 1 Maven Java EE Configuration Problem
解决方法:修改jdk,具体如下
pom.xml文件引入
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
最后 mavern update