打jar包出现错误: The packaging for this project did not assign a file to the build artifact -> [Help 1]

今天打包遇到的这个问题,我使用打包的方式是:如图:
打jar包出现错误: The packaging for this project did not assign a file to the build artifact -> [Help 1]使用的为plugins下面的打包方式,这样的话会出现这个错误,因为plugins打包,它会在maven仓库去找我们的项目,找不到就会报这个错。
解决办法:
使用如图打包:
打jar包出现错误: The packaging for this project did not assign a file to the build artifact -> [Help 1]用Lifecycle这个方式打包。就可以解决上面的那个问题了。