Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web

eclipse通过maven打war包的时候,发生如下错误提示

Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web

找到如下文,说的很清楚
http://blog.csdn.net/vking_wang/article/details/8731824

【问题描述】:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project XFireTest: 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

【问题解决】:



simple-webapp


org.apache.maven.plugins
maven-war-plugin
2.1.1




WebContent








【问题分析】:
我的项目时eclipse中的dynamic web project,并且提供Maven支持,其中在web项目package为war。
Web的maven项目默认的webroot是在src\main\webapp。如果在此目录下找不到web.xml就抛出以上的异常。

你可能感兴趣的:(exception总结,代码管理工具)