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

客官°小女子只卖身不卖艺 2021-09-26 06:36 331阅读 0赞

[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 : or :[:]: -> [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。。。。

发表评论

表情:
评论列表 (有 0 条评论,331人围观)

还没有评论,来说两句吧...

相关阅读