Maven打包web项目报错Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if
来源:互联网 发布:腾讯企业域名邮箱 编辑:程序博客网 时间:2024/05/16 16:18
maven install web项目时报错:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project spring2: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]
原因分析:
maven的web项目默认的webroot是在src\main\webapp。如果在此目录下找不到web.xml就抛出以上的异常。
解决办法:
1、将webroot修改为webapp
2、在pom.xml中指定web.xml,如下:
<build> <finalName>web-app-name</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.2</version> <configuration> <webXml>WebContent\WEB-INF\web.xml</webXml> </configuration> </plugin> </plugins></build>
0 0
- 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
- Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml
- 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
- maven-install报错:webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update
- webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
- Maven部署Web项目报错webxml attribute is required
- MAVEN: Error assembling WAR: webxml attribute is required
- Error assembling WAR: 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
- Sting类的实现
- poj 3508 Hide That Number(模拟大数减法)
- 新生代Eden与两个Survivor区的解释
- java如何实现webservice中wsdlLocation访问地址的可配置化
- 1077. Kuchiguse (20)
- Maven打包web项目报错Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if
- 内存溢出(OOM)与内存泄露
- hash id转换为key
- XML VS DataSe
- 机器学习笔记(三) 线性回归及梯度下降算法
- Android Studio 获取SHA1和MD5的步骤
- Go语言的前世今生
- Linux CenOs 6.5 安装 SSH
- python提取字符串中的所有数字