maven 遇到failOnMissingWebXml有关问题解决方法

xiaoxiao2021-02-28  63

问题的主要原因是因为,你的项目是simple maven project,而你的项目是web工程需要打包成war包。

需要web工程的配置文件web.xml

正常情况下:

它存放的路径是:src/main/webapp/web.xml

OPTION:

1.open Properties for  your project

2.click to “Project Facets

3.取消勾选“Dynamic  Web Module”并点击 Apply布置

4.之后再勾选它,此时会出现“Further configration available...”

5.点击进去,配置web模块。

6.需要修改的内容是:

    Content directory:src/main/webapp

【意思是,在该路径下生成web module的配置文件,web.xml】

转载请注明原文地址: https://www.6miu.com/read-2627045.html

最新回复(0)