[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
[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