Maven报错:The packaging for this project did not assign a file to the build artifact

一、问题发生

我想使用IDEA的Maven管理工具将项目安装到本地仓库,于是选择了Plugins下的install:install去执行,如下图所示:

 

 结果出现了如下报错信信息:

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

二、问题解决

方法一:使用Maven管理工具下的LifeCycle(生命周期)中的install,如下图所示 。网上也可以搜到这种解决方法,但是他的说法, “使用Lifecycle中的install,项目就会自动去maven仓库下载需要的包”是错误的。

 

 方法二:使用Maven管理工具 工具栏中的Execute Maven Goal,如下图所示

 

 命令 : mvn verify install:install

 

posted @ 2022-11-30 02:17  张岂逢  阅读(291)  评论(0)    收藏  举报