zoukankan      html  css  js  c++  java
  • Failed to execute goal org.apache.maven.plugins:mavenwarplugin:2.1:war

    open-jdk 换成 sun jdk

    今天在新的Linux服务器上将项目check out出来以后,重新build,就出现了下面的问题:

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1:war (default-war) on project rendezvous: Error assembling WAR: Failed to         read filesystem attributes for: /opt/dev1/test/target/test/WEB-INF/web.xml: Failed to retrieve numeric file attributes using: '/bin/sh -c l        s -1nlad /opt/dev1/test/target/test/WEB-INF/web.xml': Error while executing process. Cannot run program "/bin/sh": java.io.IOException: err        or=12, Cannot allocate memory -> [Help 1]

    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1:war (default-war) on proj        ect rendezvous: Error assembling WAR: Failed to read filesystem attributes for: /opt/dev1/test/target/dev1/WEB-INF/web.xml

            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)

            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) 

    Google了一圈没有找到有用的信息,最后请教了Maven的牛人,猜测是JDK引起的。因为我安装的是Open JDK。于是抱着试试看的态度,卸载了Open JDK,然后下载安装了Sun JDK。再运行mvn package -Dmaven.test.skip=true, 真的出现了BUILD SUCCESS。 

    忽然想起以前好像因为Open JDK出现过其他问题,当时就换了Sun的。所以不推荐大家使用OPEN-JDK

  • 相关阅读:
    [程序员代码面试指南]数组和矩阵问题-未排序正数数组中累加和为给定值的最长子数组长度
    [Mysql]知识点
    [SSM项目]一-Eclipse 搭建marven-web项目 hello world!
    [BZOJ2252]矩阵距离(BFS)
    [Spring实战笔记]4面向切面编程的Spring-代理
    [程序员代码面试指南]数组和矩阵问题-找到无序数组中最小的k个数(堆排序)
    [Java]刷题中的Java基础
    MySql的大小写问题
    MySql密码丢失
    MySql的rpm安装
  • 原文地址:https://www.cnblogs.com/hitwtx/p/2244642.html
Copyright © 2011-2022 走看看