我試圖從命令行構建我們的Web項目,但跳過了測試。我正在使用命令mvn clean install -Dmaven.test.skip=true
。無法在Microsoft Powershell中使用`mvn -D`參數運行Maven,但在命令提示符下運行
當我運行從傳統的黑色&白命令提示符(又名DOS Shell)命令的作品,但命令時,我從「Windows PowerShell中」我收到以下錯誤的命令運行它:
[ERROR] Unknown lifecycle phase ".test.skip=true". 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, prepar e-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, po st-clean. -> [Help 1]
什麼導致了這種差異,我如何讓PowerShell的行爲像傳統的命令提示符?
這是在Windows 7
哇,* GREAT *答案,希望我能投上一票兩次 – ArtB 2011-06-15 13:41:04
恰好碰到了這是有關於「=」和分裂參數有什麼可能的原因看起來十分愚蠢的。「」? – Grod 2012-10-04 21:03:09
好的答案。任何想法爲什麼PowerShell分裂-Dmaven.test.skip = true在第一階段,但不是後續那些? – Fopedush 2012-10-25 17:00:28