I'm trying to call 2 retrieves one after the other.
When my ivy_portlet.xml is present, the second call is not executed.
When my ivy_portlet.xml is not present the second call retrieves the content of ivy.xml
When the 2 files are there, only the first one is executed.
What am I missing?
<if>
<available file="${basedir}/ivy_portlet.xml" />
<then>
<echo message="Getting runtime portlet dependencies using Ivy project's configuration" />
<ivy:retrieve pattern="${project.lib.dir}/[conf]/[artifact]-[revision](-[classifier]).[ext]" file="${basedir}/ivy_portlet.xml"/>
</then>
</if>
<if>
<available file="${basedir}/ivy.xml" />
<then>
<echo message="Getting deps using Ivy project's configuration" />
<ivy:retrieve pattern="${project.lib.dir}/[conf]/[artifact]-[revision](-[classifier]).[ext]" file="${basedir}/ivy.xml"/>
</then>
</if>
Here's the trick:
A call to resolve must be made when using a file name different from ivy.xml.
<ivy:resolve file="${rpm.homedir}/Builder/ivy_portlet.xml"/>