eclipse maven报错:One or more constraints have not been satisfied

在我的maven项目中添加速度依赖关系后,我在标记选项卡中得到相同的错误。然后我注意到maven项目创建的web.xml文件具有servlet2.3模式。当我将其更改为servlet 3.0模式并保存项目时,此错误消失。这是maven创建的web.xml文件

  1. <!DOCTYPE web-app PUBLIC

  2. "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

  3. "http://java.sun.com/dtd/web-app_2_3.dtd" >

  4.  
  5. <web-app>

  6. <display-name>Archetype Created Web Application</display-name>

  7. </web-app>

更改为

  1. <web-app xmlns="http://java.sun.com/xml/ns/javaee"

  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  3. xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

  4. http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"

  5. version="3.0">

  6. <display-name>Archetype Created Web Application</display-name>

  7.  
  8. </web-app>

 

补充:

其实还有其他问题可能导致这种报错;

比如web.xml 中修改完了之后还是报这种错误.

那么首先点击:

eclipse maven报错:One or more constraints have not been satisfiedeclipse maven报错:One or more constraints have not been satisfied

然后找到

eclipse maven报错:One or more constraints have not been satisfiedeclipse maven报错:One or more constraints have not been satisfied

修改:

eclipse maven报错:One or more constraints have not been satisfiedeclipse maven报错:One or more constraints have not been satisfied

转载自https://blog.csdn.net/gaga2284/article/details/70850445