1、提示
[ERROR] Failed to execute goal on project test-domain: Could not resolve dependencies for project com.star.test:test-domain:jar:1.1-SNAPSHOT: Failure to find com.star.test:test-dao:jar:1.1-SNAPSHOT in http://artifactory.xx.com/libs-snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced -> [Help 1]
错误解析:mvn dependency:tree这个命令会先执行编译,在执行test-domain模块编译的时候找回到test-dao:jar:1.1-SNAPSHOT 这个jar,导致编译失败。
解决方案:上面问题一般都是因为没有本地编译和安装导致的,但是有有可能本地启动时ok的,真实本地编译都是ok的,就是在执行mvn dependency:tree命令的时候找不到其他子模块的依赖。这个时候只需要执行 mvn clean install -Dmaven.test.skip=true 这个命令,然后再执行mvn dependency:tree 命令即可