zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    底层原理
    No.1
    No.3
    No.0
    php 10进制转62进制,可用于短网址生成
    php实现斐波那契数列
    五种常见的 PHP 设计模式
    PHP利用MySQL保存session
    HTTP相关
    如何优化tomcat配置(从内存、并发、缓存4个方面)优化
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13313981.html
Copyright © 2011-2022 走看看