2010-05-31 30 views
-1

我有一些沒有版本號的jar文件。但由於rev是ivy依賴項的強制屬性,因此我提供了修訂屬性。但我在URL解析器中有類似(-[revision])的內容。
但是它取模塊編號而不是忽略修改屬性。我知道它不會忽略revision屬性,因爲它不爲null。如何忽略常春藤修訂號碼?

以下是輸出,我得到

default-cache: no cached resolved revision for perltools#perltools;latest.integration 
[ivy:retrieve]  tried httP://myrepo/ivyRepository/perltools/jars/[revision]/perltools-[revision].jar 
[ivy:retrieve] listing all in httP://myrepo/ivyRepository/perltools/jars/[revision]/perltools-[revision].jar 
[ivy:retrieve] using privateRepo to list all in httP://myrepo/ivyRepository/perltools/jars/ 
[ivy:retrieve] ApacheURLLister found URL=[httP://myrepo/ivyRepository/perltools/jars/perltools.jar]. 
[ivy:retrieve]  found 1 resources 
[ivy:retrieve] found revs: [perltools.jar] 
[ivy:retrieve] HTTP response status: 404 url=httP://myrepo/ivyRepository/perltools/jars/perltools.jar/perltools-perltools.jar.jar 
[ivy:retrieve] CLIENT ERROR: Not Found url=httP://myrepo/ivyRepository/perltools/jars/perltools.jar/perltools-perltools.jar.jar 

可有人請解釋爲什麼其採取module.ext作爲修訂版本,其中修改我指定是latest.integration和myrepo,II不要有修改屬性。

它只是

[http://myrepo/ivyRepository/perltools/jars//perltools.jar] 

有人可以請幫助我,讓我能避免修改屬性?

+0

您需要提供更多詳細信息。例如,你如何在ivysettings文件中配置你的解析器。 – 2010-05-31 22:21:04

+0

不知道爲什麼你想避免使用修訂版號。常春藤的目的是基於arifact的修訂號執行依賴關係管理:-) – 2010-06-01 17:40:46

回答

0

爲了忽略的修訂,並從詹金斯服務器下載ZIP,我用一個解析器(在ivysettings.xml)像

<url name="jenkins" m2compatible="true" checksums=""> 
    <artifact pattern="http://jenkins:8080/job/[organization]/ws/sources/[module]/*[ext]*/[artifact].[ext]" /> 
</url> 

和依賴關係(在ivy.xml)像

<dependency org="source-build" name="project" rev="+"> 
    <artifact name="project" type="zip" /> 
</dependency> 

所以我使用+作爲修訂版本,因爲latest.release只是沒有正確解析並且空字符串(rev="")能夠正常工作,但在本地緩存中留下了一個尾隨短劃線,我不喜歡它。

請注意,由於bug in Ivy,我還必須禁用解析器定義中的校驗和。

0

你可以使用「latest.integration」作爲修訂嗎?