maven在打包项目的时候报错

Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project taotao-manager-web: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)

maven的web项目默认的webroot是在src\main\webapp。如果在此目录下找不到web.xml就抛出以上的异常。

其实如果标准的maven项目结构的话不会出现这个问题。

在eclipse中即使不使用骨架建立的也是比较标准的项目结构,但是在idea中不一样。

比如我使用maven建立一个web项目,开始的时候不选用骨架,先建立一个maven项目,再添加web环境,也即是下面这种结构

在这种结构下,如果不进行其他的配置,就会出现上述异常,其实好办,以后就先把项目结构建成这种,继续做如下操作

web文件夹-->webapp,然后把整个文件夹拖到main文件下就可以了。

其实这么做效率并没有降低,因为使用骨架的话生成骨架有时候会卡死,而且生成的结构并不是很完整,部分文件的内容也不标准。

好,以后就这样干吧,呵呵。。

Failed to execute goal.....webxml attribute is required...的更多相关文章

  1. Maven打包项目失败;报错:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project Hello: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/we

    报错信息: E:\MIKEY\mikey\HTML5\TestMaven_01>mvn package [INFO] Scanning for projects... [INFO] [INFO] ...

  2. maven install Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project web_nanchang

    maven打包成war时,报错:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default- ...

  3. 【maven 报错】maven项目执行maven install时报错Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)

    在使用maven新建的web项目中,执行 执行如上的这两个操作,报错: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-co ...

  4. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project child02

    maven打包成war时,报错: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (d ...

  5. MAVEN项目打包报错:Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on pr ...

  6. Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (dist) on project hadoop-kms: An Ant BuildException has occured

    编译cdh版hadoop2.5.0出现的问题 系统: CentOs66 64位 JDK:1.7 Maven: 3.0.5 Protobuf: libprotoc 2.5.0 编译命令: mvn pac ...

  7. Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default ...

  8. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:

    security-sdk-1.0.jar已经存在于D:/secServerSDK-test/src/main/resources/lib下 报错如下: xxxxxx@xxxxxxxx /d/secSe ...

  9. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-cli) on project standalone-pom: Unable to parse configuration of 3: mojo org.apache.maven.plugins:

    问题: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (defau ...

随机推荐

  1. php进行多个数组合并zip

    $a = array_zip(array("Dog","Cat","Horse"), array(1,2,3), array("l ...

  2. 1095. Cars on Campus (30)

    Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out time ...

  3. Web开发从零单排之二:在自制电子请帖中添加留言板功能,SAE+PHP+MySql

    在上一篇博客中介绍怎样在SAE平台搭建一个html5的电子请帖网站,收到很多反馈,也有很多人送上婚礼的祝福,十分感谢! web开发从零学起,记录自己学习过程,各种前端大神们可以绕道不要围观啦 大婚将至 ...

  4. Hadoop启动异常情况解决方案

    1. 启动时报WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using b ...

  5. adb shell出现error错误

    模拟器已打开,原因在于端口被占用. 找到kadb.exe 进程,结束进程!

  6. C# XML - XmlNode and XmlAttribute

    public static string TestXML(string path) { XmlDocument doc = new XmlDocument(); doc.Load(path); Xml ...

  7. 《云大课程助手》Android刷课工具来袭

    云大课程助手(Android)谨以此app纪念我这四年的大学生活.希望大家用的愉快. 下载地址:http://zhushou.360.cn/detail/index/soft_id/922292注:已 ...

  8. C#枚举注释实例

    public enum 枚举名称    {        /// <summary>        /// 注释描述1        /// </summary>        ...

  9. hdu 1754 线段树入门

    线段树点修改  区间最大值查询 #include <cstdio> #include <cstdlib> #include <cmath> #include < ...

  10. Unity3D Script Execution Order ——Question

    我 知道 Monobehaviour 上的 那些 event functions 是 在主线程 中 按 顺序调用的.这点从Manual/ExecutionOrder.html 上的 一张图就可以看出来 ...