You need to create an ivysettings.xml
where you define two resolvers in a chain:
This could look like this (Example from the chain resolver:
<ivysettings>
<resolvers>
<chain name="test">
<filesystem name="1">
<ivy pattern="${ivy.settings.dir}/lib/[organisation]/[module]/ivys/ivy-[revision].xml"/>
<artifact pattern="${ivy.settings.dir}/lib/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
</filesystem>
<ibiblio name="maven2" m2compatible="true"/>
</chain>
</resolvers>
</ivysettings>
${ivy.settings.dir}
is the folder, where your ivysettings.xml is located.
To include / set an ivysettings.xml in your build.xml
you need to use the settings task:
<ivy:settings />
or
<ivy:settings file="path_to_file/ivysettings.xml" />