You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Patrik Nagel <pa...@gmx.ch> on 2009/03/31 13:30:51 UTC
File system resolver - list of patterns
Hi,
According to the documenation [1] for file system resolvers on can indicate a list of patterns which will be checked one after another. Thus, I added two artifacts pattern for the "LocalThirdPartyResolver" in the ivy settings file as follows:
<chain name="ThirdParyResolvers" returnFirst="true">
<filesystem name="LocalThirdPartyResolver" checkmodified="true">
<ivy pattern="${localAbsPath.dir}/[module]/ivy-[module]_[revision].xml" />
<artifact pattern="${localAbsPath.dir}/[module]/[module]_[revision](_[artifact]).properties" /> <!-- properties files are of ivy-type "meta" -->
<artifact pattern="${serverAbsPath.dir}/[module]/[module]_[revision](_[artifact]).tgz" /> <!-- tgz files are of ivy-type "bin" -->
</filesystem>
<filesystem name="ThirdPartyResolver" checkmodified="true">
<ivy pattern="${serverAbsPath.dir}/[module]/ivy-[module]_[revision].xml" />
<artifact pattern="${serverAbsPath.dir}/[module]/[module]_[revision](_[artifact]).[ext]" />
</filesystem>
</chain>
The ant task 'resolve' runs without any problems and downloads the *.xml as well as the *.properties file to its cache for a module found with the "LocalThirdPartyResolver". But it does not download the *.tgz file. Instead ivy just creates the *.tgz file in its cache with the content of the *.properties file!?
Actually, the idea behind the two artifacts pattern is that the "LocalThirdPartyResolver" should only get i.e. prefer the porperties and ivy file for a module from the local repository but get the tgz file for the same module from a server's repository. Is there another way to do this?
Thanks in advance!
Patrik
[1] http://ant.apache.org/ivy/history/2.0.0/resolver/filesystem.html
--
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a