错误信息:
[ERROR] Failed to execute goal on project comment: Could not resolve dependencies for project com.cgzj:comment:jar:1.0.0: Failed to collect dependencies at com.cgzj:base:jar:1.0.0: Failed to read artifact descriptor for com.cgzj:base:jar:1.0.0: The following artifacts could not be resolved: com.cgzj:kwai:pom:1.0.0 (absent): com.cgzj:kwai:pom:1.0.0 was not found in http://maven.aliyun.com/nexus/content/repositories/central/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of alimaven has elapsed or updates are forced -> [Help 1]
解决办法:
打开本地jar所在目录,打开文件_remote.repositories,在下图位置添加nexus
修改后结果:
貌似是说的本地已经存在,但是还是要去远程看看有没有(最后发现没有,使用本地)
[INFO] Artifact com.cgzj:base:pom:1.0.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [alimaven (http://maven.aliyun.com/nexus/content/repositories/central/, default, releases)]
[INFO] Artifact com.cgzj:base:pom:1.0.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [alimaven (http://maven.aliyun.com/nexus/content/repositories/central/, default, releases)]
[WARNING] The POM for com.cgzj:base:jar:1.0.0 is missing, no dependency information available
刨根问底:为啥加个nexus就可以了?
_REMOTE.REPOSITORIES文件的作用/MAVEN修改SETTING文件后本地仓库缓存了JAR或POM但还是去远程仓库获取