解決Maven打包時報錯"The packaging for this project did not assign a file to the build artifact"


 

今天在IDEA中打包Maven項目安裝到本地倉庫時報錯

Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli) on project api: 
The packaging for this project did not assign a file to the build artifact

 

 

原因

我使用的是Plugins中的插件,但我並沒有在pom.xml中配置該插件。

 

 

2種解決方式

1、在pom.xml中配置該插件,稍微麻煩一些

2、改用Lifecycle中的方法

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM