Doctoolchain Docker容器拉取依赖失败,无法发布至Confluence
企业内部部署docToolchain发布至Confluence时依赖解析失败
环境与验证情况
- 基于包含pandoc的Docker镜像构建部署环境,已添加企业所需证书
- 执行Confluence连接验证命令成功:
./dtcw docker image doctoolchain verifyConfluenceApiAccess -PconfluenceBearerToken=*** -PinputPath=src/main/asciidoc -PmainConfigFile=config/docToolchain.groovy
发布命令执行异常
执行以下发布命令时出现依赖解析失败:
sudo ./dtcw docker image doctoolchain-core publishToConfluence -PconfluenceBearerToken=*** -PmavenRepository=https://nexus.company/nexus -PinputPath=src/main/asciidoc -PmainConfigFile=config/docToolchain.groovy
异常详情
* Where: Build file '/home/dtcuser/docToolchain/build.gradle' line: 98 * What went wrong: A problem occurred evaluating root project 'docToolchain'. > Could not resolve all files for configuration 'classpath'. > Could not find org.asciidoctor:asciidoctor-gradle-jvm:4.0.0-alpha.1. Searched in the following locations: - https://nexus.company/nexus/org/asciidoctor/asciidoctor-gradle-jvm/4.0.0-alpha.1/asciidoctor-gradle-jvm-4.0.0-alpha.1.pom If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration. Required by: unspecified:unspecified:unspecified > Could not find org.asciidoctor:asciidoctor-gradle-jvm-pdf:4.0.0-alpha.1. Searched in the following locations: - https://nexus.company/nexus/org/asciidoctor/asciidoctor-gradle-jvm-pdf/4.0.0-alpha.1/asciidoctor-gradle-jvm-pdf-4.0.0-alpha.1.pom If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration. Required by: unspecified:unspecified:unspecified > Could not find org.asciidoctor:asciidoctor-gradle-jvm-gems:4.0.0-alpha.1. Searched in the following locations: - https://nexus.company/nexus/org/asciidoctor/asciidoctor-gradle-jvm-gems/4.0.0-alpha.1/asciidoctor-gradle-jvm-gems-4.0.0-alpha.1.pom If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration. Required by: unspecified:unspecified:unspecified > Could not find org.asciidoctor:asciidoctor-gradle-jvm-slides:4.0.0-alpha.1. Searched in the following locations: - https://nexus.company/nexus/org/asciidoctor/asciidoctor-gradle-jvm-slides/4.0.0-alpha.1/asciidoctor-gradle-jvm-slides-4.0.0-alpha.1.pom If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration. Required by: unspecified:unspecified:unspecified
补充测试结果
- 非企业环境中,生成HTML页面(依赖与发布命令一致)可正常执行
- 编写小型Gradle构建文件单独下载上述依赖时,触发401认证错误
企业环境背景
企业Nexus通常作为Maven制品代理使用,但本次无法获取目标依赖;IT部门反馈Xillio Artifactory需要登录,该情况与本地测试出现的401错误匹配。
内容的提问来源于stack exchange,提问作者DanielS
相关产品推荐
相关产品推荐

