首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spring Asciidoctor扩展不在正确的库中?

Spring Asciidoctor扩展不在正确的库中?
EN

Stack Overflow用户
提问于 2017-08-30 03:34:05
回答 2查看 409关注 0票数 2

大家下午好,

我一直在尝试让spring-asciidoctor-extensions与我的文档一起工作,但由于某些原因,maven找不到依赖项。

在我尝试构建之后得到的错误:

代码语言:javascript
复制
Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:1.5.5:process-asciidoc (generate-docs) on project organization: Execution generate-docs of goal org.asciidoctor:asciidoctor-maven-plugin:1.5.5:process-asciidoc failed: Plugin org.asciidoctor:asciidoctor-maven-plugin:1.5.5 or one of its dependencies could not be resolved: Failure to find io.spring.asciidoctor:spring-asciidoctor-extensions:jar:0.1.1.RELEASE in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

我检查了他们的GitHub,并查看了一下,发现maven存储库中没有任何内容(很明显是错误造成的),而在这个question中,发现存储库在https://repo.spring.io/release中。有没有办法直接引用对repo的依赖关系?如果没有,我能做什么?

EN

回答 2

Stack Overflow用户

发布于 2017-08-30 15:22:24

您可以将repo.spring.io存储库添加到pom.xml中。

代码语言:javascript
复制
<repositories>
    <repository>
        <id>spring-repo</id>
        <url>https://repo.spring.io/release</url>
    </repository>
</repositories>

声明就绪后,您将能够解决此依赖关系:

代码语言:javascript
复制
    <dependency>
        <groupId>io.spring.asciidoctor</groupId>
        <artifactId>spring-asciidoctor-extensions</artifactId>
        <version>0.1.1.RELEASE</version>
    </dependency>

更多详细信息,请访问the docs

注意:无法显式地将此依赖项与该存储库相关联。Maven按照它们的声明顺序遍历存储库,直到一个给定的依赖项被解析(或者没有解析),但是,如果您的所有其他依赖项都是从Maven Central解析的,那么剩下的从repo.spring.io解析的惟一依赖项就是spring-asciidoctor-extensions

票数 2
EN

Stack Overflow用户

发布于 2019-12-04 00:48:56

我也遇到了这个问题。一开始我的误解是,我期望从repositories部分解决dependencies。然而,事实证明它相当于pluginRepositories部分。如下所示:

代码语言:javascript
复制
<pluginRepositories>
    <pluginRepository>
        <id>spring-repo</id>
        <url>https://repo.spring.io/release</url>
    </pluginRepository>
</pluginRepositories>
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45947043

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档