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 RE: Need help debugging a caching problem
Date Tue, 20 Apr 2010 21:27:10 GMT
If anyone else runs into this, I solved it be making sure the revision is somewhere in my ivy
file pattern for the resolver.  I didn't go into detail why this is the case, but I did see
that the cache invalidation algorithm treats the module differently when this revision is
there.

Scott

From: Scott Goldstein
Sent: Tuesday, April 13, 2010 3:59 PM
To: 'ivy-user@ant.apache.org'
Subject: Need help debugging a caching problem

I've been stepping through the code a bit, but could use some helping trying to solve a caching
problem in my setup.

The details are that I have a file system repository set up for submodules within a particular
build.  When built, the submodules are published to this file system repository and then used
by other submodules in the build.  This file system repository is unique to each revision/branch
of the product.

The problem occurs when switching branches.  First, I compile Branch A.  Then, I move to Branch
B and it mistakenly picks up submodules from Branch A.

I've set up the repository to have checkModified="true" and changingPattern=".*".

When I debug through the code, it looks like it tries to download the dependency into the
cache using DefaultRepositoryCacheManager.cacheModuleDescriptor(..).  Within this method,
it calls "doFindModuleInCache" to see if the module is already in the cache and needs to evict
it and install the latest version from the source.  It does this, by looking for the ivy.xml
file in the cache and comparing the publication date.  The ivy file it looks for is:

...\cache\organization\module\ivy-working@build-repository.xml

But, the only ivy files in the cache are:

...\cache\organization\module\ivy-working@build-repository.xml.original
...\cache\organization\module\ivy-2.0.xml

So, it never finds them in the cache and, therefore, never evicts the old artifacts.

Can anyone point to what might be causing this?  Or, where I might debug further?

Thanks.

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