ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Adams <Jim.Ad...@sas.com>
Subject RE: How to specify which resolver to use at resolve time?
Date Tue, 08 Apr 2008 14:41:24 GMT
Seems to me that the issue may be in the term "default resolver". Default implies that there
is an override possible. In this case there is no override possible. Even if you say "use
a property to specify the resolver" this is not really an override. Individual build scripts
will have a hard time overriding. Plus you can't override to a different resolver in the same
build since properties are immutable.

> -----Original Message-----
> From: Xavier Hanin [mailto:xavier.hanin@gmail.com]
> Sent: Friday, March 28, 2008 9:24 AM
> To: ivy-user@ant.apache.org
> Subject: Re: How to specify which resolver to use at resolve time?
>
> 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
View raw message