Idea用maven給springBoot打jar包報錯

1、錯誤描述

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file (default-cli) on project whitelist_savetxt: The parameters 'file' for goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file are missing or invalid -> [Help 1]

[WARNING] 
[WARNING] Some problems were encountered while building the effective settings
[WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</mirror>\n     -->\n\t <mirror>\n\ua0 \ua0 \ua0 <i... @160:9)  @ C:\MyselfApplication\WinSoft\Maven\apache-maven-3.5.0\conf\settings.xml, line 160, column 9
[WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</mirror>\n     -->\n\t <mirror>\n\ua0 \ua0 \ua0 <i... @160:9)  @ C:\MyselfApplication\WinSoft\Maven\apache-maven-3.5.0\conf\settings.xml, line 160, column 9
[WARNING] 
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building whitelist_savetxt 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install-file (default-cli) @ whitelist_savetxt ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.427 s
[INFO] Finished at: 2020-04-09T14:50:58+08:00
[INFO] Final Memory: 13M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file (default-cli) on project whitelist_savetxt: The parameters 'file' for goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file are missing or invalid -> [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/PluginParameterException

2、問題分析

之所以造成上面的錯誤我是使用Plugins下的Install/install:install打的jar包,每次都不成功;

最後使用Lifecycle下面的install就可以打包成功

3、原因

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file (default-cli) on project whitelist_savetxt: The parameters 'file' for goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file are missing or invalid -> [Help 1]
上面錯誤是說找不到插件的包,其實不是找不到這個打包插件,而是自己的項目沒有從maven倉庫里加載這個包到項目裏,
idea中打包maven項目,有兩個install;有時候一直就用Plugins下的install,並不知道Lifecycle中的install,其實lifecycle是maven中一個十分完善的生命週期模型,所以使用Lifecycle中的install項目就會自動去maven倉庫下載需要的包。

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