Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal

用Eclipse集成的Maven打包项目时按照网上所述输入 mvn clean package遇到

Unknown lifecycle phase "mvn". 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-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


原来是Eclipse已经集成Maven,所以就不需要mvn命令了


在Configuration中输入clean package打包成功

你可能感兴趣的:(Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal)