您的位置:首页 > 编程语言 > Java开发

Eclipse集成Maven打包时报错:Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goa

2017-08-03 20:43 776 查看
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Hello Maven 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.755 s

[INFO] Finished at: 2017-08-03T19:15:28+08:00

[INFO] Final Memory: 39M/142M
[INFO] ------------------------------------------------------------------------
[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> -> [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

使用Eclipse集成Maven后,在Eclipse里打包解决方案如下:

选中项目------>右键----->Run As------>Manven bulid-->填写Name:XXX; Goals:clean package -Dmaven.test.skip=true;User setting:setting文件存放目录------>Run

错误做法是:Goals:mvn clean package -Dmaven.test.skip=true,所以导致报错 Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal in the format。。。。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  maven
相关文章推荐