Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set Ant to copy specific files to output?

Tags:

eclipse

ant

I am developing in eclipse websites in php.

I want to create a build configuration using Ant, to copy files from the project folder to a specific output path.

How is this possible using eclipse builders?

like image 502
Odys Avatar asked Sep 29 '11 12:09

Odys


1 Answers

Ant copy task: http://ant.apache.org/manual/Tasks/copy.html

Example which copies one file to another:

<!-- copy file -->
<copy file="./service.jar" tofile="./service-v1.jar" overwrite="true"/>

Example which copies all XML, PNG, and JSON files from one directory to another, maintaining folder structure:

<!-- copy files -->
<copy todir="./destination">
    <fileset dir="./src">
        <include name="**/*.xml"/>
        <include name="**/*.png"/>
        <include name="**/*.json"/>
    </fileset>
</copy>
like image 54
DreadPirateShawn Avatar answered Sep 18 '22 23:09

DreadPirateShawn