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: How to specify which resolver to use at resolve time?
Date Fri, 28 Mar 2008 13:24:27 GMT
On Fri, Mar 28, 2008 at 1:54 PM, Brown, Carlton <
Carlton.Brown@compucredit.com> wrote:

> > -----Original Message-----
> > From: Xavier Hanin [mailto:xavier.hanin@gmail.com]
> > Sent: Friday, March 28, 2008 4:16 AM
> > To: ivy-user@ant.apache.org
> > Subject: Re: How to specify which resolver to use at resolve time?
> >
> > On Thu, Mar 27, 2008 at 8:34 PM, Brown, Carlton <
> > Carlton.Brown@compucredit.com> wrote:
> >
> > > The publish and install tasks allow me to specify which
> > resolver to use
> > > for publishing (or installing).   I don't see this
> > capability for the
> > > resolve task, however.   Have I missed something?  If it
> > isn't possible
> > > to specify a resolver for the resolve task, that means I
> > have to rely on
> > > defaultResolver in ivy-settings.xml ?   Is there no way to
> > control this
> > > from within the Ant script, or must I maintain multiple copies of
> > > ivy-settings.xml just to choose which resolver to use?
> >
> > You can either maintain multiple copies (which maybe only
> > select the default resolver and include the same common
> > settings file) or use a property to indicate which resolver
> > is the default one. I think this is flexible enough so we
> > don't have to add yet another option on resolve. WDYT?
>
> That is the workaround I have converged on (using a property for the
> default resolver).  It works for me, but it still seems non-intuitive...
> If you can specify an attribute differently each time you call resolve,
> then it isn't exactly 'default' anymore.   Long term, I really think the
> resolve task should have the resolver attribute just as the publish task
> does.


I think switching settings is a good option, not a workaround. What's the
use case behind selecting the resolver used? Is it to use Ivy in different
environments (like from home/from office)? Is is to to use different
repositories depending on the status? Something else? These use cases are
IMO well covered by settings switching: one settings for each environment
really make sense, and with settings inclusion and properties, you can avoid
almost any file data duplication.

But user feedback if supporting a resolver attribute on the resolve task is
the way to go in the long term.

Xavier


>
>
> -----------------------------------------
> ====================================================
> This message contains PRIVILEGED and CONFIDENTIAL
> information that is intended only for use by the
> named recipient. If you are not the named recipient,
> any disclosure, dissemination, or action based on
> the contents of this message is prohibited. In such
> case please notify us and destroy and delete all
> copies of this transmission.  Thank you.
> ====================================================
>



-- 
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