大家下午好,
我一直在尝试让 spring-asciidoctor-extensions 与我的文档一起使用,但由于某种原因,maven 找不到依赖项。
我尝试构建后遇到的错误:
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.spring.io
存储库添加到 pom.xml
中。
<repositories>
<repository>
<id>spring-repo</id>
<url>https://repo.spring.io/release</url>
</repository>
</repositories>
有了该声明,您将能够解决此依赖性:
<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.iorepo.spring.io
将是 spring-asciidoctor-extensions
。
关于maven - Spring Asciidoctor 扩展不在正确的存储库中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45947043/