• webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)


    1、错误描述

    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Cdmp 0.0.1-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Cdmp ---
    [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 0 resource
    [INFO] 
    [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Cdmp ---
    [INFO] Nothing to compile - all classes are up to date
    [INFO] 
    [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Cdmp ---
    [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 0 resource
    [INFO] 
    [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Cdmp ---
    [INFO] Nothing to compile - all classes are up to date
    [INFO] 
    [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ Cdmp ---
    [INFO] 
    [INFO] --- maven-war-plugin:2.2:war (default-war) @ Cdmp ---
    [INFO] Packaging webapp
    [INFO] Assembling webapp [Cdmp] in [F:workspaceCdmp	argetCdmp-0.0.1-SNAPSHOT]
    [INFO] Processing war project
    [INFO] Copying webapp resources [F:workspaceCdmpsrcmainwebapp]
    [INFO] Webapp assembled in [65 msecs]
    [INFO] Building war: F:workspaceCdmp	argetCdmp-0.0.1-SNAPSHOT.war
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 3.181 s
    [INFO] Finished at: 2017-01-10T11:08:36+08:00
    [INFO] Final Memory: 11M/154M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project Cdmp: 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
    

    2、错误原因

         在创建maven项目时,未新建web.xml


    3、解决办法

    (1)在WEB-INF目录下新建web.xml

  • 相关阅读:
    设置qt插件路径
    实现js与Qt程序的交互(使用QtWebkit)
    QT4与QT3的不同
    Qt5 结构及模块组成?
    最简单搜索引擎代码
    使用Bootstrap
    Lucene.Net简介和分词
    程序优化
    Host和Server的开发
    jQuery的ajax对WebApi和OData的封装
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13313981.html
Copyright © 2020-2023  润新知