一、问题描述:
在 IDEA 的 “Terminal” 控制台执行如下命令报错:Unknown lifecycle phase ".test.skip=true".
mvn clean package -Dmaven.test.skip=true
错误日志详情输出如下所示:
[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, 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]
错误日志输出截图如下所示:
二、解决方法:
1、在 IDEA 的 Terminal 控制台执行命令时,将扩展参数使用英文单引号
mvn clean package '-Dmaven.test.skip=true'
2、通过命令行控制台运行命令
mvn clean package -Dmaven.test.skip=true
标签:Java,process,Unknown,clean,skip,test,true,lifecycle From: https://www.cnblogs.com/fengpingfan/p/16803314.html