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: why does ivy:install populate the cache?
Date Tue, 03 Jul 2007 15:32:15 GMT
On 7/3/07, Jeffrey Blattman <jeffrey.blattman@gmail.com> wrote:
>
> sorry i think my comment was a little confused. i was in the midst of
> trying to find a way to be able to set a global default for the
> useOrigin attr, for the tasks that use it. anyways ...
>
> if you look at InstallEngine.java, line 139:
>
> /            resolveEngine.downloadArtifacts(report,
> getCacheManager(cache), *false*, artifactFilter);/
>
> it passes a hard coded value of false for useOrigin. that means that
> ivy:install will always populate the cache. this just seems wrong. the
> cache shouldn't be populated when an artifact is being installed, right?


OK, I understand now. Indeed this is a limitation of the install engine,
which doesn't take care of useOrigin. To say that this is "wrong" is not
that obvious. Usually only a repository admin use the install task to
populate a private repository used by developers. In this case populating
the cache of the repository admin is not really a problem. But I agree that
it would be better to avoid using the cache, but it would make it much more
difficult to implement: right now the install task is a resolve followed by
a publish, that's simple. Using the cache to transition between the source
and destination is much simpler. But you can create a JIRA issue if you
think this is a problem.

regardless, this doesn't solve the larger problem for me. trying to
> implement a settable global default for useOrigin proved to be more
> challenging than i thought.


Maybe this should be done at the Ant tasks level. Indeed, the default value
for useOrigin in the related Ant tasks (like Resolve, Retrieve, ...) is hard
coded to be "false". But replacing this by something depending on the value
of a variable is pretty easy (see any of the attribute documented as
"defaults to ${...}"). Then you could set the default value of useOrigin in
only one Ivy variable, as long as you use Ant.

Xavier

Xavier Hanin wrote:
> > On 7/2/07, Jeffrey Blattman <jeffrey.blattman@gmail.com> wrote:
> >>
> >> this was unexpected. i was exploring ways to modify the code to be able
> >> to set a default value for /useOrigin/, and found out that my use of
> >> /ivy:install/ was populating it anyway.
> >
> >
> >
> > i can see where it might do this as a shortcut w/ the expectation that
> >> if it's installed into a repo then it's going to be accessed, but it
> >> doesn't seem to fit with the definition of install ... ?
> >
> >
> > Could you give more details, I'm not sure to understand what you mean by
> > populating useOrigin in install?
> >
> > Xavier
> >
> > or am i missing something?
> >>
> >> thanks.
> >>
> >
> >
> >
>



-- 
Xavier Hanin - Independent Java Consultant
Creator of Ivy, xooki and xoocode.org
More about me: http://xhab.blogspot.com/

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