maven 多模块项目打包遇到的坑
用eclipse建立了一个多模块的maven项目,项目结构如下
web模块中引入了service模块依赖。
要对child-web模块打包的时候出现了异常:
关键的错误信息是:
Failed to execute goal on project child-web: Could not resolve dependencies for project com.czx:child-
web1.0: Failure to find com.czx
jar:1.0 in https://repo.maven.apache.org/maven2 was cached
in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
初步猜测出是缺少了service模块的jar包。
于是我将service模块的jar包添加到本地仓库,再次将web模块打包,依然报出这个错误
从网上找了几个解决方案试了下,最后可行的方法:
把parent工程,也就是package是pom的那个工程先install一下
还没有评论,来说两句吧...