Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
88 lines (74 sloc) 2.71 KB
<?xml version="1.0"?>
<project name="jvm-compressor-benchmark" basedir="." default="compile">
<property name="dir.lib" value="${basedir}/lib"/>
<property name="dir.bin" value="${basedir}/bin"/>
<property name="dir.src.java" value="${basedir}/src/main/java"/>
<property name="dir.build" value="${basedir}/build"/>
<property name="dir.build.classes" value="${basedir}/build/classes"/>
<!-- Distribution -->
<property name="dir.dist" location="${basedir}/dist" />
<property name="VERSION" value="0.1" />
<patternset id="dist-all-source-files">
<include name="README.txt" />
<include name="build.xml" />
<include name="bin/*.sh" />
<include name="data/**" />
<include name="src/**/*.java" />
<include name="src/**/*.html" />
<include name="testcfg/**" />
</patternset>
<target name="init">
<mkdir dir="${dir.build.classes}" />
<mkdir dir="${dir.dist}" />
</target>
<target name="clean">
<delete dir="${dir.build}"/>
<delete dir="${dir.dist}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${dir.src.java}" destdir="${dir.build.classes}"
source="1.6" target="1.6" debug="true"
includeantruntime="false"
>
<classpath>
<fileset dir="${dir.lib}" includes="*/*.jar" />
</classpath>
</javac>
</target>
<target name="dist" depends="compile">
<!-- hmmh. tons of jars, let's skip for now -->
<!--
<copy todir="${dir.dist}">
<fileset dir="${dir.build}" includes="*.jar" />
</copy>
-->
<!-- Then let's create the source distribution tar packages
-->
<!-- Need to first copy to a tmp dir, to get the additional
directory (so tar/zip contents won't explode directly
in current dir)
-->
<property name="DIST_FILENAME" value="${ant.project.name}-${VERSION}" />
<property name="DIST_DIR" value="${DIST_FILENAME}" />
<!-- better always clean it up, if it exists... -->
<delete dir="${dir.build}/${DIST_DIR}" />
<mkdir dir="${dir.build}/${DIST_DIR}" />
<copy todir="${dir.build}/${DIST_DIR}">
<fileset dir="${basedir}">
<patternset refid="dist-all-source-files" />
</fileset>
</copy>
<chmod dir="${dir.build}/${DIST_DIR}/bin" perm="ugo+rx"
includes="*.sh" />
<!-- then create tarball, zip -->
<tar basedir="${dir.build}"
includes="${DIST_DIR}/**"
destfile="${dir.dist}/${DIST_FILENAME}.tar.gz"
compression="gzip"
/>
<zip basedir="${dir.build}"
includes="${DIST_DIR}/**"
destfile="${dir.dist}/${DIST_FILENAME}.zip"
/>
</target>
</project>