我正在嘗試從 jenkins 運行測驗構建
在所有 16 次測驗成功之后,我收到訊息 BUILD SUCCESS 我收到了這條線
[INFO] Tests run: 16, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:15 min
[INFO] Finished at: 2022-03-20T12:36:01 02:00
[INFO] ------------------------------------------------------------------------
[BE UAT] $ cmd.exe /C '""C:\Program Files\Selenium\apache-maven-3.8.1\bin\mvn.cmd"' mvn compile && exit %%ERRORLEVEL%%"
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------------< Maven:miron >-----------------------------
[INFO] Building miron 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.073 s
[INFO] Finished at: 2022-03-20T12:36:02 02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/LifecyclePhaseNotFoundException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
詹金斯配置
圖片
這是為什么 ?
uj5u.com熱心網友回復:
這是執行的命令:
[BE UAT] $ cmd.exe /C '""C:\Program Files\Selenium\apache-maven-3.8.1\bin\mvn.cmd"' mvn compile && exit %%ERRORLEVEL%%"
如您所見,以作為引數cmd.exe運行。換句話說,你正在運行.mvn.cmdmvn compilemvn mvn compile
編輯:如果您使用帶有“呼叫頂級 Maven 目標”步驟的“經典”自由式作業,則 Maven 目標不應包含mvn. Maven 命令是根據目標(clean、package等)和選項(-DsomeOption=someValue)構建的。在自由式作業中,您可以添加選項作為目標的一部分(在這種情況下,它們應該包含-D前綴),或者單獨作為“高級”下的選項的一部分(在這種情況下,您應該省略-D前綴)。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/445982.html
上一篇:在IDEA中重新加載maven專案:無法找到請求目標的有效認證路徑
下一篇:在OWM-JAPI中獲取天氣
