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
目录
打赏
0
0
0
0
40
分享
相关文章
|
8月前
|
Maven运行builder出现Failed to execute goal on projectXXXXX错误
Maven运行builder出现Failed to execute goal on projectXXXXX错误
204 7
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]
133 0
“Could not determine which ”make“ command to run. Check the ”make“ step in the build configuration.”
“Could not determine which ”make“ command to run. Check the ”make“ step in the build configuration.”
124 0
Error:Execution failed for task ‘:app:preDebugAndroidTestBuild’. Conflict with dependency ‘com.andr
Error:Execution failed for task ‘:app:preDebugAndroidTestBuild’. Conflict with dependency ‘com.andr
43 1
No change to package.json was detected. No package manager install will be executed.怎么解决
这个提示是由于没有对 package.json 文件进行更改所导致的,因此无需运行包管理器的安装。
463 0
To see the full stack trace of the errors, re-run Maven with the -e switch.
问题描述 微服务项目中其它模块不能依赖common模块中的依赖 而common中是有依赖的
998 1
To see the full stack trace of the errors, re-run Maven with the -e switch.
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
153 0
Error:Could not download ecj.jar : No cached version available for offline mode
Error:Could not download ecj.jar : No cached version available for offline mode
280 0
Error:Could not download ecj.jar : No cached version available for offline mode
Execution failed for task :Test:lintVitalRelease/Lint found fatal errors while assembling a release
Execution failed for task :Test:lintVitalRelease/Lint found fatal errors while assembling a release
131 0
C compiler test failed.
C compiler test failed.
197 0

热门文章

最新文章