2017-09-05 122 views
1

我正在嘗試編寫一個BitBucket請求偵聽器。但是當我嘗試創建一個maven項目時,與它相關的jar沒有被下載。未在maven項目中下載Bitbucket依賴關係

<!-- https://mvnrepository.com/artifact/com.atlassian.bitbucket.server /bitbucket-api --> 

<dependency> 
    <groupId>com.atlassian.bitbucket.server</groupId> 
    <artifactId>bitbucket-api</artifactId> 
    <version>4.0.0-m7</version> 
    <scope>provided</scope> 
</dependency> 

[INFO] ------------------------------------------------------------------------ 
[WARNING] The POM for com.atlassian.bitbucket.server:bitbucket-api:jar:4.0.0-m7 is missing, no dependency information available 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 0.470 s 
[INFO] Finished at: 2017-09-05T13:31:54+05:30 
[INFO] Final Memory: 6M/155M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal on project bitbucketsniffer: Could not resolve dependencies for project com.bitbucketsniffer:bitbucketsniffer:jar:1.0-SNAPSHOT: Failure to find com.atlassian.bitbucket.server:bitbucket-api:jar:4.0.0-m7 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] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 

有沒有辦法,因爲我們做的與Oracle相關性JAR手動安裝的罐子,如果是,那麼將這個工作,如果我試圖創建此項目的可執行的JAR?

回答

0

您還需要定義存儲庫。

所以要把它放到你的pom.xml文件<dependencies>前:

<repositories> 
    <repository> 
     <id>atlassian</id> 
     <url>https://maven.atlassian.com/content/repositories/atlassian-public/</url> 
    </repository> 
</repositories> 

mvnrepository.com僅僅是各種庫的搜索引擎。當您需要包含存儲庫時,它通常會在註釋中給出鏈接。

例子:mvnrepository.com different repository example

+0

有一些編譯依賴關係。但是,當我檢查了/庫它顯示分析,API版本爲3.69.2。但是需要的是4.0.0,如果'analytics-api'甚至是maven倉庫沒有這個版本,我該如何獲得這個版本。 – RahulSingh123321