-----Original Message-----
From: Saksa, Steven (NIH/NCI) [C] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 13, 2008 1:49 PM
To: [email protected]
Subject: When I update an ivy file in my repository ivy uses the
version
from cache.
To whom it may concern,
I am fairly new to IVY also I am a System Administrator not a
developer. Any way we setup a repository and were constantly editing
IVY configs and thus had some issues with cache not getting updated.
To work around the issue so we were just cleaning the cache with every
build to ensure that we got what we wanted. Anyway the repository is
fairly stable now and I have time to look into the cache issues. I
have
included most of my configurations and observations below. Here is
the
general flow.
* Using Ivy 2.0.0-beta2
* Update ivy.xml file to include new dependency
* Generate new .md5 and .sha1 files
* Commit the file (resolved via url from svn)
* Run ant target to retreive the files
* Resolve does not download the new depenency
* Check of cache directory shows that the bda-utils ivy.xml file is
not updated
* After much research added ivy.resolver.default.check.modified
property to try and circumvent cache
* This resulted in not using the file from the site just using
version
from cache again
Anyone have any ideas?
Thanks, Steve Saksa
ANT LOG
[EMAIL PROTECTED] bda]$ ant -f test-bda-utils.xml
test:compare-properties
Buildfile: test-bda-utils.xml
retrieve-bda:
[get] Getting:
http://gforge.nci.nih.gov/svnroot/commonlibrary/trunk/ivy-repo/apache/iv
y/2.0.0-beta2/ivy-2.0.0-beta2.jar
[get] To: /data/src/trunk/automation/bda/lib/ivy-2.0.0-beta2.jar
[get] Getting:
http://gforge.nci.nih.gov/svnroot/commonlibrary/trunk/ivy-repo/apache/iv
y-core/2.0.0-beta2/ivy-core-2.0.0-beta2.jar
[get] To:
/data/src/trunk/automation/bda/lib/ivy-core-2.0.0-beta2.jar
[ivy:settings] :: Ivy 2.0.0-beta2 - 20080225093827 ::
http://ant.apache.org/ivy/ ::
[ivy:settings] :: loading settings :: file =
/data/src/trunk/automation/bda/ivy/ivy-bda-settings.xml
[ivy:resolve] :: resolving dependencies ::
ncicb#bda-download;[EMAIL PROTECTED]
[ivy:resolve] confs: [runtime]
[ivy:resolve] found ncicb#bda-utils;1.0 in ncicb-ivy-repo
[ivy:resolve] found javax.activation#activation;1.0.2 in
ncicb-ivy-repo
[ivy:resolve] found apache#antunit;1.0 in ncicb-ivy-repo
[ivy:resolve] found apache#ant-contrib;1.0b3 in ncicb-ivy-repo
[ivy:resolve] found jakarta#bcel;5.1 in ncicb-ivy-repo
[ivy:resolve] found ncicb#clm;3.2 in ncicb-ivy-repo
[ivy:resolve] found jakarta#commons-httpclient;3.0.1 in ncicb-ivy-
repo
[ivy:resolve] found jakarta#commons-logging;1.0.4 in ncicb-ivy-repo
[ivy:resolve] found dbconfig#dbconfig;0.1.8 in ncicb-ivy-repo
[ivy:resolve] found apache#ivy;1.3.1 in ncicb-ivy-repo
[ivy:resolve] found jaxen#jaxen-core;1.0 in ncicb-ivy-repo
[ivy:resolve] found jaxen#jaxen-jdom;1.0 in ncicb-ivy-repo
[ivy:resolve] found jaxen#saxpath;1.0 in ncicb-ivy-repo
[ivy:resolve] found oracle#ojdbc14;10.2.0.3.0 in ncicb-ivy-repo
[ivy:resolve] found mysql#mysql-connector-java;5.0.5 in ncicb-ivy-
repo
[ivy:resolve] found org.jdom#jdom;1.1 in ncicb-ivy-repo
[ivy:resolve] found javax.mail#mail;1.3 in ncicb-ivy-repo
[ivy:resolve] found jcraft#jsch;0.1.34 in ncicb-ivy-repo
[ivy:resolve] found org.tigris#antelope_app;3.4.1 in ncicb-ivy-repo
[ivy:resolve] found org.tigris#AntelopeApp;3.4.1 in ncicb-ivy-repo
[ivy:resolve] found org.tigris#svnant;1.0 in ncicb-ivy-repo
[ivy:resolve] found org.tigris#svnClientAdapter;1.0 in ncicb-ivy-
repo
[ivy:resolve] found org.tigris#svnjavahl;1.0 in ncicb-ivy-repo
[ivy:resolve] found xmlconfig#xmlconfig;0.1.9 in ncicb-ivy-repo
[ivy:resolve] found ncicb#ncicb-ant;1.0 in ncicb-ivy-repo
[ivy:resolve] found redhillconsulting#simian;2.2.24 in ncicb-ivy-
repo
[ivy:resolve] found ggtools#grand;1.8 in ncicb-ivy-repo
[ivy:resolve] :: resolution report :: resolve 1250ms :: artifacts dl
27ms
---------------------------------------------------------------------
| | modules ||
artifacts |
| conf | number| search|dwnlded|evicted||
number|dwnlded|
---------------------------------------------------------------------
| runtime | 27 | 27 | 0 | 0 || 28 |
0 |
---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: ncicb#bda-download
[ivy:retrieve] confs: [runtime]
[ivy:retrieve] 0 artifacts copied, 28 already retrieved (0kB/32ms)
[unzip] Expanding:
/data/src/trunk/automation/bda/bda-utils/bda-build-utils-1.0.zip into
/data/src/trunk/automation/bda/bda-utils
test:compare-properties:
[propertyvalidator] Excess key(s) in environment file
sample.properties:
- joe
BUILD SUCCESSFUL
Total time: 3 seconds
[EMAIL PROTECTED] bda]$
ANT DEBUG ON ivy.resolver.default.check.modified
[ivy:resolve] == resolving dependencies for
ncicb#bda-download;[EMAIL PROTECTED] [runtime]
[ivy:resolve] == resolving dependencies
ncicb#bda-download;[EMAIL PROTECTED]>ncicb#bda-utils;1.0
[runtime->runtime]
[ivy:resolve] ncicb-chain: Checking cache for: dependency:
ncicb#bda-utils;1.0 {runtime=[runtime]}
[ivy:resolve] don't use cache for ncicb#bda-utils;1.0:
checkModified=true
[ivy:resolve] don't use cache for ncicb#bda-utils;1.0:
checkModified=true
[ivy:resolve] tried
http://url/ivy-repo/ncicb/bda-utils/1.0/ivy.xml
[ivy:resolve] ncicb-ivy-repo: found md file for ncicb#bda-utils;1.0
[ivy:resolve] =>
http://url/ivy-repo/ncicb/bda-utils/1.0/ivy.xml (1.0)
[ivy:resolve] default-cache: revision in cache (not updated):
ncicb#bda-utils;1.0
[ivy:resolve] found ncicb#bda-utils;1.0 in ncicb-ivy-repo
[ivy:resolve] == resolving dependencies
ncicb#bda-utils;1.0->javax.activation#activation;1.0.2 [runtime-
>master]
[ivy:resolve] ncicb-chain: Checking cache for: dependency:
javax.activation#activation;1.0.2 {runtime=[master]}
RELEVANT ANT SNIPPET
<property name="ivy.dep.file" value="ivy-bda.xml"/>
<property name="ivy.resolver.default.check.modified" value="true"/>
<ivy:settings file="ivy-bda-settings.xml" />
<ivy:resolve refresh="true" conf="runtime"/>
<ivy:retrieve pattern="${bda-utils.dir}/[artifact]-[revision].[ext]"
conf="runtime"/>
SETTINGS FILE
<ivysettings>
<settings defaultResolver="ncicb-chain" />
<caches defaultCacheDir="${user.home}/.ivy2-$
{ant.project.name}"
useOrigin="true"/>
<resolvers>
<!-- this is where you read from -->
<chain name="ncicb-chain">
<url name="ncicb-ivy-repo">
<artifact
pattern="http://url/ivy-repo/[organisation]/[module]/[revision]/
[artifac
t]-[revision].[ext]" />
<ivy
pattern="http://url/ivy-repo/[organisation]/[module]/[revision]/
ivy.xml"
/>
</url>
<!-- this is where you can publish to, either
your own code or for testing new thirdparty files -->
<filesystem name="local-repo" local="true">
<artifact
pattern="${local.repo.dir}/[organisation]/[module]/[revision]/
[artifact]
-[revision].[ext]" />
<ivy
pattern="${local.repo.dir}/[organisation]/[module]/[revision]/ivy.xml"
/>
</filesystem>
</chain>
</resolvers>
</ivysettings>
BASE IVY DEPENDENCY FILE
<ivy-module version="1.0">
<info organisation="ncicb" module="bda-download"
/>
<configurations>
<conf name="runtime"/>
</configurations>
<publications>
</publications>
<dependencies>
<dependency org="ncicb" name="bda-utils" rev="1.0"
force="true" conf="runtime"/>
</dependencies>
</ivy-module>
DEPENDEND PROJECT
<ivy-module version="1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd
">
<info organisation="ncicb"
module="bda-utils"
revision="1.0"
publication="20080513121530"/>
<configurations>
<conf name="master"/>
<conf name="compile"/>
<conf name="runtime"/>
</configurations>
<publications>
<artifact name="bda-build-utils" type="xml" conf="master,
compile, runtime" />
<artifact name="bda-build-utils" type="zip" conf="master,
compile, runtime" />
</publications>
<dependencies>
<dependency org="javax.activation"
name="activation"
rev="1.0.2"
force="true"
conf="runtime->master"/>
<dependency org="apache"
name="antunit"
rev="1.0"
force="true"
conf="runtime->master"/>
..... Bunches of other depenencies
<dependency org="apache"
name="log4j"
rev="1.2.8"
force="true"
conf="runtime->master"/>
</dependencies>
</ivy-module>
LOCAL CACHE DIR
[EMAIL PROTECTED] bda-utils]$ pwd
/home/ssaksa/.ivy2-bda-utils/ncicb/bda-utils
[EMAIL PROTECTED] bda-utils]$ ls -lrt
total 40
drwxrwxr-x 2 ssaksa ssaksa 4096 2008-05-09 14:21 ivys
-rw-rw-r-- 1 ssaksa ssaksa 3347 2008-05-09 14:21 ivy-1.0.xml
drwxrwxr-x 2 ssaksa ssaksa 4096 2008-05-09 14:21 zips
drwxrwxr-x 2 ssaksa ssaksa 4096 2008-05-09 14:21 xmls
-rw-rw-r-- 1 ssaksa ssaksa 985 2008-05-13 14:10
ivydata-1.0.properties
IVY REPO
/home/ssaksa/src/trunk/commonlibrary/trunk/ivy-repo/ncicb/bda-utils/
1.0
[EMAIL PROTECTED] 1.0]$ ls -lrt
total 160
-rw-r--r-- 1 ssaksa ssaksa 10454 2008-04-22 14:09
bda-build-utils-1.0.zip
-rw-rw-r-- 1 ssaksa ssaksa 74760 2008-05-13 10:18
bda-build-utils-1.0.xml
-rw-rw-r-- 1 ssaksa ssaksa 58 2008-05-13 12:05
bda-build-utils-1.0.xml.md5
-rw-rw-r-- 1 ssaksa ssaksa 58 2008-05-13 12:05
bda-build-utils-1.0.zip.md5
-rw-rw-r-- 1 ssaksa ssaksa 66 2008-05-13 12:06
bda-build-utils-1.0.xml.sha1
-rw-rw-r-- 1 ssaksa ssaksa 66 2008-05-13 12:06
bda-build-utils-1.0.zip.sha1
-rw-rw-r-- 1 ssaksa ssaksa 5505 2008-05-13 14:09 ivy.xml
-rw-rw-r-- 1 ssaksa ssaksa 42 2008-05-13 14:09 ivy.xml.md5
-rw-rw-r-- 1 ssaksa ssaksa 50 2008-05-13 14:10 ivy.xml.sha1
WIRESHARK Caputre
HEAD /svnroot/commonlibrary/trunk/ivy-repo/ncicb/bda-utils/1.0/ivy.xml
HTTP/1.1
User-Agent: Java/1.5.0_10
Host: gforge.nci.nih.gov
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
HTTP/1.1 200 OK
Date: Tue, 13 May 2008 18:10:20 GMT
Server: Apache/2.2.2 (Unix)
ETag: "330//trunk/ivy-repo/ncicb/bda-utils/1.0/ivy.xml"
Accept-Ranges: bytes
Content-Length: 5505
Connection: close
Content-Type: text/plain; charset=UTF-8
HEAD
/svnroot/commonlibrary/trunk/ivy-repo/javax.activation/activation/
1.0.2/
ivy.xml HTTP/1.1
User-Agent: Java/1.5.0_10
Host: gforge.nci.nih.gov
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
HTTP/1.1 200 OK
Date: Tue, 13 May 2008 18:10:20 GMT
Server: Apache/2.2.2 (Unix)
ETag: "244//trunk/ivy-repo/javax.activation/activation/1.0.2/ivy.xml"
Accept-Ranges: bytes
Content-Length: 801
Connection: close
Content-Type: text/plain; charset=UTF-8
X-Pad: avoid browser bug