mirror of
https://github.com/ChronosX88/FreePastry.git
synced 2024-12-04 15:22:18 +00:00
415 lines
18 KiB
XML
415 lines
18 KiB
XML
|
<project name="pastry" default="compile" basedir="./">
|
||
|
|
||
|
<!-- Necessary properties and paths -->
|
||
|
<property name="src.dir" value="src"/>
|
||
|
<property name="jar.dir" value="jars"/>
|
||
|
<property name="license.dir" value="license"/>
|
||
|
<property name="build.dir" value="classes" />
|
||
|
<property name="lib.dir" value="lib" />
|
||
|
<property name="pretty.dir" value="pretty" />
|
||
|
<property name="pretty.lib.dir" value="pretty/lib" />
|
||
|
<property name="docs.dir" value="docs" />
|
||
|
<property name="javadoc.dir" value="${docs.dir}/javadoc" />
|
||
|
<property name="license.file" value="License.txt"/>
|
||
|
<property name="license.path" value="${license.dir}/${license.file}"/>
|
||
|
|
||
|
|
||
|
<!-- Jars that Pretty package needs -->
|
||
|
<path id="pretty.classpath">
|
||
|
<fileset dir="${pretty.lib.dir}">
|
||
|
<include name="**/*.jar"/>
|
||
|
</fileset>
|
||
|
</path>
|
||
|
|
||
|
<!-- The classpath -->
|
||
|
<path id="project.classpath">
|
||
|
<fileset dir="${lib.dir}">
|
||
|
<include name="**/*.jar"/>
|
||
|
</fileset>
|
||
|
<pathelement path="${build.dir}"/>
|
||
|
</path>
|
||
|
|
||
|
<!-- TASKS BELOW -->
|
||
|
|
||
|
<target name="clean">
|
||
|
<delete dir="${build.dir}"/>
|
||
|
<delete file="pastry.jar"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- All the stuff that needs to be done before anything can happen -->
|
||
|
<target name="init">
|
||
|
<!-- make the directory to put all classes in -->
|
||
|
<mkdir dir="${build.dir}"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="compile" depends="init">
|
||
|
<javac srcdir="${src.dir}"
|
||
|
destdir="${build.dir}"
|
||
|
classpathref="project.classpath"
|
||
|
includes="**/*.java"
|
||
|
deprecation="yes"
|
||
|
debuglevel="lines,vars,source"
|
||
|
debug="true">
|
||
|
</javac>
|
||
|
</target>
|
||
|
|
||
|
<!-- Environment variables for the Checker Framework -->
|
||
|
<!-- Override on the command line, e.g.: ant -Djsr308.dir=$HOME/jsr308 -->
|
||
|
<property environment="env"/>
|
||
|
<property name="jsr308.dir" value="C:/jsr308"/>
|
||
|
<property name="jsr308.checkers.dir" value="${jsr308.dir}/checkers"/>
|
||
|
<property name="jsr308.javac" value="${jsr308.dir}/jdk1.7.0/bin/javac"/>
|
||
|
<property name="jsr308.processor" value="checkers.interning.InterningChecker"/>
|
||
|
|
||
|
<!-- The classpath for using the Checker Framework -->
|
||
|
<path id="checkers.classpath">
|
||
|
<fileset dir="${lib.dir}">
|
||
|
<include name="**/*.jar"/>
|
||
|
</fileset>
|
||
|
<fileset dir="${jsr308.checkers.dir}">
|
||
|
<include name="checkers.jar"/>
|
||
|
</fileset>
|
||
|
<pathelement path="${build.dir}"/>
|
||
|
</path>
|
||
|
|
||
|
<!-- Running a checker from the Checker Framework -->
|
||
|
<!--
|
||
|
"clean" target is because the javac target doesn't re-compile .java
|
||
|
files for which a .class file already exists.
|
||
|
"executable" and "fork" fields ensure we call an external program, not
|
||
|
just run javac via a Java method call. That's because the JSR 308
|
||
|
compiler might not be the one that is running Ant.
|
||
|
-->
|
||
|
<target name="checker" depends="clean,init">
|
||
|
<javac srcdir="${src.dir}"
|
||
|
destdir="${build.dir}"
|
||
|
classpathref="checkers.classpath"
|
||
|
includes="**/*.java"
|
||
|
deprecation="no"
|
||
|
debuglevel="lines,vars,source"
|
||
|
fork="yes"
|
||
|
executable="${jsr308.javac}"
|
||
|
debug="true">
|
||
|
<compilerarg value="-version"/>
|
||
|
<compilerarg value="-processor"/>
|
||
|
<compilerarg value="${jsr308.processor}"/>
|
||
|
</javac>
|
||
|
</target>
|
||
|
|
||
|
|
||
|
<target name="etags" depends="tags">
|
||
|
</target>
|
||
|
<target name="tags" description="Create Emacs TAGS table">
|
||
|
<exec executable="/bin/sh">
|
||
|
<arg value="-c"/>
|
||
|
<arg value="etags `find -name '*.java' | sort-directory-order.pl`"/>
|
||
|
</exec>
|
||
|
</target>
|
||
|
|
||
|
|
||
|
<target name="compileappend" depends="init">
|
||
|
<javac srcdir="${pretty.lib.dir}"
|
||
|
destdir="."
|
||
|
deprecation="yes"
|
||
|
debuglevel="lines,vars,source"
|
||
|
debug="true">
|
||
|
</javac>
|
||
|
</target>
|
||
|
|
||
|
|
||
|
<target name="appendlicense" depends="compileappend">
|
||
|
<taskdef name="append"
|
||
|
classname="Append"
|
||
|
classpath="."/>
|
||
|
<append srcfile="${license.path}">
|
||
|
<fileset dir="${src.dir}" includes="**/*.java"/>
|
||
|
</append>
|
||
|
</target>
|
||
|
|
||
|
|
||
|
|
||
|
<!-- todo add *.html, *.htm -->
|
||
|
<target name="javadoc" depends="init" unless="dontjavadoc">
|
||
|
<javadoc destdir="${javadoc.dir}"
|
||
|
classpathref="project.classpath"
|
||
|
windowtitle="Rice Pastry - API Specifications"
|
||
|
use="true">
|
||
|
<fileset dir="${src.dir}">
|
||
|
<include name="org/mpisws/p2p/**/*.java"/>
|
||
|
<include name="rice/*.java"/>
|
||
|
<include name="rice/environment/**/*.java"/>
|
||
|
<include name="rice/p2p/commonapi/**/*.java"/>
|
||
|
<include name="rice/p2p/glacier/*.java"/>
|
||
|
<include name="rice/p2p/glacier/v2/**/*.java"/>
|
||
|
<include name="rice/p2p/aggregation/**/*.java"/>
|
||
|
<include name="rice/p2p/multiring/**/*.java"/>
|
||
|
<include name="rice/p2p/past/**/*.java"/>
|
||
|
<include name="rice/p2p/replication/**/*.java"/>
|
||
|
<exclude name="rice/p2p/saar/**/*.java"/>
|
||
|
<include name="rice/p2p/scribe/**/*.java"/>
|
||
|
<include name="rice/p2p/splitstream/**/*.java"/>
|
||
|
<include name="rice/p2p/util/**/*.java"/>
|
||
|
<include name="rice/pastry/**/*.java"/>
|
||
|
<exclude name="rice/pastry/socket/testing/*.java"/>
|
||
|
<include name="rice/persistence/**/*.java"/>
|
||
|
<include name="rice/selector/**/*.java"/>
|
||
|
<include name="rice/tutorial/**/*.java"/>
|
||
|
</fileset>
|
||
|
<doctitle>Rice Pastry API</doctitle>
|
||
|
<header>Rice Pastry API</header>
|
||
|
<bottom><![CDATA[<i>Copyright © 2001-2005 - Rice Pastry.</i>]]></bottom>
|
||
|
</javadoc>
|
||
|
</target>
|
||
|
|
||
|
<!-- Distribution-related targets -->
|
||
|
<target name="jar" depends="compile">
|
||
|
<jar destfile="pastry.jar">
|
||
|
<fileset dir="${build.dir}" includes="**/*.class"/>
|
||
|
<fileset dir="${jar.dir}/freepastry" includes="freepastry.params"/>
|
||
|
</jar>
|
||
|
</target>
|
||
|
|
||
|
<!-- ********************** freepastry release section ********************* -->
|
||
|
|
||
|
<target name="freepastry-jar" depends="compile">
|
||
|
<jar destfile="pastry.jar" compress="true">
|
||
|
<fileset dir="${build.dir}">
|
||
|
<include name="org/mpisws/p2p/**/*.class"/>
|
||
|
<include name="rice/*.class"/>
|
||
|
<include name="rice/environment/**/*.class"/>
|
||
|
<include name="rice/p2p/commonapi/**/*.class"/>
|
||
|
<include name="rice/p2p/glacier/*.class"/>
|
||
|
<include name="rice/p2p/glacier/v2/**/*.class"/>
|
||
|
<include name="rice/p2p/aggregation/**/*.class"/>
|
||
|
<include name="rice/p2p/multiring/**/*.class"/>
|
||
|
<include name="rice/p2p/past/**/*.class"/>
|
||
|
<include name="rice/p2p/replication/**/*.class"/>
|
||
|
<include name="rice/p2p/scribe/**/*.class"/>
|
||
|
<include name="rice/p2p/splitstream/**/*.class"/>
|
||
|
<include name="rice/p2p/util/**/*.class"/>
|
||
|
<include name="rice/pastry/**/*.class"/>
|
||
|
<exclude name="rice/pastry/socket/testing/*.class"/>
|
||
|
<include name="rice/persistence/**/*.class"/>
|
||
|
<include name="rice/selector/**/*.class"/>
|
||
|
<include name="rice/tutorial/**/*.class"/>
|
||
|
</fileset>
|
||
|
<fileset dir="${jar.dir}/freepastry" includes="freepastry.params"/>
|
||
|
</jar>
|
||
|
</target>
|
||
|
|
||
|
<target name="freepastry-saar-jar" depends="compile">
|
||
|
<jar destfile="pastry.jar" compress="true">
|
||
|
<fileset dir="${build.dir}">
|
||
|
<include name="org/mpisws/p2p/**/*.class"/>
|
||
|
<include name="rice/*.class"/>
|
||
|
<include name="rice/environment/**/*.class"/>
|
||
|
<include name="rice/p2p/commonapi/**/*.class"/>
|
||
|
<include name="rice/p2p/glacier/*.class"/>
|
||
|
<include name="rice/p2p/glacier/v2/**/*.class"/>
|
||
|
<include name="rice/p2p/aggregation/**/*.class"/>
|
||
|
<include name="rice/p2p/multiring/**/*.class"/>
|
||
|
<include name="rice/p2p/past/**/*.class"/>
|
||
|
<include name="rice/p2p/replication/**/*.class"/>
|
||
|
<include name="rice/p2p/saar/**/*.class"/>
|
||
|
<include name="rice/p2p/scribe/**/*.class"/>
|
||
|
<include name="rice/p2p/splitstream/**/*.class"/>
|
||
|
<include name="rice/p2p/util/**/*.class"/>
|
||
|
<include name="rice/pastry/**/*.class"/>
|
||
|
<exclude name="rice/pastry/socket/testing/*.class"/>
|
||
|
<include name="rice/persistence/**/*.class"/>
|
||
|
<include name="rice/selector/**/*.class"/>
|
||
|
<include name="rice/tutorial/**/*.class"/>
|
||
|
</fileset>
|
||
|
<fileset dir="${jar.dir}/freepastry" includes="freepastry.params"/>
|
||
|
</jar>
|
||
|
</target>
|
||
|
|
||
|
|
||
|
<!-- freepastry-core-jar: creates ./pastry-core.jar which excludes Glacier
|
||
|
and SplitStream, as well as rice.pastry.testing.* -->
|
||
|
<target name="freepastry-core-jar" depends="compile">
|
||
|
<jar destfile="pastry-core.jar" compress="true">
|
||
|
<fileset dir="${build.dir}">
|
||
|
<include name="org/mpisws/p2p/**/*.class"/>
|
||
|
<include name="rice/*.class"/>
|
||
|
<include name="rice/environment/**/*.class"/>
|
||
|
<include name="rice/p2p/commonapi/**/*.class"/>
|
||
|
<include name="rice/p2p/multiring/**/*.class"/>
|
||
|
<include name="rice/p2p/past/**/*.class"/>
|
||
|
<include name="rice/p2p/replication/**/*.class"/>
|
||
|
<include name="rice/p2p/scribe/**/*.class"/>
|
||
|
<include name="rice/p2p/util/**/*.class"/>
|
||
|
<include name="rice/pastry/**/*.class"/>
|
||
|
<exclude name="rice/pastry/socket/testing/*.class"/>
|
||
|
<include name="rice/selector/**/*.class"/>
|
||
|
<exclude name="**/testing/*.class"/>
|
||
|
</fileset>
|
||
|
<fileset dir="${jar.dir}/freepastry" includes="freepastry.params"/>
|
||
|
</jar>
|
||
|
</target>
|
||
|
|
||
|
<!-- freepastry-core-jar: creates ./pastry-core.jar which excludes Glacier
|
||
|
and SplitStream, as well as rice.pastry.testing.* -->
|
||
|
<target name="freepastry-minimal-jar" depends="compile">
|
||
|
<jar destfile="pastry-minimal.jar" compress="true">
|
||
|
<fileset dir="${build.dir}">
|
||
|
<include name="org/mpisws/p2p/**/*.class"/>
|
||
|
<include name="rice/*.class"/>
|
||
|
<include name="rice/environment/**/*.class"/>
|
||
|
<include name="rice/p2p/commonapi/**/*.class"/>
|
||
|
<include name="rice/p2p/multiring/**/*.class"/>
|
||
|
<include name="rice/p2p/util/**/*.class"/>
|
||
|
<include name="rice/pastry/**/*.class"/>
|
||
|
<exclude name="rice/pastry/socket/testing/*.class"/>
|
||
|
<include name="rice/selector/**/*.class"/>
|
||
|
<exclude name="**/testing/*.class"/>
|
||
|
</fileset>
|
||
|
<fileset dir="${jar.dir}/freepastry" includes="freepastry.params"/>
|
||
|
</jar>
|
||
|
</target>
|
||
|
|
||
|
<target name="freepastry-pl-test" depends="compile">
|
||
|
<jar destfile="pastry.jar" compress="true">
|
||
|
<fileset dir="${build.dir}">
|
||
|
<include name="org/mpisws/p2p/**/*.class"/>
|
||
|
<include name="rice/*.class"/>
|
||
|
<include name="rice/environment/**/*.class"/>
|
||
|
<include name="rice/p2p/commonapi/**/*.class"/>
|
||
|
<include name="rice/p2p/multiring/**/*.class"/>
|
||
|
<include name="rice/p2p/past/**/*.class"/>
|
||
|
<include name="rice/p2p/replication/**/*.class"/>
|
||
|
<include name="rice/p2p/scribe/**/*.class"/>
|
||
|
<include name="rice/p2p/splitstream/**/*.class"/>
|
||
|
<include name="rice/p2p/util/**/*.class"/>
|
||
|
<include name="rice/pastry/**/*.class"/>
|
||
|
<exclude name="rice/pastry/socket/testing/*.class"/>
|
||
|
<include name="rice/selector/**/*.class"/>
|
||
|
<include name="rice/testing/routeconsistent/**/*.class"/>
|
||
|
</fileset>
|
||
|
<fileset dir="${jar.dir}/freepastry" includes="freepastry.params"/>
|
||
|
</jar>
|
||
|
</target>
|
||
|
|
||
|
<target name="freepastry-release" depends="freepastry-jar,javadoc,freepastry-tutorial">
|
||
|
<move file="pastry.jar" tofile="FreePastry-${freepastry-version}.jar"/>
|
||
|
<!--
|
||
|
<tar destfile="FreePastry-${freepastry-version}-all.tgz" compression="gzip">
|
||
|
<tarfileset dir="." includes="FreePastry-${freepastry-version}.jar"/>
|
||
|
</tar>
|
||
|
<zip destfile="FreePastry-${freepastry-version}-all.zip">
|
||
|
<zipfileset dir="." includes="FreePastry-${freepastry-version}.jar"/>
|
||
|
</zip>
|
||
|
-->
|
||
|
|
||
|
<tar destfile="FreePastry-${freepastry-version}-source.tgz" compression="gzip">
|
||
|
<tarfileset dir="${src.dir}" prefix="pastry-${freepastry-version}/src">
|
||
|
<include name="org/mpisws/p2p/**/*.java"/>
|
||
|
<include name="rice/*.java"/>
|
||
|
<include name="rice/environment/**/*.java"/>
|
||
|
<include name="rice/p2p/commonapi/**/*.java"/>
|
||
|
<include name="rice/p2p/glacier/*.java"/>
|
||
|
<include name="rice/p2p/glacier/v2/**/*.java"/>
|
||
|
<include name="rice/p2p/aggregation/**/*.java"/>
|
||
|
<include name="rice/p2p/multiring/**/*.java"/>
|
||
|
<include name="rice/p2p/past/**/*.java"/>
|
||
|
<include name="rice/p2p/replication/**/*.java"/>
|
||
|
<include name="rice/p2p/scribe/**/*.java"/>
|
||
|
<include name="rice/p2p/splitstream/**/*.java"/>
|
||
|
<include name="rice/p2p/util/**/*.java"/>
|
||
|
<include name="rice/pastry/**/*.java"/>
|
||
|
<exclude name="rice/pastry/socket/testing/*.java"/>
|
||
|
<include name="rice/persistence/**/*.java"/>
|
||
|
<include name="rice/selector/**/*.java"/>
|
||
|
<include name="rice/tutorial/**/*.java"/>
|
||
|
</tarfileset>
|
||
|
<tarfileset dir="ant" includes="**/*" prefix="pastry-${freepastry-version}/ant"/>
|
||
|
<tarfileset dir="html" includes="**/*" prefix="pastry-${freepastry-version}/html"/>
|
||
|
<tarfileset dir="jars/freepastry" includes="freepastry.params" prefix="pastry-${freepastry-version}/jars/freepastry"/>
|
||
|
<tarfileset dir="license" includes="**/*" prefix="pastry-${freepastry-version}/license"/>
|
||
|
<tarfileset dir="licensing" includes="**/*" prefix="pastry-${freepastry-version}/licensing"/>
|
||
|
<tarfileset dir="tools/wireshark" includes="**/*" prefix="pastry-${freepastry-version}/tools/wireshark"/>
|
||
|
<tarfileset dir="${lib.dir}" prefix="pastry-${freepastry-version}/lib">
|
||
|
<include name="xmlpull*.jar"/>
|
||
|
<include name="bouncy*.jar"/>
|
||
|
<include name="xpp*.jar"/>
|
||
|
<include name="sbbi*.jar"/>
|
||
|
<include name="commons*.jar"/>
|
||
|
<include name="junit*.jar"/>
|
||
|
</tarfileset>
|
||
|
<tarfileset dir="${docs.dir}" includes="**/*" prefix="pastry-${freepastry-version}/docs" />
|
||
|
<tarfileset dir="." includes="build.xml" prefix="pastry-${freepastry-version}"/>
|
||
|
</tar>
|
||
|
<zip destfile="FreePastry-${freepastry-version}-source.zip">
|
||
|
<zipfileset dir="${src.dir}" prefix="pastry-${freepastry-version}/src">
|
||
|
<include name="org/mpisws/p2p/**/*.java"/>
|
||
|
<include name="rice/*.java"/>
|
||
|
<include name="rice/environment/**/*.java"/>
|
||
|
<include name="rice/p2p/commonapi/**/*.java"/>
|
||
|
<include name="rice/p2p/glacier/*.java"/>
|
||
|
<include name="rice/p2p/glacier/v2/**/*.java"/>
|
||
|
<include name="rice/p2p/aggregation/**/*.java"/>
|
||
|
<include name="rice/p2p/multiring/**/*.java"/>
|
||
|
<include name="rice/p2p/past/**/*.java"/>
|
||
|
<include name="rice/p2p/replication/**/*.java"/>
|
||
|
<include name="rice/p2p/scribe/**/*.java"/>
|
||
|
<include name="rice/p2p/splitstream/**/*.java"/>
|
||
|
<include name="rice/p2p/util/**/*.java"/>
|
||
|
<include name="rice/pastry/**/*.java"/>
|
||
|
<exclude name="rice/pastry/socket/testing/*.java"/>
|
||
|
<include name="rice/persistence/**/*.java"/>
|
||
|
<include name="rice/selector/**/*.java"/>
|
||
|
<include name="rice/tutorial/**/*.java"/>
|
||
|
</zipfileset>
|
||
|
<zipfileset dir="ant" includes="**/*" prefix="pastry-${freepastry-version}/ant" />
|
||
|
<zipfileset dir="html" includes="**/*" prefix="pastry-${freepastry-version}/html" />
|
||
|
<zipfileset dir="jars/freepastry" includes="freepastry.params" prefix="pastry-${freepastry-version}/jars/freepastry" />
|
||
|
<zipfileset dir="license" includes="**/*" prefix="pastry-${freepastry-version}/license" />
|
||
|
<zipfileset dir="licensing" includes="**/*" prefix="pastry-${freepastry-version}/licensing" />
|
||
|
<zipfileset dir="tools/wireshark" includes="**/*" prefix="pastry-${freepastry-version}/tools/wireshark"/>
|
||
|
<zipfileset dir="${lib.dir}" prefix="pastry-${freepastry-version}/lib">
|
||
|
<include name="xmlpull*.jar"/>
|
||
|
<include name="bouncy*.jar"/>
|
||
|
<include name="xpp*.jar"/>
|
||
|
<include name="sbbi*.jar"/>
|
||
|
<include name="commons*.jar"/>
|
||
|
</zipfileset>
|
||
|
<zipfileset dir="${docs.dir}" includes="**/**" prefix="pastry-${freepastry-version}/docs" />
|
||
|
<zipfileset dir="." includes="build.xml" prefix="pastry-${freepastry-version}"/>
|
||
|
</zip>
|
||
|
<tar destfile="FreePastry-${freepastry-version}-docs.tgz" compression="gzip">
|
||
|
<tarfileset dir="license" includes="**/*" prefix="pastry-${freepastry-version}/license" />
|
||
|
<tarfileset dir="licensing" includes="**/*" prefix="pastry-${freepastry-version}/licensing" />
|
||
|
<tarfileset dir="${docs.dir}" prefix="pastry-${freepastry-version}/docs" />
|
||
|
</tar>
|
||
|
<zip destfile="FreePastry-${freepastry-version}-docs.zip">
|
||
|
<zipfileset dir="license" includes="**/*" prefix="pastry-${freepastry-version}/license" />
|
||
|
<zipfileset dir="licensing" includes="**/*" prefix="pastry-${freepastry-version}/licensing" />
|
||
|
<zipfileset dir="${docs.dir}" prefix="pastry-${freepastry-version}/docs" />
|
||
|
</zip>
|
||
|
<checksum fileext=".md5sum" todir="." algorithm="MD5">
|
||
|
<fileset dir=".">
|
||
|
<include name="FreePastry-${freepastry-version}.jar"/>
|
||
|
<!--
|
||
|
<include name="FreePastry-${freepastry-version}-all.tgz"/>
|
||
|
<include name="FreePastry-${freepastry-version}-all.zip"/>
|
||
|
-->
|
||
|
<include name="FreePastry-${freepastry-version}-source.tgz"/>
|
||
|
<include name="FreePastry-${freepastry-version}-source.zip"/>
|
||
|
<include name="FreePastry-${freepastry-version}-docs.tgz"/>
|
||
|
<include name="FreePastry-${freepastry-version}-docs.zip"/>
|
||
|
</fileset>
|
||
|
</checksum>
|
||
|
</target>
|
||
|
|
||
|
<!-- perform variable substitutions to the tutorial -->
|
||
|
<target name="freepastry-tutorial">
|
||
|
<copy todir="tutorial">
|
||
|
<fileset dir="html/rawtutorial" excludes="tutorial.variables"/>
|
||
|
<filterset>
|
||
|
<filtersfile file="html/rawtutorial/tutorial.variables"/>
|
||
|
</filterset>
|
||
|
</copy>
|
||
|
</target>
|
||
|
|
||
|
</project>
|