Author: nextgens
Date: 2008-10-28 03:48:43 +0000 (Tue, 28 Oct 2008)
New Revision: 23148
Modified:
trunk/contrib/freenet_ext/build.xml
Log:
freenet-ext: integrate the new repository layout with the build-tools
Modified: trunk/contrib/freenet_ext/build.xml
===================================================================
--- trunk/contrib/freenet_ext/build.xml 2008-10-28 03:22:37 UTC (rev 23147)
+++ trunk/contrib/freenet_ext/build.xml 2008-10-28 03:48:43 UTC (rev 23148)
@@ -5,6 +5,7 @@
<project name="Freenet-ext" default="jar">
<property name="build" location="build_dir"/>
<property name="jar.location" location="freenet-ext.jar"/>
+ <property name="freenet.location" location="freenet.jar"/>
<property name="svn.revision" value="@custom@"/>
<property name="javac.target.version" value="1.5"/>
@@ -78,6 +79,55 @@
</ant>
</target>
+ <target name="build-java" description="build the 3rd party code we
bundle">
+ <tstamp/>
+ <javac srcdir="../java" destdir="${build}" debug="on"
optimize="on" source="1.5">
+
+ <classpath>
+ <pathelement location="${build}"/>
+ <pathelement location="${freenet.location}"/>
+ </classpath>
+ <compilerarg value="-Xlint"/>
+
+ <include name="**/*.java"/>
+ </javac>
+
+ <delete dir="${build}-test"/>
+ <mkdir dir="${build}-test"/>
+
+ <javac srcdir="../java-test" destdir="${build}-test"
debug="on" optimize="on" source="1.5">
+
+ <classpath>
+ <pathelement location="${build}"/>
+ <pathelement location="${freenet.location}"/>
+ </classpath>
+ <compilerarg value="-Xlint"/>
+
+ <include name="**/*.java"/>
+ </javac>
+
+ <junit printsummary="yes" fork="yes" haltonfailure="yes">
+ <classpath>
+ <pathelement path="${build}"/>
+ <pathelement path="${build}-test"/>
+ <pathelement location="${freenet.location}"/>
+ <pathelement location="${junit.location}"/>
+ </classpath>
+
+ <formatter type="plain" usefile="false"/>
+
+ <batchtest fork="yes">
+ <fileset dir="${build}-test">
+ <include name="**/*Test.class"/>
+ </fileset>
+ </batchtest>
+ <sysproperty key="benchmark" value="${benchmark}" />
+ <sysproperty key="extensiveTesting"
value="${extensiveTesting}" />
+ </junit>
+
+ <delete dir="${build}-test"/>
+ </target>
+
<target name="clean" depends="distclean"/>
<target name="distclean" description="Cleanup the build directory">
@@ -92,7 +142,7 @@
<delete file="${jar.location}"/>
</target>
- <target name="jar"
depends="clean,fec,jcpuid,nativethread,bigint,bdb,wrapper,db4o"
description="Create the jar file">
+ <target name="jar"
depends="clean,fec,jcpuid,nativethread,bigint,bdb,wrapper,db4o,build-java"
description="Create the jar file">
<jar jarfile="${jar.location}" basedir="${build}" includes="**">
<zipfileset src="../fec/common/lib/onion-common.jar"/>
<zipfileset src="../bdb/build/lib/je.jar"/>