1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-14 00:02:05 +01:00
Smack/build/release.xml
rcollier f155cb4d07 SMACK-286 Made ProviderManager much more configurable.
Separated the reading of provider files from the ProviderManager.  Manager now only manages.  Added ability to add collections of providers to the manager via a ProviderLoader, of which there is one default implementation which loads from the default file format.  Now provider files can be programmatically added at any time.  Also updated the configuration abilities so that a provider file can also be set via VM arg, as well as the smack configuration itself. Introduced Java Util Logging as well.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_4_0@13861 b35dd754-fafc-0310-a699-88a17e54d16e
2014-01-16 05:14:39 +00:00

228 lines
9.7 KiB
XML

<?xml version="1.0"?>
<!-- Smack Build Script ========================================== -->
<!-- Jive Software ============================================== -->
<!--
$RCSfile$
$Revision$
$Date$
-->
<project name="Smack Release Script" default="all" basedir="..">
<!-- Include Ant Optional Tasks -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${basedir}/build/ant-contrib.jar"/>
</classpath>
</taskdef>
<!-- PROPERTIES -->
<!-- ======================================================================================= -->
<!-- TARGETS -->
<!-- ======================================================================================= -->
<!-- all -->
<!-- ======================================================================================= -->
<target name="all">
<!-- create release properties -->
<if>
<equals arg1="${dailybuild}" arg2="true" />
<then>
<tstamp>
<format property="build.date" pattern="yyyy-MM-dd" locale="en"/>
</tstamp>
<property name="release.name" value="smack-${build.date}" />
<property name="release-dev.name" value="smack_src_${build.date}" />
</then>
<else>
<property name="release.name" value="smack_${version.filename}" />
<property name="release-dev.name" value="smack_src_${version.filename}" />
</else>
</if>
<property name="release.dir" value="${basedir}/target/release/${release.name}" />
<property name="release.samples.dir" value="${release.dir}/samples" />
<property name="release-dev.dir" value="${basedir}/target/release/${release-dev.name}" />
<property name="release-dev.samples.dir" value="${release-dev.name}/samples" />
<!-- create release dirs -->
<mkdir dir="${release.dir}" />
<mkdir dir="${release.samples.dir}" />
<mkdir dir="${release-dev.dir}" />
<mkdir dir="${release-dev.dir.samples}/samples" />
<!-- Copy smack.jar -->
<copy todir="${release.dir}">
<fileset dir="${jar.dest.dir}" includes="smack.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx-debug.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx-jingle.jar" />
</copy>
<copy todir="${release.samples.dir}">
<fileset dir="${basedir}/build/resources/META-INF" includes="sample.providers" />
<fileset dir="${basedir}/build/resources/META-INF" includes="smack-config.xml" />
</copy>
<copy todir="${release-dev.dir}">
<fileset dir="${jar.dest.dir}" includes="smack.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx-debug.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx-jingle.jar" />
</copy>
<copy todir="${release-dev.samples.dir}">
<fileset dir="${basedir}/build/resources/META-INF" includes="sample.providers" />
<fileset dir="${basedir}/build/resources/META-INF" includes="smack-config" />
</copy>
<!-- Copy build dir -->
<copy todir="${release-dev.dir}/build">
<fileset dir="${basedir}/build">
<include name="ant*" />
<include name="junit.jar" />
<include name="build.xml" />
<include name="README.html" />
<include name="lib/*.jar" />
<include name="merge/*.jar" />
<include name="build/*.jar" />
</fileset>
</copy>
<copy todir="${release-dev.dir}/jingle/extension/build">
<fileset dir="${basedir}/jingle/extension/build">
<include name="ant*" />
<include name="junit.jar" />
<include name="build.xml" />
<include name="README.html" />
<include name="lib/*.jar" />
<include name="merge/*.jar" />
</fileset>
</copy>
<!-- Copy Javadocs -->
<copy todir="${release.dir}/javadoc">
<fileset dir="${basedir}/target/javadoc" includes="**/*.*" />
</copy>
<copy todir="${release-dev.dir}/javadoc">
<fileset dir="${basedir}/target/javadoc" includes="**/*.*" />
</copy>
<!-- Copy documentation -->
<copy todir="${release.dir}/documentation">
<fileset dir="${basedir}/documentation" includes="**/*.*" />
</copy>
<copy todir="${release-dev.dir}/documentation">
<fileset dir="${basedir}/documentation" includes="**/*.*" />
</copy>
<!-- Copy source -->
<copy todir="${release-dev.dir}/source">
<fileset dir="${basedir}/source" includes="**/*.java" />
<fileset dir="${basedir}/source" includes="**/*.html" />
</copy>
<copy todir="${release-dev.dir}/jingle/extension/source">
<fileset dir="${basedir}/jingle/extension/source" includes="**/*.java" />
<fileset dir="${basedir}/jingle/extension/source" includes="**/*.html" />
</copy>
<copy todir="${release-dev.dir}/test">
<fileset dir="${basedir}/test" includes="**/*.java" />
</copy>
<!-- Copy resources -->
<copy todir="${release-dev.dir}/build/resources">
<fileset dir="${basedir}/build/resources" includes="META-INF/core.providers" />
<fileset dir="${basedir}/build/resources" includes="META-INF/extension.providers" />
<fileset dir="${basedir}/build/resources" includes="META-INF/sample.providers" />
<fileset dir="${basedir}/build/resources" includes="META-INF/jul.properties" />
<fileset dir="${basedir}/build/resources" includes="META-INF/smack-config.xml" />
</copy>
<copy todir="${release-dev.dir}/build/resources/images">
<fileset dir="${basedir}/build/resources/images">
<include name="*.png"/>
</fileset>
</copy>
<!-- Copy readme.html and changelog.html -->
<copy todir="${release.dir}">
<fileset dir="${basedir}/build/resources/releasedocs" includes="*.html" />
<filterset>
<filter token="builddate" value="${builddate}"/>
<filter token="version" value="${version}"/>
</filterset>
</copy>
<copy todir="${release-dev.dir}">
<fileset dir="${basedir}/build/resources/releasedocs" includes="*.html" />
<filterset>
<filter token="builddate" value="${builddate}"/>
<filter token="version" value="${version}"/>
</filterset>
</copy>
<!-- Package -->
<if>
<equals arg1="${dailybuild}" arg2="true" />
<then>
<zip destfile="${basedir}/target/release/${release-dev.name}.zip"
basedir="${release-dev.dir}/.."
includes="${release-dev.name}/**/*.*"
/>
<tar destfile="${basedir}/target/release/${release-dev.name}.tar.gz"
basedir="${release-dev.dir}/.."
includes="${release-dev.name}/**/*.*"
compression="gzip"
/>
</then>
<else>
<zip destfile="${basedir}/target/release/${release.name}.zip"
basedir="${release.dir}/.."
includes="${release.name}/**/*.*"
/>
<tar destfile="${basedir}/target/release/${release.name}.tar.gz"
basedir="${release.dir}/.."
includes="${release.name}/**/*.*"
compression="gzip"
/>
<zip destfile="${basedir}/target/release/${release-dev.name}.zip"
basedir="${release-dev.dir}/.."
includes="${release-dev.name}/**/*.*"
/>
<tar destfile="${basedir}/target/release/${release-dev.name}.tar.gz"
basedir="${release-dev.dir}/.."
includes="${release-dev.name}/**/*.*"
compression="gzip"
/>
</else>
</if>
<echo>
-----------------------------------------------
Release made, testing Ant targets of release...
-----------------------------------------------
</echo>
<!-- call the release tester -->
<antcall target="test" />
</target>
<!-- test -->
<!-- ======================================================================================= -->
<target name="test">
<property name="testdir" value="${release-dev.dir}/.test" />
<!-- copy the build to a temp dir so we can run sanity tests -->
<mkdir dir="${testdir}" />
<copy todir="${testdir}">
<fileset dir="${release-dev.dir}">
<exclude name=".test/**/*.*" />
</fileset>
</copy>
<!-- run sanity tests -->
<ant dir="${testdir}" antfile="build/build.xml" target="jar" inheritAll="false">
<property name="no.test" value="true" />
</ant>
<ant dir="${testdir}" antfile="build/build.xml" target="javadoc" inheritAll="false">
<property name="no.test" value="true" />
</ant>
<ant dir="${testdir}" antfile="build/build.xml" target="clean" inheritAll="false">
<property name="no.test" value="true" />
</ant>
<echo>
----------------------------
...release tests pass, done.
----------------------------
</echo>
</target>
</project>