$ brew update
$ brew install ivy
$ mkdir -p ~/.ant/lib
$ cp /usr/local/Cellar/ivy/2.3.0/libexec/ivy-2.3.0.jar ~/.ant/lib
$ mkdir hello-ivy
$ cd hello-ivy

vim ivy.xml

<ivy-module version="2.0">
    <info organisation="org.apache" module="hello-ivy"/>
    <dependencies>
        <dependency org="org.apache.mina" name="mina-core" rev="2.0.7" />
    </dependencies>
</ivy-module>

vim build.xml

<project xmlns:ivy="antlib:org.apache.ivy.ant" name="hello-ivy">
    <target name="resolve" description="retrieve dependencies with ivy">
        <ivy:retrieve />
    </target>

    <target name="main" depends="resolve"/>
</project>
$ ant main