Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
122 lines (102 sloc) 4.3 KB
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="memcached" default="package" basedir=".">
<property name="project.title" value="java memcached client" />
<property name="code.dir" value="src/com/meetup/memcached" />
<property name="doc.dir" value="doc" />
<property name="src.dir" value="src" />
<property name="build.dir" value="classes" />
<property environment="env"/>
<property file="build.properties"/>
<property name="project" value="memcached"/>
<path id="project.class.path">
<pathelement path = "lib/log4j.jar"/>
</path>
<!-- package release -->
<!-- ant package -Dver=release_1.3 -Dlog4j=1 -->
<target name="package" depends="clean, setup, log4j, logger, pkg-compile, jar, javadoc">
<tar tarfile="memcached-${ver}.tar.gz" basedir="." includes="memcached-${ver}/**" compression="gzip"/>
<zip destfile="memcached-${ver}.zip" basedir="." includes="memcached-${ver}/**"/>
<copy file="memcached-${ver}/memcached-${ver}.jar" todir="."/>
<checksum file="memcached-${ver}.tar.gz"/>
<checksum file="memcached-${ver}.zip"/>
<checksum file="memcached-${ver}.jar"/>
<delete dir="memcached-${ver}" />
<tar tarfile="memcached-${ver}.tar" basedir="." includes="memcached-${ver}.*"/>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="memcached-${ver}" />
<delete file="memcached-${ver}.tar.gz"/>
<delete file="memcached-${ver}.zip"/>
<delete file="memcached-${ver}.jar"/>
<delete file="memcached-${ver}.tar.gz.MD5"/>
<delete file="memcached-${ver}.zip.MD5"/>
<delete file="memcached-${ver}.jar.MD5"/>
</target>
<target name="setup">
<mkdir dir="memcached-${ver}"/>
<mkdir dir="memcached-${ver}/javadocs"/>
<mkdir dir="memcached-${ver}/src/com/meetup/memcached"/>
<mkdir dir="memcached-${ver}/classes"/>
<mkdir dir="memcached-${ver}/doc"/>
<!-- copy source -->
<copy todir="memcached-${ver}/src/com/meetup/memcached">
<fileset dir="${code.dir}" defaultexcludes="true" excludes="**/*.xml **/*.swp **/*.swo"/>
</copy>
<!-- copy doc dir -->
<copy todir="memcached-${ver}/doc">
<fileset dir="${doc.dir}" defaultexcludes="true" excludes="**/*.swp **/*.swo"/>
</copy>
<!-- copy license to root -->
<copy file="${doc.dir}/LICENSE.txt" todir="memcached-${ver}"/>
<!-- copy changelog to root -->
<copy file="${doc.dir}/CHANGELOG.txt" todir="memcached-${ver}"/>
</target>
<!-- if logger is log4j then need to filter to make sure import exists -->
<target name="log4j" if="log4j" depends="clean, setup">
<replace dir="memcached-${ver}/src/com/meetup/memcached" token="//import org.apache.log4j.Logger;" value="import org.apache.log4j.Logger;">
<include name="**/*.java"/>
</replace>
</target>
<target name="logger" unless="log4j" depends="clean, setup">
<replace dir="memcached-${ver}/src/com/meetup/memcached" token="import org.apache.log4j.Logger;" value="//import org.apache.log4j.Logger;">
<include name="**/*.java"/>
</replace>
</target>
<!-- javadocs -->
<target name="javadoc" depends="clean, setup, log4j, logger">
<delete>
<fileset dir="memcached-${ver}/javadocs" />
</delete>
<javadoc sourcepath="memcached-${ver}/src"
destdir="memcached-${ver}/javadocs"
packagenames= "com.meetup.*"
author= "true"
private="true"
version="true"
defaultexcludes="yes"
classpathref="project.class.path"
use="true"
windowtitle="java memcached client api documentation"
doctitle="&lt;h1&gt;${project.title} documentation (Version ${ver})&lt;/h1&gt;"
bottom="Copyright &#169; 2005 - greg whalin">
</javadoc>
</target>
<!-- compilation target for packeging operations -->
<target name="pkg-compile" depends="clean, setup, log4j, logger">
<javac debug="yes" srcdir="memcached-${ver}/src" destdir="memcached-${ver}/classes" deprecation="true">
<classpath refid="project.class.path"/>
</javac>
</target>
<target name="jar" depends="pkg-compile">
<jar compress="yes" jarfile="memcached-${ver}/memcached-${ver}.jar" basedir="memcached-${ver}/classes"/>
</target>
<!-- compilation target -->
<target name="compile">
<mkdir dir="${build.dir}"/>
<javac debug="yes" srcdir="${src.dir}" destdir="${build.dir}" deprecation="true" compiler="modern">
<compilerarg value="-Xlint:unchecked"/>
<classpath refid="project.class.path"/>
</javac>
</target>
</project>
Something went wrong with that request. Please try again.