jenkins報錯The goal you specified requires a project to execute but there is no POM inthis directory


報錯截圖及詳細:


 

15:30:29[ERROR]The goal you specified requires a project to execute but there is no POM inthis directory (/data/workspace). Please verify you invoked Maven from thecorrect directory. -> [Help 1]

15:30:29[ERROR]

15:30:29[ERROR] Tosee the full stack trace of the errors, re-run Maven with the -e switch.

15:30:29[ERROR]Re-run Maven using the -X switch to enable full debug logging.

15:30:29[ERROR]

15:30:29[ERROR]For more information about the errors and possible solutions, please read thefollowing articles:

 

解決方法:

這里的報錯,分析了下,發現jenkins拉下代碼來編譯,編譯不了,發現就是workspace下面沒有java代碼編譯需要的pom文件,要將代碼路徑切換到有pom文件的地方,才可以mvn  install。

就是在jenkins上build上面--------調用shell,在shell切換編譯路徑


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM