Task ์ ์๋ก ๋ค์ build.xml ํ์ผ์ ๋ณด๋ฉฐ์ ์ค๋ช
ํด๋ณด์.
~cpp
<project name="MyProject" default="dist" basedir=".">
<!-- set global properties for this build -->
<property name="src" value="."/>
<property name="build" value="build"/>
<property name="dist" value="dist"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}"/>
</target>
<target name="dist" depends="compile">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
</target>
<target name="clean">
<!-- Delete the ${build} and ${dist} directory trees -->
</target>
</project>
์์ ์์์ Task ๋ ๋ฌด์์ผ๊น.? task ๋ผ ํจ์ ๋จ์ด ๋ป ๊ทธ๋๋ก ์์
์ด๋ผ๋ ๋ง์ ๋ปํ๋ค. ์์ ์์์ ๋ณผ ์ ์๋ ์์
์ javac,mkdir,jar,delete ๋ฑ์ด ๊ทธ Task ๋ผ๊ณ ํ ์ ์๋ค.










