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: Problem grabbing updated artifacts
Date Wed, 21 Nov 2007 17:46:48 GMT
On Nov 21, 2007 12:12 AM, Hilton, Chris <Chris.Hilton@zilliant.com> wrote:

> Here's most of the particulars of my Ivy configuration:
>
> <ivyconf>
>    <property name="ivy.log.module.when.found" value="false"/>
>    <conf defaultCache="${dir.ivy.cache}"
>              defaultResolver="zilliant-chain"
>              validate="false"
>              />
>    <resolvers>
>        <chain name="zilliant-chain" returnFirst="true">
>            <filesystem name="internal" checkmodified="true"
> changingPattern=".*">
>                <ivy pattern="${dir.ivy.repository}/[organisation]/[module]/[revision]/ivy.xml"
> />
>                <artifact pattern="${dir.ivy.repository}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
> />
>                <artifact pattern="${dir.ivy.repository}/[organisation]/[module]/[revision]/[artifact].[ext]"
> />
>            </filesystem>
>            <url name="zilliant-3rdparty-repository">
>                <ivy pattern="${url.zilliant.3rdparty.repository}/[organisation]/[module]/[revision]/ivy.xml"
> />
>                <artifact pattern="${url.zilliant.3rdparty.repository}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
> />
>                <artifact pattern="${url.zilliant.3rdparty.repository}/[organisation]/[module]/[revision]/[artifact].[ext]"
> />
>            </url>
>                <ssh name="zilliant-dev-repository" user="${
> dev.repository.user}" userPassword="${dev.repository.password}" host="${
> dev.repository.server}" checkmodified="true" changingPattern=".*">
>                <ivy pattern="/${dev.repository.dir}/[organisation]/[module]/[revision]/ivy.xml"
> />
>                <artifact pattern="/${dev.repository.dir}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
> />
>                <artifact pattern="/${dev.repository.dir}/[organisation]/[module]/[revision]/[artifact].[ext]"
> />
>            </ssh>
>        </chain>
>    </resolvers>
> </ivyconf>
>
> Obviously, there are some properties that are defined separately, but the
> gist is that the chain resolver has 3 sub-resolvers, one on the local
> filesystem, one on a web server, and one on an SSH server. The local
> filesystem resolver and the SSH resolver basically house our locally built
> changing artifacts which have a fixed version number. Since we have a fixed
> version number, I have tried to set those resolvers to always check for
> updated artifacts, first with the .* changingPattern, then with
> checkmodified set to true. Unfortunately, this doesn't seem to be working
> and, once the artifacts are downloaded to the cache, newer artifacts in the
> repositories just get ignored. I tried running with ant -d and this looks to
> be the relevant portion trying to resolve my problematic dependency:
>
> [ivy-resolve]       using zilliant-chain to resolve [ zilliant |
> policymgt_campaignmanager_swingui | 6.5.0.0 ]
> [ivy-resolve]        trying
> C:\dev\zpm\main\.ivy_repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> [ivy-resolve]       internal: resource not reachable for [ zilliant |
> policymgt_campaignmanager_swingui | 6.5.0.0 ]:
> res=C:\dev\zpm\main\.ivy_repository\zilliant\policymgt_campaignmanager_swingui\6.5.0.0\ivy.xml
> [ivy-resolve]        trying
> C:\dev\zpm\main\.ivy_repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui-
> 6.5.0.0.jar
> [ivy-resolve]       internal: resource not reachable for [ zilliant |
> policymgt_campaignmanager_swingui | 6.5.0.0 ]:
> res=C:\dev\zpm\main\.ivy_repository\zilliant\policymgt_campaignmanager_swingui\6.5.0.0\policymgt_campaignmanager_swingui-
> 6.5.0.0.jar
> [ivy-resolve]        trying
> C:\dev\zpm\main\.ivy_repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui.jar
> [ivy-resolve]       internal: resource not reachable for [ zilliant |
> policymgt_campaignmanager_swingui | 6.5.0.0 ]:
> res=C:\dev\zpm\main\.ivy_repository\zilliant\policymgt_campaignmanager_swingui\6.5.0.0\policymgt_campaignmanager_swingui.jar
> [ivy-resolve]       internal: no ivy file nor artifact found for [
> zilliant | policymgt_campaignmanager_swingui | 6.5.0.0 ]
> [ivy-resolve]                   tried
> C:\dev\zpm\main\.ivy_repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> [ivy-resolve]                   tried
> C:\dev\zpm\main\.ivy_repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui-
> 6.5.0.0.jar
> [ivy-resolve]                   tried
> C:\dev\zpm\main\.ivy_repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui.jar
> [ivy-resolve] pre 1.3 ivy file: using exactOrRegexp as default matcher
> [ivy-resolve]       found ivy file in cache for [ zilliant |
> policymgt_campaignmanager_swingui | 6.5.0.0 ] (resolved by
> zilliant-dev-repository):
> C:\dev\zpm\main\.ivy_cache\zilliant\policymgt_campaignmanager_swingui\ivy-
> 6.5.0.0.xml
> [ivy-resolve] found module in cache but with a different resolver:
> discarding: [ zilliant | policymgt_campaignmanager_swingui | 6.5.0.0 ]
> [ivy-resolve] pre 1.3 ivy file: using exactOrRegexp as default matcher
> [ivy-resolve]       found ivy file in cache for [ zilliant |
> policymgt_campaignmanager_swingui | 6.5.0.0 ] (resolved by
> zilliant-dev-repository):
> C:\dev\zpm\main\.ivy_cache\zilliant\policymgt_campaignmanager_swingui\ivy-
> 6.5.0.0.xml
> [ivy-resolve] found module in cache but with a different resolver:
> discarding: [ zilliant | policymgt_campaignmanager_swingui | 6.5.0.0 ]
> [ivy-resolve]        trying
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> [ivy-resolve] CLIENT ERROR: Object Not Found url=
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> [ivy-resolve] HTTP response status: 404 url=
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> [ivy-resolve]       zilliant-3rdparty-repository: resource not reachable
> for [ zilliant | policymgt_campaignmanager_swingui | 6.5.0.0 ]: res=
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> [ivy-resolve]        trying
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui-6.5.0.0.jar
> [ivy-resolve]<http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui-6.5.0.0.jar%5Bivy-resolve%5D>CLIENT
ERROR: Object Not Found url=
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui-6.5.0.0.jar
> [ivy-resolve]<http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui-6.5.0.0.jar%5Bivy-resolve%5D>HTTP
response status: 404 url=
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui-6.5.0.0.jar
> [ivy-resolve]<http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui-6.5.0.0.jar%5Bivy-resolve%5D>
     zilliant-3rdparty-repository: resource not reachable for [ zilliant |
> policymgt_campaignmanager_swingui | 6.5.0.0 ]: res=
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui-6.5.0.0.jar
> [ivy-resolve]<http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui-6.5.0.0.jar%5Bivy-resolve%5D>
      trying
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui.jar
> [ivy-resolve]<http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui.jar%5Bivy-resolve%5D>CLIENT
ERROR: Object Not Found url=
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui.jar
> [ivy-resolve]<http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui.jar%5Bivy-resolve%5D>HTTP
response status: 404 url=
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui.jar
> [ivy-resolve]<http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui.jar%5Bivy-resolve%5D>
     zilliant-3rdparty-repository: resource not reachable for [ zilliant |
> policymgt_campaignmanager_swingui | 6.5.0.0 ]: res=
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui.jar
> [ivy-resolve]<http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui.jar%5Bivy-resolve%5D>
     zilliant-3rdparty-repository: no ivy file nor artifact found for [
> zilliant | policymgt_campaignmanager_swingui | 6.5.0.0 ]
> [ivy-resolve]                   tried
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> [ivy-resolve]                   tried
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui-6.5.0.0.jar
> [ivy-resolve]<http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui-6.5.0.0.jar%5Bivy-resolve%5D>
                 tried
> http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui.jar
> [ivy-resolve]<http://chilton/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/policymgt_campaignmanager_swingui.jar%5Bivy-resolve%5D>
      trying
> /cygdrive/c/temp/ftp/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> [ivy-resolve] SShRepository:getResource called:
> /cygdrive/c/temp/ftp/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> [ivy-resolve] SShResource: resolving
> /cygdrive/c/temp/ftp/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> [ivy-resolve] SShRepository:resolveResource called:
> /cygdrive/c/temp/ftp/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> [ivy-resolve] SShRepository:resolveResource end.
> [ivy-resolve] SShResource: resolved
> SshResource:/cygdrive/c/temp/ftp/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> (1843)]
> [ivy-resolve]       zilliant-dev-repository: found md file for [ zilliant
> | policymgt_campaignmanager_swingui | 6.5.0.0 ]
> [ivy-resolve]                   =>
> SshResource:/cygdrive/c/temp/ftp/repository/zilliant/policymgt_campaignmanager_swingui/6.5.0.0/ivy.xml
> (1843)] (6.5.0.0)
> [ivy-resolve]       parser = ivy parser
> [ivy-resolve] pre 1.3 ivy file: using exactOrRegexp as default matcher
> [ivy-resolve]       found ivy file in cache for [ zilliant |
> policymgt_campaignmanager_swingui | 6.5.0.0 ] (resolved by
> zilliant-dev-repository):
> C:\dev\zpm\main\.ivy_cache\zilliant\policymgt_campaignmanager_swingui\ivy-
> 6.5.0.0.xml
> [ivy-resolve]       zilliant-dev-repository: revision in cache (not
> updated): [ zilliant | policymgt_campaignmanager_swingui | 6.5.0.0 ]
> [ivy-resolve]       found [ zilliant | policymgt_campaignmanager_swingui |
> 6.5.0.0 ] in zilliant-dev-repository
>
> It seems to fall through to the SSH resolver as I would expect, but then
> doesn't seem to download the new ivy.xml file with the new publication
> date or the new artifacts that have changed. (Don't let the "ftp" directory
> above fool you; that just happens to be where the repository is housed on
> the SSH server). When I blow away the cache, it works fine.
>
> So, is there something I'm mistaken about on how to get changing
> artifacts? More debugging I can do?

My guess is that you only change your artifacts, not your ivy files. And
since the changing pattern checks the publication date of the module
according to the metadata before downloading artifacts, Ivy considers the
module as not updated and trust its cache. I realize this is documented only
on the dependency tag reference doc for the changing attribute [1], and not
for the changingPattern. I'll try to improve this.

Do you use the publish task to publish your changed versions of your
modules?

Xavier
[1] http://ant.apache.org/ivy/history/trunk/ivyfile/dependency.html


>
> Chris Hilton
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

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