2013-04-16

How to copy all files in classpath to a directory using Ant?

Try something like the following target:

...

    <target name=copy-deps">
        <copy todir="." flatten="true">
            <path refid="my-classpath"/>
        </copy>
    </target>

...

To execute (assuming that my-classpath is defined, of course):

ant copy-deps