0316-Java学习-092-【答疑解惑】Unknown lifecycle phase ".test.skip=true".
一、问题描述:
在 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
欢迎 【 留言 || 关注 || 打赏 】 。您的每一份心意都是对我的鼓励和支持!非常感谢!欢迎互加,相互交流学习!
作者:范丰平,本文链接:https://www.cnblogs.com/fengpingfan/p/16803314.html
Copyright @范丰平 版权所有,如需转载请标明本文原始链接出处,严禁商业用途! 我的个人博客链接地址:http://www.cnblogs.com/fengpingfan