开发者

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

开发者 https://www.devze.com 2023-04-09 01:59 出处:网络
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.

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

精彩评论

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