報錯截圖及詳細:

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切換編譯路徑