码迷,mamicode.com
首页 > Web开发 > 详细

MAVEN: Error assembling WAR: webxml attribute is required

时间:2015-05-19 19:12:06      阅读:247      评论:0      收藏:0      [点我收藏+]

标签:maven

环境:MyEclipse2015 CI+Maven3

使用Maven创建一个Web project(创建方法参考《如何用Maven创建web项目(具体步骤)》),执行maven install时出现错误。


[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.152 s
[INFO] Finished at: 2015-05-19T16:41:50+08:00
[INFO] Final Memory: 9M/21M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project TestWebApp: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


原因:目录/src/main/webapp/WEB-INF/下没有web.xml文件;

解决方案:在该目录下新建文件web.xml

效果:成功

MAVEN: Error assembling WAR: webxml attribute is required

标签:maven

原文地址:http://blog.csdn.net/zxygww/article/details/45846449

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!