欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

解决Maven打包时报错"The packaging for this project did not assign a file to the build artifact"

程序员文章站 2022-11-17 17:58:15
今天在IDEA中打包Maven项目安装到本地仓库时报错 Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli) on project api: The packagi ......

 

今天在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

 

 

原因

解决Maven打包时报错"The packaging for this project did not assign a file to the build artifact"

我使用的是plugins中的插件,但我并没有在pom.xml中配置该插件。

 

 

2种解决方式

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

2、改用lifecycle中的方法