首页 > 开发程序 > Java > 正文


Jenkins中maven打包项目时错误,提示:Unknown lifecycle phase "mvn"

10-20 10:40:18   来源:shikezhi   评论: 点击:

[ERROR] Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal in the format : or :[:]:.
 [ERROR] Unknown lifecycle phase "mvn". 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
 
原因:构建命令中多了mvn关键字,去掉即可,如:
mvn package -Dmaven.test.skip=true
改成
package -Dmaven.test.skip=true

相关热词搜索:错误 项目

上一篇:Jenkins构建maven项目错误,提示不符合PMD规范 下一篇:最后一页
分享到: 收藏