ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Goldstein <Scott.Goldst...@nextlabs.com>
Subject Cache Problems - Need to some answers
Date Mon, 07 Jun 2010 22:21:21 GMT
I've run into a few caching issues today and I was hoping to get some help/answers.  I've debugged
into the code and am looking for the following info:


1.        The default ivy pattern for a cache is "[organisation]/[module](/[branch])/ivy-[revision].xml".
 This causes problems in my environment, as in my dependency element definitions, I don't
specify a branch, but in the info element, I do.  And, in at least one of my repositories,
the branch is not included in the pattern in the resolver.  Therefore, whenever it does a
cache check, it can't find the ivy.xml in the cache, because it's looking in "[organisation]/[module]/ivy-[revision].xml"
but storing it in "[organisation]/[module]/[branch]/ivy-[revision].xml".

My original solution to this is to define a separate cache for resolvers that use the "branch"
in their ivy pattern and another for resolvers that don't.  However, when I look in the source
code at DefaultRepositoryCacheManager, it has a pattern for the ivy data file set to "[organisation]/[module](/[branch])/ivydata-[revision].properties"
and I don't see a way to configure this through ivysettings.xml.  I see the setDataFilePattern()
method, but it doesn't seem to be invoked anywhere.

Questions:  Is my approach the right way to solve this problem?  If so, what is this ivy data
file?  Will my approach work if the two caches end up sharing the same data file (since I
can't change the location)


2.       Two of my repositories represent a promotion mechanism.  The first is a "milestones"
repository that contains betas.  The second is the repository that contains releases.  What
I'd like to do is promote a build from milestone to release and have this be transparent to
the client.  I haven't tried this yet, to be honest, but based on my debugging of the cache
today, it looks like if these two repositories/resolvers share the same cache, this won't
work.  In other words, if a client has a beta 1 in their cache, but I promote beta 2 to the
releases repository, their cache won't be flushed.  Or, more specifically, it looks like the
cache won't be invalidated if the original resolver (milestones) is not the current resolver
(releases).

Question:  Is my theory correct in that a mismatch in resolver will not invalidate a cache?
 If this is true, how do I achieve the use case I'm describing?  Do I need to have a separate
cache completely for these two resolvers?

Thanks for your help!

Scott

- --------------------------------------------------------------------
STATEMENT OF CONFIDENTIALITY
 
The information contained in this electronic message and any attachments to this message are
intended for the exclusive use of the addressee(s) and may contain confidential or privileged
information. No representation is made on its accuracy or completeness of the information
contained in this electronic message. Certain assumptions may have been made in the preparation
of this material as at this date, and are subject to change without notice. If you are not
the intended recipient, you are hereby notified that any dissemination, distribution or copying
of this e-mail and any attachment(s) is strictly prohibited. Please reply to the sender at
NextLabs Inc and destroy all copies of this message and any attachments from your system.
======================================================================
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message