mvn archetype:create-from-project報錯,Invoker process ended with result different than 0!

mvn archetype:create-from-project報錯,Invoker process ended with result different than 0!

從現有項目構建工程模板,執行命令 mvn archetype:create-from-project 報錯

[ERROR] The specified user settings file does not exist: /Users/haiyoung/.m2/settings.xml
... ...
Invoker process ended with result different than 0! 

[ERROR] Error executing Maven.
[ERROR] The specified user settings file does not exist: /Users/haiyoung/.m2/settings.xml
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for xxx 1.0-SNAPSHOT:
[INFO] ...... ......
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  16.219 s
[INFO] Finished at: 2020-02-18T16:57:28+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:create-from-project (default-cli) on project xxx: Invoker process ended with result different than 0! -> [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/MojoFailureException

該問題是由於用戶的.m2目錄下缺少maven的配置文件,添加該配置文件後,命令正常執行。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章