maven中clean然后install报错

Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli) on project cloud-api-commons: The packaging for this project did not assign a file to the build artifact

未能在项目云api commons上执行目标org.apache.maven.plugins:maven安装插件:2.4:install(默认cli):此项目的打包未将文件分配给生成工件

我们一定要有强大的排错和解决问题的能力,这个问题一直困扰了我两天,就是说怎么也解决不了的,于是我又在网上查了很久,终于发现问题出在没有install上面,于是我又根据在父工程当中添加

<groupId>org.examplegroupId>
    <artifactId>mcroserviceartifactId>
    <packaging>pompackaging>
    <version>1.0-SNAPSHOTversion>

这里面就是在packaging当中添加相应的pom,然后在子工程当中添加的是对应的war字段

<parent>
    <artifactId>mcroserviceartifactId>
    <groupId>org.examplegroupId>
    <version>1.0-SNAPSHOTversion>
parent>
<packaging>pompackaging>
<modelVersion>4.0.0modelVersion>
也就是说在子项目中,加入<packaging>pompackaging>

你可能感兴趣的:(maven,java,前端)