2013-10-06 89 views
2

是否有可能在任何網站/鏈接中獲取列表中給定組ID和版本的所有工件?獲取Maven中給定組和版本的所有工件

我試圖讓使用Maven所有Vaadin依賴和我已經準備好以下信息:

<groupId>com.vaadin</groupId> 
<version>7.1.6</version> 

我現在用的是

mvn dependency:copy-dependencies 

命令來獲得依賴於一個文件夾。

我知道我必須指定通過手中的每個依賴性如

vaadin共享 vaadin服務器等

我只是希望能夠獲得所有這些文物的清單提供一組ID和版本號以上,然後生成各個依賴性條目是這樣的:

<dependency> 
    <groupId>com.vaadin</groupId> 
    <artifactId>vaadin-shared</artifactId> 
    <version>7.1.6</version> 
</dependency> 
<dependency> 
    <groupId>com.vaadin</groupId> 
    <artifactId>vaadin-server</artifactId> 
    <version>7.1.6</version> 
</dependency> 

我已經檢查了這裏的答案: How do I get depend on all artifacts from a group of a version from maven?

看着maven的項目在這裏:

http://mvnrepository.com/artifact/com.vaadin

感謝。

============================================== ==========

更新時間:2013年10月7日

正如羅伯特下面提到的中央資料庫高級搜索(http://search.maven.org/#advancedsearch|gav)幫我,我一直在尋找。 另外,我嘗試了REST API(http://search.maven.org/#api),這也工作得很好。我只是一個步驟就可以編寫Java代碼示例,將使用REST API獲取詳細信息,並將其轉換成我現在可以簡單地複製到我的意圖POM文件:-)

回答

3

search page on Maven Central有一個很好的XML格式一個先進的按鈕,它給你一個頁面,你可以填寫各種東西,例如only the groupId and version

應該有一個REST-API,看看Sonatype Nexus文檔。

+0

非常感謝。看起來很棒。正是我在找什麼。萬分感謝。我也會看看REST API,並試圖找出一個小代碼。真的很感激它。 – Ayusman

+0

甚至REST API的作品。我試圖找出正確的JSON/XML響應,可能我會使用谷歌gson庫。但是,謝謝你的提示。 – Ayusman