- これの続きです。もっといい方法があるかもしれませんが…。
xml version="1.0" encoding="UTF-8"
<project default="all">
<property name="src.path" value="src" />
<property name="dist.path" value="dist" />
<target name="yuicompression">
<echo message="${filename}" />
<java jar="yuicompressor-2.3.5.jar"
fork="true"
failonerror="true"
maxmemory="128m"
>
<arg value="${src.path}/${filename}" />
<arg value="-o" />
<arg value="${dist.path}/${filename}"/>
<classpath>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
</target>
<target name="compress">
<antcall target="yuicompression">
<param name="filename" value="jquery-1.2.3.js" />
</antcall>
</target>
<target name="clean">
<delete dir="${dist.path}"/>
<mkdir dir="${dist.path}"/>
</target>
<target name="all" depends="clean, compress" />
</project>