您的位置:首页 > 产品设计 > UI/UE

MAVEN: Error assembling WAR: webxml attribute is required

2015-05-19 16:39 169 查看
环境: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

效果:成功
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐