On Wed, Apr 9, 2008 at 6:42 AM, <[EMAIL PROTECTED]> wrote: > >No, because useOrigin is only an hint to the cache > >implementation. Those resources can't be used at their > >original location (after resolve, artifacts must be available > >as files, so only files can't be used from their original > >location). Hence even with useOrigin="true" Ivy will actually > >download and cache the remote resources and use the original > >location of the "local" > >artifacts (local can be actually a network accessible filesystem). > > Xavier, > > Related to your comment above, if we have repositories that are not > local and cannot easily be represented as a filesystem, but also the > content cannot or should not be downloaded and cached as you describe, > what options are there for dealing with that? As I mentioned, we are > interested in using Ivy but our content in many situations is way to > large to have Ivy handle in its normal manner.
If you use the Ivy API rather than Ivy ant tasks, you can disable download of artifacts (with the resolve option you've only found). But the question is what to you want to do with the result. Usually the post resolve operations require to access to artifacts as files, that's why Ivy makes this part of the resolve process. But maybe if we learn more about your use case we may see a benefit of improving Ivy to support it. > > > Is there any way to fake artifacts being available as files? Or prevent > that happening during resolve? Could Ivy be enhanced in any way to > handle this kind of use case? You can fake artifacts if you want, it's pretty easy to generate an empty file or a file containing the actual remote location of the artifact. Once again, it only depends on what you later need to do with your artifacts. > > > Would it be possible to do a custom download via an event hook and then > have Ivy report the files are available? I don't think you need an event hook, you can use a custom resolver for this. The resolver can launch a custom download in a separate thread and report to Ivy core engine that it has done its job. > > When I first started reading about Ivy I made the assumption that > resolve was purely about determining if all the dependencies are > available and where they could be obtained from, but it seems it is a > little more complex than that. Indeed, the resolve process both resolve dependencies and download artifacts to cache. As I said you can disable the download from the API, and then call the download with the API too. But this is not possible using existing tasks, and it would be a big change in Ivy behavior to support this in tasks (eg what happen if you call a post resolve task like cachepath if you disabled artifact download during resolve?). Xavier > > > Thanks for all the assistance! > > paul > -- Xavier Hanin - Independent Java Consultant http://xhab.blogspot.com/ http://ant.apache.org/ivy/ http://www.xoocode.org/
