Maven部署Web项目报错webxml attribute is required
来源:互联网 发布:中世纪2 优化9 兵种 编辑:程序博客网 时间:2024/04/29 20:20
mvn package一个web项目时,报错如下:Error assembling WAR:webxml attribute is required
原因:
maven的web项目默认的webroot是在src\main\webapp。如果在此目录下找不到web.xml就抛出以上的异常。
解决办法:需要在pom.xml中增加<webResources>配置,如下:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <webXml>webapps\WEB-INF\web.xml</webXml> </configuration> </plugin>或者把webapps改成默认的webapp
0 0
- Maven部署Web项目报错webxml attribute is required
- 【Maven】Maven部署Web项目报错webxml attribute is required
- [Java][Maven]Maven部署Web项目报错webxml attribute is required
- [Java][Maven]Maven部署Web项目报错webxml attribute is required
- [Java][Maven]Maven部署Web项目报错webxml attribute is required
- [Java][Maven]Maven部署Web项目报错webxml attribute is required
- Maven打包web项目报错Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if
- Maven打包web项目报错Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if
- Maven报错:Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml
- maven-install报错:webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update
- MAVEN: Error assembling WAR: webxml attribute is required
- Error assembling WAR: webxml attribute is required
- Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml
- webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
- Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in
- Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in
- IDEA Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executin
- Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in
- android仿微信顶部菜单栏的实现
- Ubuntu设置中文编码和文本的编码转换
- uploadify3.2 属性、事件、方法
- JAVA中int、String的类型转换
- gerrit的搭建
- Maven部署Web项目报错webxml attribute is required
- 书写优雅的shell脚本(七)- ${COLUMN:-}
- lua学习笔记13:协程详解和举例
- PHP在指定的预定义字符前添加反斜杠
- 类和对象第二讲
- 闲聊下Java与XML互转的N种实现方式
- 深入浅出Swift(4)—— TableView
- 无线电波的波段划分和应用
- 安装redis之前必须安装哪些套件