<distributionManagement> <repository> <id>nexus3</id> <name>Internal Release…
- User
deploy时报错,拉不到快照版本的依赖
[INFO] -------< com.zhiban.staff:staff-manage-framework-starter-redis >-------- [INFO] Building staff-manage-framework-starter-redis 2.0.0-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.836 s [INFO] Finished at: 2024-10-25T15:18:05+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project staff-manage-framework-starter-redis: Could not resolve dependencies for project com.zhiban.staff:staff-manage-framework-starter-redis:jar:2.0.0-SNAPSHOT: Failed to collect dependencies at com.zhiban.staff:staff-manage-framework-common:jar:2.0.0-SNAPSHOT: Failed to read artifact descriptor for com.zhiban.staff:staff-manage-framework-common:jar:2.0.0-SNAPSHOT: The following artifacts could not be resolved: cn.zhiban.staff:staff-manage-cloud:pom:2.0.0-SNAPSHOT (absent): cn.zhiban.staff:staff-manage-cloud:pom:2.0.0-SNAPSHOT was not found in http://8.130.13.240:38081/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of nexus3 has elapsed or updates are forced -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
- Assistant
The error message indicates that Maven is unable to resolve a dependency, specifically the
com.zhiban.staff:staff-manage-framework-common:jar:2.0.0-SNAPSHOTbecause certain artifacts are missing from the repository. Here's a step-by-step guide to troubleshoot and fix this issue: - User
nexus3上可以搜索到com.zhiban.staff:staff-manage-framework-common:jar:2.0.0-SNAPSHOT
- Assistant
- User
用中文,详细解决一下
- Assistant
好的,以下是详细的解决步骤,帮助你解决Maven在构建时拉取不到快照版本依赖的问题。既然你已经在Nexus中找到了对应的包,那么我们需要检查可能导致Maven无法解析该依赖的其他问题。
步骤一:检查Nexus Repository配置
- 验证URL和ID:
- 确保你在
distributionManagement和项目的pom.xml中指定的快照版本库URL和ID是正确的。 - 确保Maven的
settings.xml中的配置与此匹配,尤其是在或中。
- 确保你在
- 验证URL和ID: