Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

202 lines (177 sloc) 7.73 KB
<?xml version="1.0"?>
+ iUI Ant Buildfile
+ For help, open a command-line window and set yoru current directory to
+ the iui project root. Then type "ant -p" for help...
+ Copyright (c) 2007-2009, iUI Project Members
+ See LICENSE.txt for licensing terms
<project name="iui" default="releasedir" basedir=".">
Build file for iUI distributions
Targets marked with an "*" (asterisk) are useful when you have local modifications to iUI
Targets marked with an "r" are typically used only by the iUI team for building releases
To run a target type "ant [targetname]"
<!-- If you wish to override build settings, create a file called in
The project root. SVN is configured to ignore this file, so it won't accidentally be
checked in. Note that in Ant, whatever sets a property first "wins". -->
<property file="" />
<loadproperties srcFile="" /> <!-- Required -->
<!-- If version undefined at this point, use a timestamp -->
<tstamp />
<!-- <property name="iui.version" value="v${DSTAMP}-${TSTAMP}" /> -->
<property name="iui.version" value="v${DSTAMP}" />
<property name="iui.release.summary" value="Release summary goes here" />
<property name="iui.dash.vers" value="iui-${iui.version}" />
<property name="tarfilename" value="${iui.dash.vers}.tar.gz" />
<property name="zipfilename" value="${iui.dash.vers}.zip" />
<property name="src.dir.webapp" location="web-app" />
<property name="src.dir.iui" location="${src.dir.webapp}/iui" />
<property name="target.dir" location="target" />
<property name="release.dir" location="${target.dir}/${iui.dash.vers}" />
<property name="release.dir.webapp" location="${target.dir}/${iui.dash.vers}/web-app" />
<property name="tarfile" location="${target.dir}/${tarfilename}" />
<property name="zipfile" location="${target.dir}/${zipfilename}" />
<path id="compress-js.path">
<fileset dir="releasetools/lib">
<include name="compress-js.jar"/>
<include name="custom_rhino_from_lcasoft.jar"/>
<path id="yui-compressor.path">
<fileset dir="releasetools/lib">
<include name="yuicompressor-2.2.5.jar"/>
<include name="yui-rhino-1.6R7.jar"/>
<include name="yui-jargs-1.0.jar"/>
<path id="ant-googlecode.path">
<fileset dir="releasetools/lib">
<include name="ant-googlecode-0.0.0test.jar"/>
<!-- Define extension Ant tasks that aren't part of the standard Ant distro -->
<taskdef name="compress-js" classname=""
classpathref="compress-js.path" />
<taskdef name="GoogleCodeUploadTask" classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask"
classpathref="ant-googlecode.path" />
<!-- Ant targets, use "ant -p" for easier reading of the "description" attributes -->
<target name="compress-js" depends="docopy" description="* - Create iuix.js by compressing iui.js">
<mkdir dir="${release.dir}" />
<compress-js file="${src.dir.iui}/iui.js"
stripCR="true" />
<!-- TODO: Compress/Concat extensions & optional files -->
<!-- Compress CSS using Yahoo YUI Compressor -->
<target name="compress-css" depends="docopy" description="* - Create iuix.css by compressing iui.css">
<java jar="releasetools/lib/yuicompressor-2.2.5.jar" fork="true" classpathref="yui-compressor.path">
<arg value="--type"/>
<arg value="css"/>
<arg value="${src.dir.iui}/iui.css" />
<arg value="-o"/>
<arg value="${release.dir.webapp}/iui/iuix.css"/>
<!-- TODO: Compress/Concat themes & extensions -->
<target name="docopy" description="* - Copy Files to release directory">
<mkdir dir="${release.dir.webapp}/iui"/>
<!-- Copy subset of files of project root to release root -->
<copy todir="${release.dir}">
<fileset dir="${basedir}">
<include name="*.txt"/>
<include name="*.sh"/>
<!-- Copy iUI images, css, and js -->
<copy todir="${release.dir.webapp}">
<fileset dir="${src.dir.webapp}">
<exclude name="**/*.jar"/>
<filter token="VERSION" value="${iui.version}"/>
<!-- Make second copy of sample.html in samplex.html that uses iuix.css and iuix.js -->
<!-- Disable for now...
<copy todir="${release.dir}/samples">
<fileset dir="samples">
<include name="*.html"/>
<globmapper from="*.html" to="*x.html"/>
<replaceregex pattern="../iui/iui.css" replace="../iui/iuix.css" flags="g"/>
<replaceregex pattern="../iui/iui.js" replace="../iui/iuix.js" flags="g"/>
<target name="releasedir" depends="compress-js, compress-css" description="* - Build releasedir (all tasks)">
<target name="clean" description="* - Remove all generated files">
<echo message="Deleting ${target.dir}" />
<delete dir="${target.dir}" />
<target name="iui-tarball" depends="releasedir" description="r - Make the tarball">
<mkdir dir="${release.dir}"/>
<tar basedir="${target.dir}" includes="${iui.dash.vers}/**" destfile="${tarfile}" compression="gzip" longfile="gnu" />
<target name="iui-zipfile" depends="releasedir" description="r - Make the zipfile">
<mkdir dir="${release.dir}"/>
<zip basedir="${target.dir}" includes="${iui.dash.vers}/**" destfile="${zipfile}" />
<target name="iui-release" depends="iui-zipfile"
description="r - Upload to download area of project site, requires Ant 1.7">
<echo message="Uploading using username ${gc.username}..." />
<target name="publish-samples" depends="releasedir" description="r - publish sample apps via SSH">
<scp verbose="true" todir="${sample-server.ssh.user}:${sample-server.ssh.password}@${}:${sample-server.ssh.path}">
<fileset dir="${release.dir}"/>
<target name="install-myproj" depends="releasedir" description="* - Install iUI into YOUR local project">
<mkdir dir="${myproj.dir.scripts}"/>
<mkdir dir="${myproj.dir.styles}"/>
<mkdir dir="${myproj.dir.images}"/>
<copy todir="${myproj.dir.styles}">
<fileset dir="${release.dir}/iui">
<include name="iui.css" if="myproj.copy-uncompressed"/>
<include name="iuix.css" if="myproj.copy-compressed"/>
<!-+- Adjust image urls in the CSS file to use ${myproj.image.path} -+->
<replaceregex pattern="url\(([^.]*)\.(png|gif)\)" replace="url\(${myproj.image.path}\1.\2\)" flags="g"/>
<copy todir="${myproj.dir.scripts}">
<fileset dir="${release.dir}/iui">
<include name="iui.js" if="myproj.copy-uncompressed"/>
<include name="iuix.js" if="myproj.copy-compressed"/>
<copy todir="${myproj.dir.images}">
<fileset dir="${release.dir}/iui">
<include name="*.png"/>
<include name="*.gif"/>
Jump to Line
Something went wrong with that request. Please try again.