有个项目是多模块的,模块A,模块B。模块A和B是同一个父pom下的兄弟模块。模块B依赖模块A,但是模块A又不需要部署到maven仓库。当执行mvn dependency:tree的时候就会报下面的错误:
Could not resolve dependencies for project **moduleA**: The following artifacts could
not be resolved: moduleA: Failure to find **moduleA 1.0.0** in /nexus/content/groups/public/ was
cached in the local repository,resolution will not be reattempted until
the update interval of public has elapsed or updates are forced .
解决方法就是:先在父pom的目录下,执行mvn install。然后在到子目录执行mvn dependency:tree就可以了。