2017-08-29 20 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

沒有在依賴關係中工作。如果不在插件依賴項中,它能夠找到它。不知道現在該做什麼。 –

相關問題