Author: nextgens
Date: 2006-01-05 12:43:13 +0000 (Thu, 05 Jan 2006)
New Revision: 7747
Modified:
trunk/freenet/build.xml
Log:
Now we fetch the -ext file if it\'s missing
Modified: trunk/freenet/build.xml
===================================================================
--- trunk/freenet/build.xml 2006-01-05 12:38:02 UTC (rev 7746)
+++ trunk/freenet/build.xml 2006-01-05 12:43:13 UTC (rev 7747)
@@ -8,20 +8,35 @@
</description>
<!-- set global properties for this build -->
- <property name="src" location="src"/>
- <property name="build" location="build"/>
-
+ <property name="src" location="src"/>
+ <property name="build" location="build"/>
+ <property name="lib" location="lib"/>
+ <property name="freenet-ext.location"
location="${lib}/freenet-ext.jar"/>
+<target name="env" description="Learn about the environment">
+ <available file="${lib}/freenet-ext.jar" property="freenet-ext.present"/>
+</target>
+
+ <target name="get-extjar" unless="freenet-ext.present"
+ description="Download some external libraries which Freenet relies on">
+ <mkdir dir="${lib}"/>
+ <get src="http://downloads.freenetproject.org/alpha/freenet-ext.jar"
+ dest="${freenet-ext.location}"
+ verbose="true"
+ usetimestamp="true"/>
+ <property name="freenet-ext.present" value="true"/>
+ </target>
<!-- ================================================== -->
- <target name="compile">
+ <target name="compile" depends="get-extjar" unless="freenet-ext.present">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
+ <mkdir dir="${lib}"/>
<!-- FIXME: remove the debug and replace with optimize -->
<javac srcdir="${src}" destdir="${build}" debug="on" optimize="on"
source="1.4">
<classpath>
- <pathelement location="freenet-ext.jar"/>
+ <pathelement location="${lib}freenet-ext.jar"/>
</classpath>
<!-- following a very temporary list of files to be build -->
<include name="org/**/*.java"/>
@@ -38,7 +53,7 @@
<!-- Create the distribution directory -->
<!--<mkdir dir="."/>-->
<!-- Put everything in ${build} into the freenet-${DSTAMP}.jar file -->
- <jar jarfile="freenet-cvs-snapshot.jar" basedir="${build}">
+ <jar jarfile="freenet-cvs-snapshot.jar" basedir="${lib}">
<manifest>
<attribute name="Main-Class" value="freenet/node/Node"/>
<attribute name="Built-By" value="${user.name}"/>
@@ -61,8 +76,7 @@
</target>
<target name="distclean" description="Delete class files and docs dir.">
<delete dir="${build}"/>
- <delete file="freenet-cvs-snapshot.jar"/>
- <delete file="freenet-ext.jar"/>
+ <delete dir="${lib}"/>
<!--<delete><fileset dir="src" includes="**/*.class"/></delete>-->
</target>