开发者

how to ignore ivy revision number?

开发者 https://www.devze.com 2023-01-01 09:40 出处:网络
I have certain jar files without revision number. But as rev is mandatory attribute for ivy dependency, I am providing the revision attribute. But I have something like (-[revision]) in url resolver.

I have certain jar files without revision number. But as rev is mandatory attribute for ivy dependency, I am providing the revision attribute. But I have something like (-[revision]) in url resolver.

But its taking the module number instead of ignoring the revision attribute. I know it won't ignore the revisio开发者_如何学编程n attribute as its not null.

Following is the output that i get

 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

Can somebody please explain why its taking module.ext as revision where revision I specified is latest.integration and in myrepo,Ii dont have revision attribute.

It just has

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

Can somebody please help me so that I can avoid revision attribute?


In order to ignore the revision and download a ZIP from a Jenkins server, I use a resolver (in ivysettings.xml) like

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

and a dependency (in ivy.xml) like

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

So I'm using + for the revision as latest.release just did not resolve correctly and an empty string (rev="") worked but left the artifact with a trailing dash in the local cache, which I disliked.

Note that I also had to disable checksums in the resolver definition due to a bug in Ivy.


Can you just use "latest.integration" as the revision?

0

精彩评论

暂无评论...
验证码 换一张
取 消