mvn clean package -Dmaven.test.skip=true 报错:[ERROR] Unknown lifecycle phase “.test.skip=true“.

简介: mvn clean package -Dmaven.test.skip=true 报错:[ERROR] Unknown lifecycle phase “.test.skip=true“.

错误


PowerShell 运行 mvn命令不成功



[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]
[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


元婴


而 PowerShell 窗口下,执行带参数的需要’单引号’包起来才可以


解决


方法一


命令改为:


mvn clean install package '-Dmaven.test.skip=true'


方法二


不要使用PowerShell命令行模式,使用 cmd 进入命令行执行:


mvn clean install package -Dmaven.test.skip=true
相关文章
Failed to execute goal maven-resources-plugin:3.2.0:resources Input length = 1 -> [Help 1]
Failed to execute goal maven-resources-plugin:3.2.0:resources Input length = 1 -> [Help 1]
125 0
The project com.xx.xx has 1 error [ERROR] Non-resolvable parent POM: Could not find artifact co
The project com.xx.xx has 1 error [ERROR] Non-resolvable parent POM: Could not find artifact co
|
Java Maven
Error running ‘ssm [clean]‘: No valid Maven installation found. Either set the home directory in the
Error running ‘ssm [clean]‘: No valid Maven installation found. Either set the home directory in the
140 0
|
Java Maven 微服务
To see the full stack trace of the errors, re-run Maven with the -e switch.
问题描述 微服务项目中其它模块不能依赖common模块中的依赖 而common中是有依赖的
951 1
To see the full stack trace of the errors, re-run Maven with the -e switch.
|
jenkins 持续交付
问题记录:jenkins构建时报错The goal you specified requires a project to execute but there is no POM in...
问题记录:jenkins构建时报错The goal you specified requires a project to execute but there is no POM in...
1232 0
问题记录:jenkins构建时报错The goal you specified requires a project to execute but there is no POM in...
|
资源调度 JavaScript 前端开发
yarn打包报错:error during build: Error: Assigning to rvalue (Note that you need plugins to import files
yarn打包报错:error during build: Error: Assigning to rvalue (Note that you need plugins to import files
438 7
C compiler test failed.
C compiler test failed.
178 0
|
JavaScript 前端开发
【build your own xxx】实现你自己的call和apply
【build your own xxx】实现你自己的call和apply
【build your own xxx】实现你自己的call和apply
|
Java Maven
[ERROR] Failed to execute goal on project springcloud: Could not resolve dependencies for project co
[ERROR] Failed to execute goal on project springcloud: Could not resolve dependencies for project co
780 0
[ERROR] Failed to execute goal on project springcloud: Could not resolve dependencies for project co
|
Java 应用服务中间件 Maven
Maven - Failed to clean project: Failed to delete
Maven - Failed to clean project: Failed to delete
513 0
Maven - Failed to clean project: Failed to delete