您的位置:首页 > Web前端

错误LifecyclePhaseNotFoundException,Unknown lifecycle phase "mvn". You must specify a valid lifecycle

2018-03-13 13:35 1851 查看
Unknown lifecycle phase “”. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. 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-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [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原因1:
使用Eclipse Maven插件[Run As]-[Maven build]时并未为其指定goal或phase 
解决方法: 
在pom.xml中找到 
<build>
 节点,在里面加上
<defaultGoal>compile</defaultGoal>
即可原因2: 
使用Eclipse Maven插件[Run As]-[Maven build]时多输入了mvn命令 
,因为Eclipse Maven插件已经帮你加上了mvn的命令前缀,再手动输出mvn clean install之类的 命令就会变成mvn mvn clean install
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  maven
相关文章推荐