2003-01-15 01:33:52 +01:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<!-- Smack Build Script ========================================== -->
|
|
|
|
<!-- Jive Software ============================================== -->
|
|
|
|
|
|
|
|
<!--
|
|
|
|
$RCSfile$
|
|
|
|
$Revision$
|
|
|
|
$Date$
|
|
|
|
-->
|
|
|
|
|
|
|
|
<project name="Smack" default="all" basedir="..">
|
2003-01-20 16:57:33 +01:00
|
|
|
|
|
|
|
<!-- PROPERTIES -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
|
2003-01-15 01:33:52 +01:00
|
|
|
<property name="compile.dir" value="${basedir}/classes" />
|
2003-08-02 19:32:38 +02:00
|
|
|
<property name="compile.test.dir" value="${basedir}/classes-test" />
|
2003-01-15 01:33:52 +01:00
|
|
|
<property name="jar.dest.dir" value="${basedir}" />
|
|
|
|
<property name="javadoc.dest.dir" value="${basedir}/javadoc" />
|
2003-01-20 16:57:33 +01:00
|
|
|
<property name="build.lib.dir" value="${basedir}/build/lib" />
|
2003-01-24 03:44:25 +01:00
|
|
|
<property name="merge.lib.dir" value="${basedir}/build/merge" />
|
2003-01-20 16:57:33 +01:00
|
|
|
|
|
|
|
<property name="version.major" value="1" />
|
2003-08-05 00:04:04 +02:00
|
|
|
<property name="version.minor" value="2" />
|
|
|
|
<property name="version.revision" value="0" />
|
2003-04-25 23:00:48 +02:00
|
|
|
<property name="version.name" value="${version.major}.${version.minor}.${version.revision}" />
|
2003-01-15 01:33:52 +01:00
|
|
|
|
|
|
|
<!-- TARGETS -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
|
|
|
|
<!-- all -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="all" depends="jar" description="Calls 'jar' target by default">
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- compile -->
|
|
|
|
<!-- ======================================================================================= -->
|
2003-01-20 16:57:33 +01:00
|
|
|
<target name="compile" description="Compiles all source to ${compile.dir}.">
|
2003-01-15 01:33:52 +01:00
|
|
|
<!-- make target dir -->
|
|
|
|
<mkdir dir="${compile.dir}" />
|
|
|
|
<javac
|
|
|
|
destdir="${compile.dir}"
|
|
|
|
includeAntRuntime="no"
|
|
|
|
debug="on"
|
|
|
|
>
|
|
|
|
<src path="${basedir}/source" />
|
|
|
|
<classpath>
|
|
|
|
<fileset dir="${build.lib.dir}">
|
2003-01-24 03:44:25 +01:00
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="${merge.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
2003-01-15 01:33:52 +01:00
|
|
|
</fileset>
|
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
2003-08-02 19:32:38 +02:00
|
|
|
<!-- compile-test -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="compile-test" description="Compiles all source to ${compile.dir}.">
|
|
|
|
<!-- make target dir -->
|
|
|
|
<mkdir dir="${compile.test.dir}" />
|
|
|
|
<javac
|
|
|
|
destdir="${compile.test.dir}"
|
|
|
|
includeAntRuntime="no"
|
|
|
|
debug="on"
|
|
|
|
>
|
|
|
|
<src path="${basedir}/test" />
|
|
|
|
<classpath>
|
|
|
|
<fileset dir="${build.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="${merge.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="${basedir}/build">
|
|
|
|
<include name="junit.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<pathelement location="${compile.dir}" />
|
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
2003-01-15 01:33:52 +01:00
|
|
|
<!-- jar -->
|
|
|
|
<!-- ======================================================================================= -->
|
2003-08-11 15:50:31 +02:00
|
|
|
<target name="jar" depends="compile" unless="jar.uptodate" description="Produces smack.jar">
|
2003-08-05 04:00:25 +02:00
|
|
|
|
2003-01-15 01:33:52 +01:00
|
|
|
<jar destfile="${jar.dest.dir}/smack.jar"
|
|
|
|
basedir="${compile.dir}"
|
2003-08-02 00:13:09 +02:00
|
|
|
includes="org/jivesoftware/smack/**/*.class"
|
2003-01-15 01:33:52 +01:00
|
|
|
>
|
2003-01-24 03:44:25 +01:00
|
|
|
<zipfileset src="${merge.lib.dir}/xpp.jar"/>
|
2003-08-04 23:27:12 +02:00
|
|
|
</jar>
|
|
|
|
<copy todir="${compile.dir}/resources/WEB-INF" file="${basedir}/resources/META-INF/smack.providers" />
|
2003-08-02 00:13:09 +02:00
|
|
|
<jar destfile="${jar.dest.dir}/smackx.jar"
|
|
|
|
basedir="${compile.dir}"
|
2003-08-04 23:27:12 +02:00
|
|
|
includes="org/jivesoftware/smackx/**/*.class, **/*.providers"
|
|
|
|
/>
|
|
|
|
<delete file="${compile.dir}/resources/WEB-INF/smack.properties" />
|
2003-01-15 01:33:52 +01:00
|
|
|
</target>
|
|
|
|
|
2003-08-02 19:32:38 +02:00
|
|
|
<!-- jar -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="jar-test" depends="compile-test" description="Produces jar of test code">
|
|
|
|
<jar destfile="${jar.dest.dir}/smack-test.jar"
|
|
|
|
basedir="${compile.test.dir}"
|
|
|
|
includes="org/jivesoftware/smack/**/*.class"
|
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
2003-01-15 01:33:52 +01:00
|
|
|
<!-- javadoc -->
|
|
|
|
<!-- ======================================================================================= -->
|
2003-08-04 23:27:12 +02:00
|
|
|
<target name="javadoc" description="JavaDocs the Smack source code">
|
2003-01-15 01:33:52 +01:00
|
|
|
|
|
|
|
<mkdir dir="${javadoc.dest.dir}" />
|
|
|
|
<javadoc
|
2003-08-11 15:50:31 +02:00
|
|
|
packagenames="org.jivesoftware.smack.*, org.jivesoftware.smackx.*"
|
2003-01-15 01:33:52 +01:00
|
|
|
sourcepath="${basedir}/source"
|
|
|
|
destdir="${javadoc.dest.dir}"
|
|
|
|
author="true"
|
2003-01-20 16:57:33 +01:00
|
|
|
windowtitle="Smack ${version.name} Documentation"
|
2003-03-10 00:08:17 +01:00
|
|
|
overview="${basedir}/source/overview.html"
|
2003-01-15 01:33:52 +01:00
|
|
|
>
|
|
|
|
<classpath>
|
|
|
|
<fileset dir="${build.lib.dir}">
|
2003-01-24 03:44:25 +01:00
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="${merge.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
2003-01-15 01:33:52 +01:00
|
|
|
</fileset>
|
|
|
|
</classpath>
|
2003-01-20 16:57:33 +01:00
|
|
|
<doctitle><![CDATA[<font face="arial,helvetica">Smack ${version.name}</font>]]></doctitle>
|
2003-01-16 21:42:29 +01:00
|
|
|
<header><![CDATA[<b>Smack</b>]]></header>
|
2003-01-15 01:33:52 +01:00
|
|
|
<bottom><![CDATA[<i>Copyright © 2003 Jive Software. </i>]]></bottom>
|
|
|
|
<link href="http://java.sun.com/j2se/1.3/docs/api/" />
|
|
|
|
<link href="http://java.sun.com/j2ee/sdk_1.2.1/techdocs/api/" />
|
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2003-08-02 19:32:38 +02:00
|
|
|
<!-- test -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="test" depends="compile, jar-test" unless="no.test">
|
|
|
|
<junit printsummary="on"
|
|
|
|
fork="false"
|
|
|
|
haltonfailure="false"
|
|
|
|
failureproperty="tests.failed"
|
|
|
|
showoutput="true">
|
|
|
|
|
|
|
|
<classpath>
|
|
|
|
<fileset dir="${build.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="${merge.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="${basedir}">
|
|
|
|
<include name="smack-test.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<pathelement location="${compile.dir}" />
|
|
|
|
</classpath>
|
|
|
|
|
|
|
|
<formatter type="brief" usefile="false"/>
|
|
|
|
|
|
|
|
<batchtest>
|
|
|
|
<fileset dir="${basedir}/test">
|
|
|
|
<include name="org/jivesoftware/smack/**/*Test.java"/>
|
|
|
|
</fileset>
|
|
|
|
</batchtest>
|
|
|
|
</junit>
|
|
|
|
|
|
|
|
<fail if="tests.failed" message="Tests failed, see test log." />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2003-01-20 16:57:33 +01:00
|
|
|
<!-- release -->
|
|
|
|
<!-- ======================================================================================= -->
|
2003-08-11 15:50:31 +02:00
|
|
|
<target name="release" if="release.exists" depends="release-exists, test">
|
2003-08-05 04:00:25 +02:00
|
|
|
<antcall target="jar">
|
|
|
|
<param name="no.test" value="true" />
|
|
|
|
</antcall>
|
|
|
|
<antcall target="javadoc">
|
|
|
|
<param name="no.test" value="true" />
|
|
|
|
</antcall>
|
2003-01-20 16:57:33 +01:00
|
|
|
<ant antfile="${basedir}/build/release.xml" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- release-exists -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="release-exists" >
|
|
|
|
<available file="${basedir}/build/release.xml" property="release.exists"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2003-01-15 01:33:52 +01:00
|
|
|
<!-- clean -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="clean" description="Deletes all generated content.">
|
|
|
|
<delete dir="${javadoc.dest.dir}" />
|
2003-01-20 16:57:33 +01:00
|
|
|
<delete dir="${compile.dir}" />
|
2003-08-02 19:32:38 +02:00
|
|
|
<delete dir="${compile.test.dir}" />
|
2003-05-22 00:46:28 +02:00
|
|
|
<delete file="${basedir}/smack.jar" />
|
2003-08-02 19:32:38 +02:00
|
|
|
<delete file="${basedir}/smackx.jar" />
|
|
|
|
<delete file="${basedir}/smack-test.jar" />
|
2003-01-20 16:57:33 +01:00
|
|
|
<delete dir="${basedir}/release" />
|
2003-01-15 01:33:52 +01:00
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|