项目结构(父项目包含多个子项目):

easyreport-common项目和easyreport-support项目都是easyreport 的子项目,其中easyreport-common项目 依赖easyreport-support项目。在easyreport-support中执行完clean和install之后,本地仓库也存在依赖,但是在easyreport-common中进行install就会出现:
Failed to execute goal on project ...: Could not resolve dependencies for project ...
最后发现原来是自己没有首先对父项目也就是easyreport 项目进行clean和install 。
总结:在父项目下有的子项目在首次运行clean 和install前应该先运行父项目的clean和install
在多模块项目中,正确构建父项目与子项目至关重要。本文通过实例解析,揭示了在Maven环境下,子项目依赖解决失败的问题根源,并强调了在进行子项目构建前,应先完成父项目的clean和install过程。

1630

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



