开发者

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

I am de开发者_运维百科veloping 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?


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜