zoukankan      html  css  js  c++  java
  • shell 脚本执行mvn clean install 报错 --MissingProjectException

    12月12日北京OSC源创会 —— 开源技术的年终盛典 »  

    [INFO] Scanning for projects... 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] BUILD FAILURE 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] Total time: 0.324s 
    [INFO] Finished at: Tue Jun 11 11:02:07 CST 2013 
    [INFO] Final Memory: 2M/59M 
    [INFO] ------------------------------------------------------------------------ 
    [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/root). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException 

    我在shell里面写入cd 到我的mvn工程下,然后进行编译打包,结果执行错误,但是我在另一个脚本里面执行是没有问题的

     
    解决办法:
     
    Shell 里面使用 cd 是没有用处的。建议你在 bash 中使用
    mvn -f $YOUR_PROJECT_DIR/pom.xml clean install

    或者继续在 bash 中使用 cd,然后这样执行(记住前面还有个点)

    . ./your_shell_script_file.sh
     
  • 相关阅读:
    对类对象使用new时地址分配的情况
    c++堆与栈的简单认识
    多态公有继承
    Cookie & Session & JSP入门
    Response & ServletContext
    Java网络编程篇文章阅读顺序
    URL编程
    UDP网络编程
    TCP网络编程
    InetAddress类的使用
  • 原文地址:https://www.cnblogs.com/xindong/p/4971061.html
Copyright © 2011-2022 走看看