• 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

  • 相关阅读:
    C语言利用fgetc复制拷贝文件内容
    linux 安装gcc 和 g++
    C宏定义和使用
    C的realloc的动态分配扩展和缩小内存
    C用malloc 向系统申请一个大小为n*4个字节的内存块
    GDB core命令的使用调试段错误
    GDB的安装
    C字符指针数组的使用
    C二维字符数组的使用及如何获取二维数组的总行数和总列数!
    C二维数组用指针地址遍历
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13313981.html
Copyright © 2020-2023  润新知