blob: c024f0c6dc17db234da59792c4e1d473573b2d45 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: dist-build.xml,v 1.7 2004/04/05 10:09:37 michi Exp $ -->
<project name="dist">
<description>
Distribution Targets
</description>
<!--
The dist target prepares the binary distribution tarball for
end users. It forces a complete rebuild of everything through its
dependency on the "clean" target in order to prevent garbage
like the cocoon logfiles from ending up in the distribution tarball.
-->
<target name="prepare-dist" depends="distclean,war">
<copy todir="${dist.root}/${fullname}">
<fileset dir="${basedir}">
<include name="INSTALL*"/>
<include name="README.txt"/>
</fileset>
</copy>
</target>
<target name="dist-bin" depends="prepare-dist" description="Build a regular binary distribution tar ball">
<tar tarfile="${dist.bin.dir}.tar" basedir="${dist.root}" includes="${fullname}/**"/>
<gzip zipfile="${dist.bin.dir}.tar.gz" src="${dist.bin.dir}.tar"/>
<delete file="${dist.bin.dir}.tar"/>
</target>
<!--
The dist target prepares the binary distribution tarball for
end users. It forces a complete rebuild of everything through its
dependency on the "clean" target in order to prevent garbage
like the cocoon logfiles from ending up in the distribution tarball.
-->
<target name="snapshot-bin" depends="prepare-dist" description="Build a snapshot binary distribution tar ball (the same as 'dist' except for the filename)">
<copy todir="${snapshot.bin.dir}">
<fileset dir="${dist.root}/${fullname}"/>
</copy>
<tar tarfile="${snapshot.bin.dir}.tar" basedir="${dist.root}" includes="${fullname}-bin-${SNAPSHOT_STAMP}/**"/>
<gzip zipfile="${snapshot.bin.dir}.tar.gz" src="${snapshot.bin.dir}.tar"/>
<delete file="${snapshot.bin.dir}.tar"/>
<zip zipfile="${snapshot.bin.dir}.zip" basedir="${dist.root}/${fullname}-bin-${SNAPSHOT_STAMP}"/>
</target>
<!--
The dist-src target prepares the source distribution tarball for
developers. It also depends on the clean target to remove all build stuff.
-->
<target name="prepare-dist-src" depends="distclean">
<mkdir dir="${dist.src.dir}"/>
<copy todir="${dist.src.dir}">
<fileset dir=".">
<exclude name="build.properties"/>
<exclude name=".classpath"/>
<exclude name=".cvsignore"/>
<exclude name=".project"/>
</fileset>
</copy>
</target>
<target name="dist-src" depends="prepare-dist-src" description="Builds a regular tar ball containing the sources for developers">
<tar tarfile="${dist.src.dir}.tar" basedir="${dist.root}" includes="${fullname}-src/**"/>
<gzip zipfile="${dist.src.dir}.tar.gz" src="${dist.src.dir}.tar"/>
<delete file="${dist.src.dir}.tar"/>
</target>
<!--
The dist target prepares the binary distribution tarball for
end users. It forces a complete rebuild of everything through its
dependency on the "clean" target in order to prevent garbage
like the cocoon logfiles from ending up in the distribution tarball.
-->
<target name="snapshot-src" depends="prepare-dist-src" description="Builds a snapshot tar ball containing the sources for developers (the same as 'dist-src' except for the filename)">
<copy todir="${snapshot.src.dir}">
<fileset dir="${dist.src.dir}"/>
</copy>
<tar tarfile="${snapshot.src.dir}.tar" basedir="${dist.root}" includes="${fullname}-src-${SNAPSHOT_STAMP}/**"/>
<gzip zipfile="${snapshot.src.dir}.tar.gz" src="${snapshot.src.dir}.tar"/>
<delete file="${snapshot.src.dir}.tar"/>
</target>
<target name="distclean" depends="clean" description="Cleans everything to the original state">
<delete dir="${build.root}"/>
<delete dir="${dist.root}"/>
</target>
<target name="zip-webapp" depends="init" description="Zips the webapp in order to deploy within another servlet container">
<echo>Create ./${build.dir}/${fullname}-bin-${SNAPSHOT_STAMP}.tar.gz</echo>
<tar tarfile="./${build.dir}/${fullname}-bin-${SNAPSHOT_STAMP}.tar" basedir="${build.webapp}"/>
<gzip zipfile="./${build.dir}/${fullname}-bin-${SNAPSHOT_STAMP}.tar.gz" src="./${build.dir}/${fullname}-bin-${SNAPSHOT_STAMP}.tar"/>
<delete file="./${build.dir}/${fullname}-bin-${SNAPSHOT_STAMP}.tar"/>
</target>
</project>