首页 > 其他分享 >Maven报错:The packaging for this project did not assign a file to the build artifact

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

时间:2022-11-30 02:33:46浏览次数:72  
标签:project install packaging 报错 file Maven

一、问题发生

我想使用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

 

标签:project,install,packaging,报错,file,Maven
From: https://www.cnblogs.com/zhangqifeng2021/p/16937266.html

相关文章