2017-08-29 63 views
1

下午好,春季Asciidoctor扩展不正确的回购?

我一直在试图让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] 

我检查thier GitHub,并环顾四周发现,那里有在Maven回购没有(从错误很明显),并在此question发现,回购在https://repo.spring.io/release。有没有办法直接引用依赖到回购?如果不是我能做什么?

回答

1

您可以将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.io解决的唯一依赖项将为spring-asciidoctor-extensions

+0

没有在依赖关系中工作。如果不在插件依赖项中,它能够找到它。不知道现在该做什么。 –