ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Carlton" <Carlton.Br...@compucredit.com>
Subject RE: How to specify which resolver to use at resolve time?
Date Fri, 28 Mar 2008 13:38:56 GMT
> -----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.

It's really a design preference to me... The use cases are all covered,
but they all add unnecessary complexity for the user (maintaining
multiple ivy-settings.xml files with pointers back to the 'main' one).
It's very convenient that the publish task does not require this
complexity.  From a user standpoint, it's the simplest thing that works.
From a design and documentation standpoint, I would think it is
desirable for similar tasks to work in similar ways.  But as you said,
the use cases are covered (even if they are complexity-adding
workarounds, IMO).

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

Mime
View raw message