关于使用maven创建web项目pom.xml中出现错误web.xml is missing and is set to true

错误提示:

web.xml is missing and <failOnMissingWebXml> is set to true

意思就是,web项目需要一个web.xml文件,而你通过maven的

创建是没有web.xml,所以需要自己手动生成

解决:有两种方式

第一种:(简单)

找到报错的项目,右击----->  javaEE-tools  ------> generate deployment descriptor stub即可!!

第二种:(繁琐)

步骤如下:

(1) 找到报错的项目,右击properties属性------project Facets---->将Dynamic Web Moudle的选择去掉----->apply

  (2)    再次点击Dynamic Web Moudle(将其选中),下方会出现Further configuration available ---->点击它

(3)出现

 (4)我的方式(大家也可以选者上面系统默认的方式)

(5)ok 

猜你喜欢

转载自blog.csdn.net/qq_38263083/article/details/82904968