develog

[java] Ant copy 본문

Dev/Java

[java] Ant copy

냐옴 2014. 2. 18. 13:24

 

<?xml version="1.0" encoding="UTF-8"?>
<project name="MyProj" default="init" basedir=".">

    <!-- props -->
    <target name="props">
        <property name="SRC_DIR" value="../src/mxml/WEB-INF" />
        <property name="DST_DIR" value="../WebRoot/WEB-INF" />
    </target>

    <!-- init -->
    <target name="init">
        <antcall target="delete" />
        <antcall target="copy" />
    </target>

    <!-- delete -->
    <target name="delete" depends="props">
        <delete quiet="true" file="$/web.xml" />

        <delete quiet="true" includeemptydirs="true">
            <fileset dir="$/context" />
        </delete>

        <delete quiet="true" includeemptydirs="true">
            <fileset dir="$/flex" />
        </delete>
    </target>

    <!-- copy -->
    <target name="copy" depends="props">
        <copy file="$/web.xml" todir="$" />

        <copy todir="$/context">
            <fileset dir="$/context" />
        </copy>

        <copy todir="$/flex">
            <fileset dir="$/flex" />
        </copy>
    </target>

</project>

'Dev > Java' 카테고리의 다른 글

Java 한글 Encoding  (0) 2014.03.04
java 정규표현식  (0) 2014.02.21
variable arguments 2  (0) 2014.02.14
java for break label  (0) 2014.02.12
iBatis, remapResults="true"  (0) 2014.01.16
Comments