mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-14 00:02:05 +01:00
d7d534702a
* Added target to test release by calling ant targets of generated build. * Added test classes & junit to dist. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2014 b35dd754-fafc-0310-a699-88a17e54d16e
128 lines
4.6 KiB
XML
128 lines
4.6 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="MMM-dd-yyyy" locale="en"/>
|
|
</tstamp>
|
|
<property name="release.name" value="smack-${build.date}" />
|
|
</then>
|
|
<else>
|
|
<property name="release.name" value="smack-${version.name}" />
|
|
</else>
|
|
</if>
|
|
<property name="release.dir" value="${basedir}/release/${release.name}" />
|
|
<!-- create release dirs -->
|
|
<mkdir dir="${release.dir}" />
|
|
<!-- Copy smack.jar -->
|
|
<copy todir="${release.dir}">
|
|
<fileset dir="${jar.dest.dir}" includes="smack.jar" />
|
|
<fileset dir="${jar.dest.dir}" includes="smackx.jar" />
|
|
</copy>
|
|
<!-- Copy build dir -->
|
|
<copy todir="${release.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" />
|
|
</fileset>
|
|
</copy>
|
|
<!-- Copy Javadocs -->
|
|
<copy todir="${release.dir}/javadoc">
|
|
<fileset dir="${basedir}/javadoc" includes="**/*.*" />
|
|
</copy>
|
|
<!-- Copy documentation -->
|
|
<copy todir="${release.dir}/documentation">
|
|
<fileset dir="${basedir}/documentation" includes="**/*.*" />
|
|
</copy>
|
|
<!-- Copy source -->
|
|
<copy todir="${release.dir}/source">
|
|
<fileset dir="${basedir}/source" includes="**/*.java" />
|
|
<fileset dir="${basedir}/source" includes="**/*.html" />
|
|
</copy>
|
|
<copy todir="${release.dir}/test">
|
|
<fileset dir="${basedir}/test" includes="**/*.java" />
|
|
</copy>
|
|
<!-- Copy resources -->
|
|
<copy todir="${release.dir}/resources">
|
|
<fileset dir="${basedir}/resources" includes="META-INF/smack.providers" />
|
|
</copy>
|
|
<!-- Copy readme.html and changelog.html -->
|
|
<copy todir="${release.dir}">
|
|
<fileset dir="${basedir}/resources/releasedocs" includes="*.html" />
|
|
</copy>
|
|
<!-- Package -->
|
|
<zip destfile="${basedir}/release/${release.name}.zip"
|
|
basedir="${release.dir}/.."
|
|
includes="${release.name}/**/*.*"
|
|
/>
|
|
<tar destfile="${basedir}/release/${release.name}.tar.gz"
|
|
basedir="${release.dir}/.."
|
|
includes="${release.name}/**/*.*"
|
|
compression="gzip"
|
|
/>
|
|
|
|
<echo>
|
|
-----------------------------------------------
|
|
Release made, testing Ant targets of release...
|
|
-----------------------------------------------
|
|
</echo>
|
|
|
|
<!-- call the release tester -->
|
|
<antcall target="test" />
|
|
</target>
|
|
|
|
<!-- all -->
|
|
<!-- ======================================================================================= -->
|
|
<target name="test">
|
|
<ant dir="${release.dir}" antfile="build/build.xml" target="jar" inheritAll="false">
|
|
<property name="no.test" value="true" />
|
|
</ant>
|
|
<ant dir="${release.dir}" antfile="build/build.xml" target="javadoc" inheritAll="false">
|
|
<property name="no.test" value="true" />
|
|
</ant>
|
|
<ant dir="${release.dir}" antfile="build/build.xml" target="clean" inheritAll="false">
|
|
<property name="no.test" value="true" />
|
|
</ant>
|
|
|
|
<echo>
|
|
----------------------------
|
|
...release tests pass, done.
|
|
----------------------------
|
|
</echo>
|
|
</target>
|
|
|
|
|
|
</project>
|