PowerShell 中使用 mvn 编译报错 Unknown lifecycle phase ".test.skip=true". 解决办法
Posted 左侧码工
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PowerShell 中使用 mvn 编译报错 Unknown lifecycle phase ".test.skip=true". 解决办法相关的知识,希望对你有一定的参考价值。
nknown lifecycle phase “–Dmaven.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, 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]
解决办法:
使用这条命令
$mvnArgs1 ="mvn test -X -Dmaven.test.skip=true".replace(‘-D‘,‘`-D‘)
Invoke-Expression $mvnArgs1
以上是关于PowerShell 中使用 mvn 编译报错 Unknown lifecycle phase ".test.skip=true". 解决办法的主要内容,如果未能解决你的问题,请参考以下文章
mvn 编译报错mavn sun.security.validator.ValidatorException: PKIX path building failed: sun.security.prov
无法在 Microsoft Powershell 中使用“mvn -D”参数运行 Maven,但可以在命令提示符下运行
mvn clean package -Dmaven.test.skip=true 报错:[ERROR] Unknown lifecycle phase “.test.skip=true“.