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
|
|
|
|
2003-08-19 19:44:45 +02:00
|
|
|
<!-- TASKDEFS -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
|
|
|
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
|
|
|
|
<classpath>
|
2014-01-25 23:48:44 +01:00
|
|
|
<pathelement location="${basedir}/build/ant-contrib-1.0b2.jar"/>
|
2003-08-19 19:44:45 +02:00
|
|
|
</classpath>
|
|
|
|
</taskdef>
|
|
|
|
|
2003-01-20 16:57:33 +01:00
|
|
|
<!-- PROPERTIES -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
|
2006-07-17 10:39:08 +02:00
|
|
|
<!-- Smack Version -->
|
|
|
|
<property name="version.major" value="3" />
|
2014-01-19 18:24:41 +01:00
|
|
|
<property name="version.minor" value="4" />
|
2014-02-03 03:03:54 +01:00
|
|
|
<property name="version.revision" value="1" />
|
|
|
|
<property name="version.extra" value="SNAPSHOT" />
|
|
|
|
|
2014-01-25 23:48:44 +01:00
|
|
|
<var name="mutable-version" value="${version.major}.${version.minor}.${version.revision}"/>
|
2014-01-31 04:41:25 +01:00
|
|
|
<var name="mutable-experimental-version" value="0.1"/>
|
2014-01-25 23:48:44 +01:00
|
|
|
|
2014-02-06 10:17:40 +01:00
|
|
|
<available file=".git" type="dir" property="gitDir.present"/>
|
|
|
|
|
|
|
|
<!-- <target name="git.revision" description="Store git revision in ${repository.version}" if="gitDir.present"> -->
|
|
|
|
<if>
|
|
|
|
<isset property="gitDir.present"/>
|
|
|
|
<then>
|
|
|
|
<exec executable="git" outputproperty="git.revision" failifexecutionfails="false" errorproperty="">
|
|
|
|
<arg value="log"/>
|
|
|
|
<arg value="-n 1"/>
|
|
|
|
<arg value="--pretty=format:%h"/>
|
|
|
|
</exec>
|
|
|
|
</then>
|
|
|
|
</if>
|
|
|
|
<condition property="repository.version" value="${git.revision}" else="">
|
|
|
|
<and>
|
|
|
|
<isset property="git.revision"/>
|
|
|
|
<length string="${git.revision}" trim="yes" length="0" when="greater"/>
|
|
|
|
</and>
|
|
|
|
</condition>
|
|
|
|
<!-- </target> -->
|
|
|
|
|
2014-02-06 09:45:26 +01:00
|
|
|
<if>
|
2014-01-25 23:48:44 +01:00
|
|
|
<length string="${version.extra}" when="greater" length="0"/>
|
2007-02-04 22:24:51 +01:00
|
|
|
<then>
|
2014-02-06 09:45:26 +01:00
|
|
|
<var name="mutable-version" value="${mutable-version}.${version.extra}"/>
|
|
|
|
<var name="mutable-experimental-version" value="${mutable-experimental-version}.${version.extra}" />
|
2007-02-04 22:24:51 +01:00
|
|
|
</then>
|
|
|
|
</if>
|
2014-02-06 09:45:26 +01:00
|
|
|
|
|
|
|
<if>
|
2014-01-25 23:48:44 +01:00
|
|
|
<equals arg1="${dailybuild}" arg2="true" />
|
|
|
|
<then>
|
|
|
|
<tstamp>
|
|
|
|
<format property="build.date" pattern="yyyyMMdd" locale="en"/>
|
|
|
|
</tstamp>
|
2014-02-06 09:45:26 +01:00
|
|
|
<var name="mutable-version" value="${mutable-version}-${build.date}" />
|
|
|
|
<var name="mutable-experimental-version" value="${mutable-experimental-version}-${build.date}" />
|
2014-01-25 23:48:44 +01:00
|
|
|
</then>
|
2014-02-06 09:45:26 +01:00
|
|
|
</if>
|
2003-08-19 19:44:45 +02:00
|
|
|
|
2014-02-06 10:17:40 +01:00
|
|
|
<if>
|
|
|
|
<length string="${repository.version}" when="greater" length="0"/>
|
|
|
|
<then>
|
|
|
|
<var name="mutable-version" value="${mutable-version}-${repository.version}"/>
|
|
|
|
<var name="mutable-experimental-version" value="${mutable-experimental-version}-${repository.version}" />
|
|
|
|
</then>
|
|
|
|
</if>
|
|
|
|
|
2014-01-25 23:48:44 +01:00
|
|
|
<property name="version" value="${mutable-version}" />
|
2014-01-31 04:41:25 +01:00
|
|
|
<property name="experimental.version" value="${mutable-experimental-version}" />
|
2014-02-06 09:45:26 +01:00
|
|
|
|
|
|
|
<property name="bundle.name" value="org.igniterealtime.smack" />
|
2006-07-17 10:39:08 +02:00
|
|
|
<property file="${basedir}/build/build.properties" />
|
2007-01-08 00:03:16 +01:00
|
|
|
<property name="compile.dir" value="${basedir}/target/classes" />
|
|
|
|
<property name="compile.test.dir" value="${basedir}/target/classes-test" />
|
|
|
|
<property name="jar.dest.dir" value="${basedir}/target" />
|
|
|
|
<property name="javadoc.dest.dir" value="${basedir}/target/javadoc" />
|
2003-01-24 03:44:25 +01:00
|
|
|
<property name="merge.lib.dir" value="${basedir}/build/merge" />
|
2005-10-22 02:51:17 +02:00
|
|
|
<property name="test.dir" value="${basedir}/test" />
|
2012-11-22 03:05:04 +01:00
|
|
|
<property name="test-unit.dir" value="${basedir}/test-unit" />
|
2005-10-22 02:51:17 +02:00
|
|
|
<property name="resources.dir" value="${basedir}/build/resources" />
|
2013-01-21 11:35:20 +01:00
|
|
|
<property name="jingle.extension.merge.lib.dir" value="${basedir}/jingle/extension/build/merge" />
|
|
|
|
<property name="jingle.extension.lib.dir" value="${basedir}/jingle/extension/build/lib" />
|
2003-01-20 16:57:33 +01:00
|
|
|
|
2003-08-19 19:44:45 +02:00
|
|
|
<!-- Test props - override these defaults in the properties file or in command line -->
|
|
|
|
<property name="test.host" value="localhost" />
|
|
|
|
<property name="test.port" value="5222" />
|
|
|
|
<property name="test.admin.username" value="admin" />
|
|
|
|
<property name="test.admin.password" value="admin" />
|
|
|
|
<property name="test.admin.resource" value="Test" />
|
|
|
|
<property name="test.smack.debug" value="false" />
|
|
|
|
|
|
|
|
<!-- PATHS, DEPENDIENCIES, PATTERNS -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
|
|
|
|
<patternset id="test.cases">
|
|
|
|
<include name="org/jivesoftware/smack/**/*Test.java" />
|
2013-01-21 11:34:54 +01:00
|
|
|
<include name="org/jivesoftware/smackx/**/*Test.java" />
|
2003-08-19 19:44:45 +02:00
|
|
|
<exclude name="org/jivesoftware/smack/**/Messenger*Test.java" />
|
|
|
|
</patternset>
|
|
|
|
|
|
|
|
<patternset id="messenger.test.cases">
|
|
|
|
<include name="org/jivesoftware/smack/**/Messenger*Test.java" />
|
|
|
|
</patternset>
|
|
|
|
|
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"
|
2011-04-29 04:37:50 +02:00
|
|
|
source="1.6"
|
|
|
|
target="1.6"
|
2003-01-15 01:33:52 +01:00
|
|
|
>
|
|
|
|
<src path="${basedir}/source" />
|
|
|
|
<classpath>
|
2003-01-24 03:44:25 +01:00
|
|
|
<fileset dir="${merge.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
2003-01-15 01:33:52 +01:00
|
|
|
</fileset>
|
|
|
|
</classpath>
|
2013-01-21 11:35:20 +01:00
|
|
|
</javac>
|
|
|
|
<mkdir dir="${compile.dir}/jingle/extension" />
|
|
|
|
<javac
|
2007-02-20 18:50:29 +01:00
|
|
|
destdir="${compile.dir}/jingle/extension"
|
|
|
|
includeAntRuntime="no"
|
|
|
|
debug="on"
|
2011-04-29 04:37:50 +02:00
|
|
|
source="1.6"
|
|
|
|
target="1.6"
|
2007-02-20 18:50:29 +01:00
|
|
|
>
|
|
|
|
<src path="${basedir}/jingle/extension/source" />
|
|
|
|
<classpath>
|
2013-01-21 11:35:20 +01:00
|
|
|
<fileset dir="${merge.lib.dir}">
|
2007-02-20 18:50:29 +01:00
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
2007-03-09 20:44:36 +01:00
|
|
|
<fileset dir="${jingle.extension.lib.dir}">
|
2007-02-20 18:50:29 +01:00
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
2013-01-21 11:35:20 +01:00
|
|
|
<fileset dir="${jingle.extension.merge.lib.dir}">
|
2007-02-20 18:50:29 +01:00
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
2013-01-21 11:35:20 +01:00
|
|
|
<pathelement path="${compile.dir}"/>
|
2007-02-20 18:50:29 +01:00
|
|
|
</classpath>
|
2013-01-21 11:35:20 +01:00
|
|
|
</javac>
|
2014-01-20 03:25:35 +01:00
|
|
|
|
2014-02-06 09:45:26 +01:00
|
|
|
<mkdir dir="${compile.dir}/workgroup" />
|
2014-01-20 03:25:35 +01:00
|
|
|
<javac
|
|
|
|
destdir="${compile.dir}/workgroup"
|
|
|
|
includeAntRuntime="no"
|
|
|
|
debug="on"
|
|
|
|
source="1.6"
|
|
|
|
target="1.6"
|
|
|
|
>
|
|
|
|
<src path="${basedir}/workgroup/source" />
|
|
|
|
<classpath>
|
|
|
|
<fileset dir="${merge.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<pathelement path="${compile.dir}"/>
|
|
|
|
</classpath>
|
|
|
|
</javac>
|
2014-01-31 04:41:25 +01:00
|
|
|
|
2014-02-06 09:45:26 +01:00
|
|
|
<mkdir dir="${compile.dir}/experimental" />
|
2014-01-31 04:41:25 +01:00
|
|
|
<javac
|
|
|
|
destdir="${compile.dir}/experimental"
|
|
|
|
includeAntRuntime="no"
|
|
|
|
debug="on"
|
|
|
|
source="1.6"
|
|
|
|
target="1.6"
|
|
|
|
>
|
|
|
|
<src path="${basedir}/experimental/source" />
|
|
|
|
<classpath>
|
|
|
|
<fileset dir="${merge.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<pathelement path="${compile.dir}"/>
|
|
|
|
</classpath>
|
|
|
|
</javac>
|
2003-01-15 01:33:52 +01:00
|
|
|
</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"
|
2011-04-29 04:37:50 +02:00
|
|
|
source="1.6"
|
|
|
|
target="1.6"
|
2003-08-02 19:32:38 +02:00
|
|
|
>
|
2012-11-22 03:05:04 +01:00
|
|
|
<src path="${basedir}/source" />
|
2005-10-22 02:51:17 +02:00
|
|
|
<src path="${test.dir}" />
|
2012-11-22 03:05:04 +01:00
|
|
|
<src path="${test-unit.dir}" />
|
2003-08-02 19:32:38 +02:00
|
|
|
<classpath>
|
|
|
|
<fileset dir="${merge.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="${basedir}/build">
|
2013-01-21 12:35:37 +01:00
|
|
|
<include name="junit-4.10.jar"/>
|
2012-11-22 03:05:04 +01:00
|
|
|
<include name="mockito-all-1.8.2.jar"/>
|
|
|
|
<include name="powermock-mockito-1.3.5-full.jar"/>
|
2003-08-02 19:32:38 +02:00
|
|
|
</fileset>
|
2012-11-22 03:05:04 +01:00
|
|
|
<fileset dir ="${basedir}/build/build">
|
2013-01-21 11:35:20 +01:00
|
|
|
<include name="xmlunit.jar"/>
|
|
|
|
<include name="java-xmlbuilder-0.3.jar" />
|
2012-11-22 03:05:04 +01:00
|
|
|
</fileset>
|
2013-01-21 11:35:20 +01:00
|
|
|
<pathelement location="${compile.dir}" />
|
2003-08-02 19:32:38 +02:00
|
|
|
</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">
|
2014-01-16 06:14:39 +01:00
|
|
|
<copy todir="${compile.dir}/META-INF" file="${basedir}/build/resources/META-INF/jul.properties" />
|
2004-01-02 15:08:38 +01:00
|
|
|
<copy todir="${compile.dir}/META-INF" file="${basedir}/build/resources/META-INF/smack-config.xml" />
|
2014-01-16 06:14:39 +01:00
|
|
|
<copy todir="${compile.dir}/META-INF" file="${basedir}/build/resources/META-INF/core.providers" />
|
2014-02-06 09:45:26 +01:00
|
|
|
<property name="smack.jar.name" value="${jar.dest.dir}/smack-${version}.jar" />
|
2014-01-16 06:14:39 +01:00
|
|
|
<jar destfile="${smack.jar.name}"
|
2003-01-15 01:33:52 +01:00
|
|
|
basedir="${compile.dir}"
|
2014-01-16 06:14:39 +01:00
|
|
|
includes="org/jivesoftware/smack/**/*.class, **/smack-config.xml, **/core.providers, **/jul.properties">
|
2011-12-21 15:27:06 +01:00
|
|
|
<zipfileset src="${merge.lib.dir}/xpp.jar"/>
|
|
|
|
</jar>
|
2013-01-21 11:35:20 +01:00
|
|
|
<taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${basedir}/build/build/biz.aQute.bnd.jar"/>
|
2014-01-16 06:14:39 +01:00
|
|
|
<bndwrap jars="${smack.jar.name}" output="${smack.jar.name}" />
|
|
|
|
<jar file="${smack.jar.name}" update="true">
|
2011-12-21 15:27:06 +01:00
|
|
|
<manifest>
|
2014-01-26 15:49:45 +01:00
|
|
|
<attribute name="Bundle-SymbolicName" value="${bundle.name}" />
|
|
|
|
<attribute name="Bundle-Version" value="${version}" />
|
2011-12-21 15:27:06 +01:00
|
|
|
</manifest>
|
2003-08-04 23:27:12 +02:00
|
|
|
</jar>
|
2014-02-06 09:45:26 +01:00
|
|
|
|
|
|
|
<property name="smackx.jar.name" value="${jar.dest.dir}/smackx-${version}.jar" />
|
2014-01-16 06:14:39 +01:00
|
|
|
<copy todir="${compile.dir}/META-INF" file="${basedir}/build/resources/META-INF/extension.providers" />
|
|
|
|
<jar destfile="${smackx.jar.name}"
|
2003-08-02 00:13:09 +02:00
|
|
|
basedir="${compile.dir}"
|
2014-01-16 06:14:39 +01:00
|
|
|
includes="org/jivesoftware/smackx/**/*.class, **/extension.providers"
|
2011-12-21 15:27:06 +01:00
|
|
|
excludes="org/jivesoftware/smackx/debugger/*.class">
|
2003-11-15 21:28:56 +01:00
|
|
|
<manifest>
|
|
|
|
<attribute name="Class-Path" value="smack.jar" />
|
|
|
|
</manifest>
|
2006-01-16 18:28:29 +01:00
|
|
|
<zipfileset src="${merge.lib.dir}/jzlib.jar"/>
|
2003-11-15 21:28:56 +01:00
|
|
|
</jar>
|
2014-01-16 06:14:39 +01:00
|
|
|
<bndwrap jars="${smackx.jar.name}" output="${smackx.jar.name}" />
|
|
|
|
<jar file="${smackx.jar.name}" update="true">
|
2011-12-21 15:27:06 +01:00
|
|
|
<manifest>
|
2014-01-26 15:49:45 +01:00
|
|
|
<attribute name="Bundle-SymbolicName" value="${bundle.name}-ext" />
|
|
|
|
<attribute name="Bundle-Version" value="${version}" />
|
|
|
|
<attribute name="Fragment-Host" value="${bundle.name};bundle-version=${version}" />
|
2011-12-21 15:27:06 +01:00
|
|
|
</manifest>
|
|
|
|
</jar>
|
2014-02-06 09:45:26 +01:00
|
|
|
|
|
|
|
<property name="debug.jar.name" value="${jar.dest.dir}/smackx-debug-${version}.jar" />
|
|
|
|
<copy todir="${compile.dir}/images">
|
2004-01-02 15:08:38 +01:00
|
|
|
<fileset dir="${basedir}/build/resources/images">
|
|
|
|
<include name="*.png"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
2014-01-16 06:14:39 +01:00
|
|
|
<jar destfile="${debug.jar.name}"
|
2003-11-15 21:28:56 +01:00
|
|
|
basedir="${compile.dir}"
|
2011-12-21 15:27:06 +01:00
|
|
|
includes="org/jivesoftware/smackx/debugger/*.class, **/*.png">
|
2003-10-23 19:42:16 +02:00
|
|
|
<manifest>
|
|
|
|
<attribute name="Class-Path" value="smack.jar" />
|
|
|
|
</manifest>
|
2011-12-21 15:27:06 +01:00
|
|
|
</jar>
|
2014-01-16 06:14:39 +01:00
|
|
|
<bndwrap jars="${debug.jar.name}" output="${debug.jar.name}" />
|
|
|
|
<jar file="${debug.jar.name}" update="true">
|
2011-12-21 15:27:06 +01:00
|
|
|
<manifest>
|
2014-01-26 15:49:45 +01:00
|
|
|
<attribute name="Bundle-SymbolicName" value="${bundle.name}-debug" />
|
|
|
|
<attribute name="Bundle-Version" value="${version}" />
|
|
|
|
<attribute name="Fragment-Host" value="${bundle.name};bundle-version=${version}" />
|
2011-12-21 15:27:06 +01:00
|
|
|
</manifest>
|
2007-02-20 18:50:29 +01:00
|
|
|
</jar>
|
2014-02-06 09:45:26 +01:00
|
|
|
|
|
|
|
<property name="jingle.jar.name" value="${jar.dest.dir}/smackx-jingle-${version}.jar" />
|
2014-01-16 06:14:39 +01:00
|
|
|
<jar destfile="${jingle.jar.name}"
|
2007-02-20 18:50:29 +01:00
|
|
|
basedir="${compile.dir}/jingle/extension"
|
2011-12-21 15:27:06 +01:00
|
|
|
includes="org/jivesoftware/smackx/**/*.class">
|
2007-02-20 18:50:29 +01:00
|
|
|
<manifest>
|
|
|
|
<attribute name="Class-Path" value="smack.jar, smackx.jar" />
|
|
|
|
</manifest>
|
2008-10-31 05:30:17 +01:00
|
|
|
<zipfileset src="${jingle.extension.merge.lib.dir}/jstun.jar"/>
|
2003-10-23 19:42:16 +02:00
|
|
|
</jar>
|
2014-01-16 06:14:39 +01:00
|
|
|
<bndwrap jars="${jingle.jar.name}" output="${jingle.jar.name}" />
|
|
|
|
<jar file="${jingle.jar.name}" update="true">
|
2011-12-21 15:27:06 +01:00
|
|
|
<manifest>
|
2014-01-26 15:49:45 +01:00
|
|
|
<attribute name="Bundle-SymbolicName" value="${bundle.name}-jingle" />
|
|
|
|
<attribute name="Bundle-Version" value="${version}" />
|
|
|
|
<attribute name="Fragment-Host" value="${bundle.name};bundle-version=${version}" />
|
2014-01-20 03:25:35 +01:00
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
|
2014-02-06 09:45:26 +01:00
|
|
|
<property name="workgroup.jar.name" value="${jar.dest.dir}/smackx-workgroup-${version}.jar" />
|
2014-01-20 03:25:35 +01:00
|
|
|
<copy todir="${compile.dir}/workgroup/META-INF" file="${basedir}/workgroup/resources/META-INF/workgroup.providers" />
|
|
|
|
<jar destfile="${workgroup.jar.name}"
|
|
|
|
basedir="${compile.dir}/workgroup"
|
|
|
|
includes="org/jivesoftware/smackx/workgroup/**/*.class, **/workgroup.providers">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Class-Path" value="smack.jar, smackx.jar" />
|
2011-12-21 15:27:06 +01:00
|
|
|
</manifest>
|
|
|
|
</jar>
|
2014-01-20 03:25:35 +01:00
|
|
|
<bndwrap jars="${workgroup.jar.name}" output="${workgroup.jar.name}" />
|
|
|
|
<jar file="${workgroup.jar.name}" update="true">
|
|
|
|
<manifest>
|
2014-01-26 15:49:45 +01:00
|
|
|
<attribute name="Bundle-SymbolicName" value="${bundle.name}-workgroup" />
|
|
|
|
<attribute name="Bundle-Version" value="${version}" />
|
|
|
|
<attribute name="Fragment-Host" value="${bundle.name};bundle-version=${version}" />
|
2014-01-20 03:25:35 +01:00
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
|
2014-02-06 09:45:26 +01:00
|
|
|
<property name="experimental.jar.name" value="${jar.dest.dir}/smackx-experimental-${experimental.version}.jar" />
|
2014-01-31 04:41:25 +01:00
|
|
|
<copy todir="${compile.dir}/experimental/META-INF" file="${basedir}/experimental/resources/META-INF/experimental.providers" />
|
|
|
|
<jar destfile="${experimental.jar.name}"
|
|
|
|
basedir="${compile.dir}/experimental"
|
|
|
|
includes="org/jivesoftware/smackx/**/*.class, **/experimental.providers">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Class-Path" value="smack.jar, smackx.jar" />
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
<bndwrap jars="${experimental.jar.name}" output="${experimental.jar.name}" />
|
|
|
|
<jar file="${experimental.jar.name}" update="true">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Bundle-SymbolicName" value="${bundle.name}-experimental" />
|
|
|
|
<attribute name="Bundle-Version" value="${version}" />
|
|
|
|
<attribute name="Fragment-Host" value="${bundle.name};bundle-version=${experimental.version}" />
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
|
2014-01-20 03:25:35 +01:00
|
|
|
<!--
|
2014-02-06 09:45:26 +01:00
|
|
|
<delete file="${compile.dir}/META-INF/smack-config.xml" />
|
2014-01-16 06:14:39 +01:00
|
|
|
<delete file="${compile.dir}/META-INF/*.providers" />
|
2004-01-02 15:08:38 +01:00
|
|
|
<delete>
|
|
|
|
<fileset dir="${compile.dir}/images">
|
|
|
|
<include name="*.png"/>
|
|
|
|
</fileset>
|
|
|
|
</delete>
|
2014-01-20 03:25:35 +01:00
|
|
|
-->
|
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">
|
2014-01-22 05:00:03 +01:00
|
|
|
<copy todir="${compile.test.dir}/META-INF" file="${basedir}/build/resources/META-INF/jul.properties" />
|
|
|
|
<copy todir="${compile.test.dir}/META-INF" file="${basedir}/build/resources/META-INF/smack-config.xml" />
|
|
|
|
<copy todir="${compile.test.dir}/META-INF" file="${basedir}/build/resources/META-INF/core.providers" />
|
2003-08-02 19:32:38 +02:00
|
|
|
<jar destfile="${jar.dest.dir}/smack-test.jar"
|
|
|
|
basedir="${compile.test.dir}"
|
2014-01-22 05:00:03 +01:00
|
|
|
includes="org/jivesoftware/smack/**/*.class, **/smack-config.xml, **/core.providers, **/jul.properties"
|
2003-08-02 19:32:38 +02:00
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
2013-01-21 12:35:56 +01:00
|
|
|
<target name="jar-test-smackx" depends="compile-test" description="Produces jar of test code">
|
2014-01-22 05:00:03 +01:00
|
|
|
<copy todir="${compile.test.dir}/META-INF" file="${basedir}/build/resources/META-INF/extension.providers" />
|
2013-01-21 12:35:56 +01:00
|
|
|
<jar destfile="${jar.dest.dir}/smack-test-smackx.jar"
|
|
|
|
basedir="${compile.test.dir}"
|
2014-01-22 05:00:03 +01:00
|
|
|
includes="org/jivesoftware/smackx/**/*.class, org/jivesoftware/util/**/*.class, **/extension.providers"
|
2013-01-21 12:35:56 +01:00
|
|
|
/>
|
|
|
|
</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.*"
|
2007-02-19 23:17:27 +01:00
|
|
|
excludepackagenames="org.jivesoftware.smack.util.collections"
|
2003-01-15 01:33:52 +01:00
|
|
|
sourcepath="${basedir}/source"
|
|
|
|
destdir="${javadoc.dest.dir}"
|
|
|
|
author="true"
|
2007-02-05 19:38:37 +01:00
|
|
|
windowtitle="Smack ${version} Documentation"
|
2003-03-10 00:08:17 +01:00
|
|
|
overview="${basedir}/source/overview.html"
|
2003-01-15 01:33:52 +01:00
|
|
|
>
|
|
|
|
<classpath>
|
2003-01-24 03:44:25 +01:00
|
|
|
<fileset dir="${merge.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
2003-01-15 01:33:52 +01:00
|
|
|
</fileset>
|
|
|
|
</classpath>
|
2007-02-06 21:08:19 +01:00
|
|
|
<doctitle><![CDATA[<font face="arial,helvetica">Smack ${version}</font>]]></doctitle>
|
2003-01-16 21:42:29 +01:00
|
|
|
<header><![CDATA[<b>Smack</b>]]></header>
|
2007-02-19 23:17:27 +01:00
|
|
|
<bottom><![CDATA[<i>Copyright © 2003-2007 Jive Software. </i>]]></bottom>
|
2003-01-15 01:33:52 +01:00
|
|
|
<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>
|
2014-01-20 03:25:35 +01:00
|
|
|
</target>
|
2003-01-15 01:33:52 +01:00
|
|
|
|
|
|
|
|
2005-10-25 19:14:52 +02:00
|
|
|
<!-- test -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="func-test" depends="compile, jar-test" unless="no.test">
|
|
|
|
<antcall target="test.messenger"/>
|
|
|
|
<antcall target="test"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2003-08-02 19:32:38 +02:00
|
|
|
<!-- test -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="test" depends="compile, jar-test" unless="no.test">
|
2003-08-19 19:44:45 +02:00
|
|
|
|
2003-09-28 20:45:09 +02:00
|
|
|
<echo>
|
|
|
|
|
|
|
|
|
|
|
|
**** no.test: ${no.test}
|
|
|
|
|
|
|
|
|
|
|
|
</echo>
|
|
|
|
|
2003-08-19 19:44:45 +02:00
|
|
|
<property name="test.messenger" value="false" />
|
|
|
|
|
|
|
|
<if>
|
|
|
|
<not><equals arg1="test.messenger" arg2="true" /></not>
|
|
|
|
<then>
|
|
|
|
<property name="test.classes" value="test.cases" />
|
|
|
|
</then>
|
|
|
|
</if>
|
|
|
|
|
2003-08-02 19:32:38 +02:00
|
|
|
<junit printsummary="on"
|
2005-10-22 02:51:17 +02:00
|
|
|
fork="true"
|
2003-08-02 19:32:38 +02:00
|
|
|
haltonfailure="false"
|
|
|
|
failureproperty="tests.failed"
|
|
|
|
showoutput="true">
|
|
|
|
|
2003-08-19 19:44:45 +02:00
|
|
|
<sysproperty key="smack.test.host" value="${test.host}" />
|
|
|
|
<sysproperty key="smack.test.port" value="${test.port}" />
|
|
|
|
<sysproperty key="smack.test.admin.username" value="${test.admin.username}" />
|
|
|
|
<sysproperty key="smack.test.admin.password" value="${test.admin.password}" />
|
|
|
|
<sysproperty key="smack.test.admin.resource" value="${test.admin.resource}" />
|
|
|
|
<sysproperty key="smack.debug" value="${test.smack.debug}" />
|
|
|
|
|
2003-08-02 19:32:38 +02:00
|
|
|
<classpath>
|
|
|
|
<fileset dir="${merge.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
2012-11-22 03:05:04 +01:00
|
|
|
<fileset dir="${basedir}/build">
|
|
|
|
<include name="junit-4.10.jar"/>
|
|
|
|
<include name="mockito-all-1.8.2.jar"/>
|
|
|
|
<include name="powermock-mockito-1.3.5-full.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir ="${basedir}/build/build">
|
2013-01-21 11:35:20 +01:00
|
|
|
<include name="xmlunit.jar"/>
|
|
|
|
<include name="java-xmlbuilder-0.3.jar" />
|
2012-11-22 03:05:04 +01:00
|
|
|
</fileset>
|
2010-02-18 14:38:57 +01:00
|
|
|
<fileset dir="${jar.dest.dir}">
|
2003-08-02 19:32:38 +02:00
|
|
|
<include name="smack-test.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<pathelement location="${compile.dir}" />
|
2005-10-22 02:51:17 +02:00
|
|
|
<pathelement location="${test.dir}" />
|
|
|
|
<pathelement location="${resources.dir}" />
|
2003-08-02 19:32:38 +02:00
|
|
|
</classpath>
|
|
|
|
|
|
|
|
<formatter type="brief" usefile="false"/>
|
|
|
|
|
|
|
|
<batchtest>
|
|
|
|
<fileset dir="${basedir}/test">
|
2003-08-19 19:44:45 +02:00
|
|
|
<patternset refid="${test.classes}" />
|
2003-08-02 19:32:38 +02:00
|
|
|
</fileset>
|
|
|
|
</batchtest>
|
|
|
|
</junit>
|
|
|
|
|
2003-08-19 19:44:45 +02:00
|
|
|
<fail if="tests.failed" message="** Tests failed, see test log. **" />
|
|
|
|
</target>
|
|
|
|
|
2012-11-22 03:05:04 +01:00
|
|
|
<!-- test-unit -->
|
|
|
|
<!-- ======================================================================================= -->
|
2013-01-21 12:35:56 +01:00
|
|
|
<target name="test-unit" depends="compile, jar-test, jar-test-smackx" unless="no.test">
|
2012-11-22 03:05:04 +01:00
|
|
|
<junit printsummary="on"
|
2014-01-22 05:00:03 +01:00
|
|
|
fork="false"
|
2012-11-22 03:05:04 +01:00
|
|
|
haltonfailure="false"
|
|
|
|
failureproperty="tests.failed"
|
|
|
|
showoutput="true">
|
|
|
|
|
|
|
|
<classpath>
|
|
|
|
<fileset dir="${merge.lib.dir}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="${basedir}/build">
|
|
|
|
<include name="junit-4.10.jar"/>
|
|
|
|
<include name="mockito-all-1.8.2.jar"/>
|
|
|
|
<include name="powermock-mockito-1.3.5-full.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir ="${basedir}/build/build">
|
2013-01-21 11:35:20 +01:00
|
|
|
<include name="xmlunit.jar"/>
|
|
|
|
<include name="java-xmlbuilder-0.3.jar" />
|
2012-11-22 03:05:04 +01:00
|
|
|
</fileset>
|
|
|
|
<fileset dir="${jar.dest.dir}">
|
|
|
|
<include name="smack-test.jar"/>
|
2014-01-22 05:00:03 +01:00
|
|
|
<include name="smack-test-smackx.jar" />
|
2012-11-22 03:05:04 +01:00
|
|
|
</fileset>
|
|
|
|
<pathelement location="${compile.dir}" />
|
|
|
|
<pathelement location="${test-unit.dir}" />
|
|
|
|
<pathelement location="${resources.dir}" />
|
|
|
|
</classpath>
|
|
|
|
|
|
|
|
<formatter type="brief" usefile="false"/>
|
|
|
|
|
|
|
|
<batchtest>
|
|
|
|
<fileset dir="${basedir}/test-unit">
|
|
|
|
<patternset refid="test.cases" />
|
|
|
|
</fileset>
|
|
|
|
</batchtest>
|
|
|
|
</junit>
|
|
|
|
|
|
|
|
<fail if="tests.failed" message="** Tests failed, see test log. **" />
|
|
|
|
</target>
|
2003-08-19 19:44:45 +02:00
|
|
|
|
|
|
|
<!-- test -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="test.messenger" depends="compile, jar-test" unless="no.test">
|
|
|
|
<antcall target="test" inheritall="true" inheritrefs="true">
|
|
|
|
<param name="test.messenger" value="true" />
|
|
|
|
<param name="test.classes" value="messenger.test.cases" />
|
|
|
|
</antcall>
|
2003-08-02 19:32:38 +02:00
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2003-01-20 16:57:33 +01:00
|
|
|
<!-- release -->
|
|
|
|
<!-- ======================================================================================= -->
|
2014-02-06 18:10:15 +01:00
|
|
|
<target name="release" description="Builds a release" depends="jar,javadoc">
|
2003-01-20 16:57:33 +01:00
|
|
|
<ant antfile="${basedir}/build/release.xml" />
|
|
|
|
</target>
|
|
|
|
|
2013-01-21 11:35:20 +01:00
|
|
|
<!-- checkcode -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="checkcode" >
|
|
|
|
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${basedir}/build/pmd.jar" />
|
|
|
|
<pathelement location="${basedir}/build/asm.jar" />
|
|
|
|
<pathelement location="${basedir}/build/jaxen.jar" />
|
|
|
|
</classpath>
|
|
|
|
</taskdef>
|
|
|
|
<pmd shortFilenames="true">
|
|
|
|
<ruleset>migrating</ruleset>
|
|
|
|
<ruleset>finalizers</ruleset>
|
|
|
|
<formatter type="html" toFile="target/pmd_report.html" toConsole="true" />
|
|
|
|
<fileset dir="source/">
|
|
|
|
<include name="**/*.java" />
|
|
|
|
</fileset>
|
|
|
|
</pmd>
|
|
|
|
</target>
|
|
|
|
|
2003-01-15 01:33:52 +01:00
|
|
|
<!-- clean -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="clean" description="Deletes all generated content.">
|
2013-01-21 11:35:20 +01:00
|
|
|
<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" />
|
2003-11-15 21:28:56 +01:00
|
|
|
<delete file="${basedir}/smackx-debug.jar" />
|
2003-08-02 19:32:38 +02:00
|
|
|
<delete file="${basedir}/smack-test.jar" />
|
2013-01-21 12:35:56 +01:00
|
|
|
<delete file="${basedir}/smackx-test.jar" />
|
2013-01-21 11:35:20 +01:00
|
|
|
<delete file="${basedir}/smackx-jingle.jar" />
|
2007-02-06 19:01:06 +01:00
|
|
|
<delete dir="${basedir}/target" />
|
2003-01-15 01:33:52 +01:00
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|
2014-02-06 10:18:27 +01:00
|
|
|
|
|
|
|
<!-- Local Variables: -->
|
|
|
|
<!-- indent-tabs-mode: nil -->
|
|
|
|
<!-- End: -->
|