ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: Creating a custom Ivy resolver
Date Wed, 19 Mar 2008 17:41:31 GMT
On Tue, Mar 18, 2008 at 11:18 PM, <Paul.Mackay@nokia.com> wrote:

> Hi,
>
> I'm interested in using Ivy to create a report of the resolved
> artifacts, but not to actually download the artifacts (in some cases
> they will be very large, in others they simply need to be verified but
> used in-place - either way that will be handled separately).

You can do this via Ivy API, there is an option to ask to resolve without
downloading artifacts.

>
>
> Some of the repository locations are custom in-house tools, etc that
> would require custom resolvers. What are the basic methods that need
> supporting to implement a resolver that simply outputs a list of
> identified artifacts?

A resolver can't simply output a list of artifacts. You have to implement
the full interface. The easiest way is to take inspiration from other
resolvers. Usually URL Resolver or File system resolvers are a good starting
point. Indeed they actually delegate the specific work to a Repository,
which is is much more simple to implement than a DependencyResolver.

>
>
> Also sometimes there would not be any Ivy files to parse. How would it
> be best to get the list of artifacts by parsing the content of a
> directory?

It depends how your artifacts are stored. If you implement your own resolver
you can generate metadata (ModuleDescriptor) from whatever you want, so you
don't actually need to have a file, it can be a directory listing. Have a
look at DefaultModuleDescriptor (the implementation of ModuleDescriptor),
it's not really documented but most things should be pretty obvious,
especially if you look at how it's build by XmlModuleDescriptorParser which
is responsible for Ivy files parsing.

If you have more precise questions with more details on your environment
maybe we could help you further.

Xavier

>
>
> thanks
>
> paul
>
>
>


-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message