You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何排查Maven构建中父POM无法解析的权限类错误?

本地Maven构建Nexus权限错误排查问题

执行本地Maven构建时,运行命令 mvn help:effective-settings 出现如下错误:

% mvn help:effective-settings 

[INFO] Scanning for projects...

Downloading: http://example.com/nexus/content/groups/public/org/springframework/boot/spring-boot-starter-parent/2.1.2.RELEASE/spring-boot-starter-parent-2.1.2.RELEASE.pom

[ERROR] [ERROR] Some problems were encountered while processing the POMs:

[FATAL] Non-resolvable parent POM for example.components.discovery:example-app:01-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.2.RELEASE from/to nexus (http://example.com/nexus/content/groups/public): Access denied to: http://example.com/nexus/content/groups/public/org/springframework/boot/spring-boot-starter-parent/2.1.2.RELEASE/spring-boot-starter-parent-2.1.2.RELEASE.pom , ReasonPhrase:Forbidden. and 'parent.relativePath' points at no local POM @ line 12, column 10

@ 

[ERROR] The build could not read 1 project -> [Help 1]

[ERROR]   

[ERROR]   The project example.components.discovery:example-app:01-SNAPSHOT (/Users/me/workspace/example-app/pom.xml) has 1 error

[ERROR]     Non-resolvable parent POM for example.components.discovery:example-app:99.99.99-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.2.RELEASE from/to nexus (http://example.com/nexus/content/groups/public): Access denied to: http://example.com/nexus/content/groups/public/org/springframework/boot/spring-boot-starter-parent/2.1.2.RELEASE/spring-boot-starter-parent-2.1.2.RELEASE.pom , ReasonPhrase:Forbidden. and 'parent.relativePath' points at no local POM @ line 12, column 10 -> [Help 2]

[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/ProjectBuildingException

[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

关键事实

  • 其他包含相同Spring依赖的项目也出现相同错误;
  • 同事执行该项目的Maven构建无此问题;
  • 引入Nexus之前,Maven构建及其他Spring项目均能正常运行;
  • 若settings.xml存在语法错误,会在当前错误后额外提示语法问题,但目前无此类提示;
  • 我的settings.xml结构与能正常构建的同事一致,仅用户凭证不同。

已排除Help1文档中所有可能原因,在Help2文档的6项可能原因中,仅第4项符合当前情况。我们使用工具生成settings.xml,并通过Maven加密密码,但不知如何验证加密密码是否正确,请问是否存在其他可能原因?


内容的提问来源于stack exchange,提问作者Rainbow

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.22 22:27:20