使用Intellij Idea导入一个java项目的时候,我遇到了这个失败的错误。
MojoExecutionException The packaging for this project did not assign a file to the build artifactFailed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli) on project getpassword: The packaging for this project did not assign a file to the build artifact相同的项目用sts导入则没问题,所以觉得很奇怪,但是可以定位为配置问题
后来点击了maven中Lifecycle下的install,安装了插件之后,项目正常运行。

在plugin中的clean和install也可以试一下,我这次是先点击了plugin下的clean和install,然后点击Lifecycle下的install,完美解决问题。
本文介绍了一个在使用IntelliJ IDEA导入Java项目时遇到的Maven构建失败问题及其解决方法。错误提示为项目的打包方式未将文件分配给构建工件。通过执行特定的Maven命令,如clean和install,最终成功解决了该问题。
1万+

被折叠的 条评论
为什么被折叠?



