The goal you specified requires a project to execute but there is no POM in this directory


報錯信息如下:

[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/data/jenkins/workspace/project). 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

報錯原因:

當前目錄下沒有pom.xml 文件。

解決辦法如下:

1 jenkins該工程配置,“Build配置”加入執行shell腳本進入project目錄:

cd project

2 “調用頂層Maven目標”配置里指明pom.xml文件位置:


免責聲明!

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



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