]> source.dussan.org Git - vaadin-framework.git/commitdiff
build speeded by 10 minutes (no longer in draft-mode on docbook, this slowed 10 minut...
authorJani Laakso <jani.laakso@itmill.com>
Sun, 25 Nov 2007 19:22:35 +0000 (19:22 +0000)
committerJani Laakso <jani.laakso@itmill.com>
Sun, 25 Nov 2007 19:22:35 +0000 (19:22 +0000)
Fixed fridays chrash issues.

Renamed VERSION to build.properties file where builder may specify target directory (result).

svn changeset:2920/svn branch:trunk

build/build.properties [new file with mode: 0644]
build/build.xml

diff --git a/build/build.properties b/build/build.properties
new file mode 100644 (file)
index 0000000..8cc38ea
--- /dev/null
@@ -0,0 +1,2 @@
+version=5.0.0-alpha-4
+result-path=build/result
index f1117b27cd17f63462ba69fa8f8cbdb7e5f02994..d5508299de098d5c780e653df57056a163efc65f 100644 (file)
@@ -2,7 +2,7 @@
 
 <project name="IT Mill Toolkit" basedir="../" default="package-all">
 
-    <!-- Package creation - - - - - - - - - - - - - - - - - - - - - - - - -
+       <!-- Package creation - - - - - - - - - - - - - - - - - - - - - - - - -
 
        When creating release use only "package-*" targets:
        package-all
        b) creating platform specific release ZIP/TGZ packages.
        -->
 
-    <!-- 
+       <!-- 
        Call one of package-* targets unless you understand what you are doing 
        -->
-    <target name="package-all" depends="clean-all, init, build, docs, internal-package-mac, internal-package-windows, internal-package-linux" description="Build public packages for Windows, Linux and Mac platforms.">
-    </target>
-
-    <target name="package-mac" depends="clean-all, init, build, docs, internal-package-mac" description="Create public tar.gz package for Mac.">
-    </target>
-
-    <target name="package-windows" depends="clean-all, init, build, docs, internal-package-windows" description="Create public ZIP package for Windows.">
-    </target>
-
-    <target name="package-linux" depends="clean-all, init, build, docs, internal-package-linux" description="Create public tar.bz2 package for Linux.">
-    </target>
-
-    <target name="package-jar-war" depends="clean-all, init, build" description="Create itmill-toolkit-x.y.z.jar and war file.">
-    </target>
-
-
-    <!-- internal tests for packaging -->
-
-    <target name="test-build" depends="clean-all, init, build" description="used for testing build.xml">
-    </target>
-
-    <target name="test-package" depends="init" description="used for testing build.xml">
-        <echo>Creating package for Mac platform.</echo>
-        <var name="package-platform" value="mac" />
-        <var name="eclipse-launch-vmargs" value="-XstartOnFirstThread -Xms256M -Xmx512M" />
-        <antcall target="add-platform-specific-files" inheritAll="true" inheritRefs="true" />
-        <exec executable="ln" failonerror="false">
-            <arg line="-s" />
-            <arg line="${basedir}/${output-dir}" />
-            <arg line="/tk/eclipse-test" />
-        </exec>
-        <exec executable="ln" failonerror="false">
-            <arg line="-s" />
-            <arg line="${basedir}/build/gwt/gwt" />
-            <arg line="${basedir}/${output-dir}/gwt" />
-        </exec>
-    </target>
-
-    <!-- Initialization - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <target name="init">
-
-        <!-- Find out which platform we are in -->
-        <if>
-            <equals arg1="${os.name}" arg2="Windows 2000, Windows XP" />
-            <then>
-                <property name="platform" value="windows" />
-            </then>
-        </if>
-        <if>
-            <equals arg1="${os.name}" arg2="Linux" />
-            <then>
-                <property name="platform" value="linux" />
-            </then>
-        </if>
-        <if>
-            <equals arg1="${os.name}" arg2="Mac OS X" />
-            <then>
-                <property name="platform" value="mac" />
-            </then>
-        </if>
-        <!-- required when compiling WebContent/ITMILL/widgetsets (and also Java server-side classes) -->
-        <property name="lib-gwt-dev" value="gwt-dev-${platform}.jar" />
-
-        <echo>We are on ${platform} platform, using build/gwt/${platform}/${lib-gwt-dev}.</echo>
-
-        <!-- Create result dir unless already exists -->
-        <mkdir dir="build/result" />
-
-        <property file="build/VERSION" />
-        <property name="product-file" value="itmill-toolkit" />
-        <property name="product-name" value="IT Mill Toolkit" />
-        <property name="toolkit-package" value="com/itmill/toolkit" />
-        <property name="eclipse-workspace-name" value="itmill-toolkit-examples" />
-        <property name="eclipse-launch-vmargs" value="-Xms256M -Xmx512M" />
-        <property file="build/html-style.properties" />
-
-        <!-- Destination files -->
-        <property name="lib-jar-name" value="${product-file}-${version}.jar" />
-        <property name="demo-war-name" value="${product-file}-demo-${version}.war" />
-
-        <echo message="Prepared to build ${product-file} version ${version} packages" />
-
-        <!-- Output directory -->
-        <property name="output-dir" value="build/result/${product-file}-${version}" />
-       <mkdir dir="${output-dir}" />
-
-        <!-- Create Output Directory Hierarchy -->
-        <mkdir dir="${output-dir}/doc/manual" />
-        <mkdir dir="${output-dir}/doc/api" />
-        <mkdir dir="${output-dir}/lib" />
-        <mkdir dir="${output-dir}/WebContent" />
-        <mkdir dir="${output-dir}/WebContent/WEB-INF" />
-        <mkdir dir="${output-dir}/WebContent/WEB-INF/classes" />
-        <mkdir dir="${output-dir}/WebContent/doc" />
-        <mkdir dir="${output-dir}/WebContent/doc/demo-source" />
-
-        <!-- Construct classpath used by java and javadoc compilation -->
-        <path id="compile.classpath">
-            <pathelement path="build/gwt/${platform}/gwt-user.jar" />
-            <pathelement path="build/gwt/${platform}/${lib-gwt-dev}" />
-            <pathelement path="build/external/fileupload/classes" />
-            <pathelement path="lib/reservr/googlemaps_gwt.jar" />
-            <pathelement path="lib/jetty/jetty-6.1.5.jar" />
-            <pathelement path="lib/jetty/jetty-util-6.1.5.jar" />
-            <pathelement path="lib/jetty/servlet-api-2.5-6.1.5.jar" />
-        </path>
-
-    </target>
-
-    <target name="internal-package-windows">
-        <echo>Creating package for Windows platform.</echo>
-        <var name="package-platform" value="windows" />
-        <antcall target="add-platform-specific-files" inheritAll="true" inheritRefs="true" />
-        <zip zipfile="build/result/${product-file}-${package-platform}-${version}.zip">
-            <zipfileset prefix="${product-file}-${package-platform}-${version}" dir="build/result/${product-file}-${version}">
-                <patternset>
-                    <include name="**/*" />
-                </patternset>
-            </zipfileset>
-            <zipfileset prefix="${product-file}-${package-platform}-${version}/gwt" dir="build/gwt/windows">
-                <patternset>
-                    <include name="**/*" />
-                </patternset>
-            </zipfileset>
-        </zip>
-    </target>
-
-    <target name="internal-package-linux">
-        <echo>Creating package for Linux platform.</echo>
-        <var name="package-platform" value="linux" />
-        <antcall target="add-platform-specific-files" inheritAll="true" inheritRefs="true" />
-        <tar destfile="build/result/${product-file}-${package-platform}-${version}.tar.gz" compression="gzip" longfile="gnu">
-            <!-- TODO use very slow but effective bzip2
-                       <tar destfile="build/result/${product-file}-${package-platform}-${version}.tar.bz2" compression="bzip2" longfile="gnu">
+       <target name="package-all" depends="clean-all, init, build, docs, internal-package-mac, internal-package-windows, internal-package-linux" description="Build public packages for Windows, Linux and Mac platforms.">
+       </target>
+
+       <target name="package-mac" depends="clean-all, init, build, docs, internal-package-mac" description="Create public tar.gz package for Mac.">
+       </target>
+
+       <target name="package-windows" depends="clean-all, init, build, docs, internal-package-windows" description="Create public ZIP package for Windows.">
+       </target>
+
+       <target name="package-linux" depends="clean-all, init, build, docs, internal-package-linux" description="Create public tar.bz2 package for Linux.">
+       </target>
+
+       <target name="package-jar-war" depends="clean-all, init, build" description="Create itmill-toolkit-x.y.z.jar and war file.">
+       </target>
+
+       <!-- internal tests for packaging -->
+
+       <target name="test-build" depends="clean-all, init, build" description="used for testing build.xml">
+       </target>
+
+       <target name="test-package" depends="init" description="used for testing build.xml">
+               <echo>Creating package for Mac platform.</echo>
+               <var name="package-platform" value="mac" />
+               <!-- TODO: on Mac Leopard, we should not use -XstartOnFirstThread -->
+               <var name="eclipse-launch-vmargs" value="-XstartOnFirstThread -Xms128M -Xmx512M" />
+               <antcall target="add-platform-specific-files" inheritAll="true" inheritRefs="true" />
+               <exec executable="ln" failonerror="false">
+                       <arg line="-s" />
+                       <arg line="${basedir}/${output-dir}" />
+                       <arg line="${result-path}/eclipse-test" />
+               </exec>
+               <exec executable="ln" failonerror="false">
+                       <arg line="-s" />
+                       <arg line="${basedir}/build/gwt/gwt" />
+                       <arg line="${basedir}/${output-dir}/gwt" />
+               </exec>
+       </target>
+
+       <!-- Clean results - - - - - - - - - - - - - - - - - - - - - - - - - -->
+       <target name="clean-all" depends="">
+               <property file="build/build.properties" />
+               <delete dir="${result-path}" includes="**/*" followsymlinks="false" defaultexcludes="false" includeemptydirs="true" failonerror="false">
+               </delete>
+       </target>
+
+       <!-- Initialization - - - - - - - - - - - - - - - - - - - - - - - - -->
+       <target name="init">
+
+               <!-- Find out which platform we are in -->
+               <if>
+                       <equals arg1="${os.name}" arg2="Windows 2000, Windows XP" />
+                       <then>
+                               <property name="platform" value="windows" />
+                       </then>
+               </if>
+               <if>
+                       <equals arg1="${os.name}" arg2="Linux" />
+                       <then>
+                               <property name="platform" value="linux" />
+                       </then>
+               </if>
+               <if>
+                       <equals arg1="${os.name}" arg2="Mac OS X" />
+                       <then>
+                               <property name="platform" value="mac" />
+                       </then>
+               </if>
+               <!-- required when compiling WebContent/ITMILL/widgetsets (and also Java server-side classes) -->
+               <property name="lib-gwt-dev" value="gwt-dev-${platform}.jar" />
+
+               <echo>We are on ${platform} platform, using build/gwt/${platform}/${lib-gwt-dev}.</echo>
+
+               <!-- Create result dir unless already exists -->
+               <mkdir dir="${result-path}" />
+
+               <property file="build/build.properties" />
+               <property name="product-file" value="itmill-toolkit" />
+               <property name="product-name" value="IT Mill Toolkit" />
+               <property name="toolkit-package" value="com/itmill/toolkit" />
+               <property name="eclipse-workspace-name" value="itmill-toolkit-examples" />
+               <property name="eclipse-launch-vmargs" value="-Xms256M -Xmx512M" />
+               <property file="build/html-style.properties" />
+
+               <!-- Destination files -->
+               <property name="lib-jar-name" value="${product-file}-${version}.jar" />
+               <property name="demo-war-name" value="${product-file}-demo-${version}.war" />
+
+               <echo message="Prepared to build ${product-file} version ${version} packages" />
+
+               <!-- Output directory -->
+               <property name="output-dir" value="${result-path}/${product-file}-${version}" />
+               <mkdir dir="${output-dir}" />
+
+               <!-- Create Output Directory Hierarchy -->
+               <mkdir dir="${output-dir}/doc/manual" />
+               <mkdir dir="${output-dir}/doc/api" />
+               <mkdir dir="${output-dir}/lib" />
+               <mkdir dir="${output-dir}/WebContent" />
+               <mkdir dir="${output-dir}/WebContent/WEB-INF" />
+               <mkdir dir="${output-dir}/WebContent/WEB-INF/classes" />
+               <mkdir dir="${output-dir}/WebContent/doc" />
+               <mkdir dir="${output-dir}/WebContent/doc/demo-source" />
+
+               <!-- Construct classpath used by java and javadoc compilation -->
+               <path id="compile.classpath">
+                       <pathelement path="build/gwt/${platform}/gwt-user.jar" />
+                       <pathelement path="build/gwt/${platform}/${lib-gwt-dev}" />
+                       <pathelement path="build/external/fileupload/classes" />
+                       <pathelement path="lib/reservr/googlemaps_gwt.jar" />
+                       <pathelement path="lib/jetty/jetty-6.1.5.jar" />
+                       <pathelement path="lib/jetty/jetty-util-6.1.5.jar" />
+                       <pathelement path="lib/jetty/servlet-api-2.5-6.1.5.jar" />
+               </path>
+
+       </target>
+
+       <target name="internal-package-windows">
+               <echo>Creating package for Windows platform.</echo>
+               <var name="package-platform" value="windows" />
+               <antcall target="add-platform-specific-files" inheritAll="true" inheritRefs="true" />
+               <zip zipfile="${result-path}/${product-file}-${package-platform}-${version}.zip">
+                       <zipfileset prefix="${product-file}-${package-platform}-${version}" dir="${result-path}/${product-file}-${version}">
+                               <patternset>
+                                       <include name="**/*" />
+                               </patternset>
+                       </zipfileset>
+                       <zipfileset prefix="${product-file}-${package-platform}-${version}/gwt" dir="build/gwt/windows">
+                               <patternset>
+                                       <include name="**/*" />
+                               </patternset>
+                       </zipfileset>
+               </zip>
+       </target>
+
+       <target name="internal-package-linux">
+               <echo>Creating package for Linux platform.</echo>
+               <var name="package-platform" value="linux" />
+               <antcall target="add-platform-specific-files" inheritAll="true" inheritRefs="true" />
+               <tar destfile="${result-path}/${product-file}-${package-platform}-${version}.tar.gz" compression="gzip" longfile="gnu">
+                       <!-- TODO use very slow but effective bzip2
+                       <tar destfile="${result-path}/${product-file}-${package-platform}-${version}.tar.bz2" compression="bzip2" longfile="gnu">
                -->
-            <tarfileset prefix="${product-file}-${package-platform}-${version}" dir="build/result/${product-file}-${version}">
-                <patternset>
-                    <include name="**/*" />
-                </patternset>
-            </tarfileset>
-            <tarfileset prefix="${product-file}-${package-platform}-${version}/gwt" dir="build/gwt/linux">
-                <patternset>
-                    <include name="**/*" />
-                </patternset>
-            </tarfileset>
-        </tar>
-    </target>
-
-    <target name="internal-package-mac">
-        <echo>Creating package for Mac platform.</echo>
-        <var name="package-platform" value="mac" />
-        <var name="eclipse-launch-vmargs" value="-XstartOnFirstThread -Xms256M -Xmx512M" />
-        <antcall target="add-platform-specific-files" inheritAll="true" inheritRefs="true" />
-        <tar destfile="build/result/${product-file}-${package-platform}-${version}.tar.gz" compression="gzip" longfile="gnu">
-            <tarfileset prefix="${product-file}-${package-platform}-${version}" dir="build/result/${product-file}-${version}">
-                <patternset>
-                    <include name="**/*" />
-                </patternset>
-            </tarfileset>
-            <tarfileset prefix="${product-file}-${package-platform}-${version}/gwt" dir="build/gwt/mac">
-                <patternset>
-                    <include name="**/*" />
-                </patternset>
-            </tarfileset>
-        </tar>
-        <!-- TODO: remove me: DISABLED for speed
+                       <tarfileset prefix="${product-file}-${package-platform}-${version}" dir="${result-path}/${product-file}-${version}">
+                               <patternset>
+                                       <include name="**/*" />
+                               </patternset>
+                       </tarfileset>
+                       <tarfileset prefix="${product-file}-${package-platform}-${version}/gwt" dir="build/gwt/linux">
+                               <patternset>
+                                       <include name="**/*" />
+                               </patternset>
+                       </tarfileset>
+               </tar>
+       </target>
+
+       <target name="internal-package-mac">
+               <echo>Creating package for Mac platform.</echo>
+               <var name="package-platform" value="mac" />
+               <var name="eclipse-launch-vmargs" value="-XstartOnFirstThread -Xms256M -Xmx512M" />
+               <antcall target="add-platform-specific-files" inheritAll="true" inheritRefs="true" />
+               <tar destfile="${result-path}/${product-file}-${package-platform}-${version}.tar.gz" compression="gzip" longfile="gnu">
+                       <tarfileset prefix="${product-file}-${package-platform}-${version}" dir="${result-path}/${product-file}-${version}">
+                               <patternset>
+                                       <include name="**/*" />
+                               </patternset>
+                       </tarfileset>
+                       <tarfileset prefix="${product-file}-${package-platform}-${version}/gwt" dir="build/gwt/mac">
+                               <patternset>
+                                       <include name="**/*" />
+                               </patternset>
+                       </tarfileset>
+               </tar>
+               <!-- TODO: remove me: DISABLED for speed
         <antcall target="create-mac-diskimage" inheritAll="true" inheritRefs="true" />
         -->
-    </target>
-
-    <target name="create-mac-diskimage">
-        <!-- create Mac disk image (dmg) also -->
-        <property name="mount.dir" value="build/result/mac-mounted-image" />
-        <mkdir dir="${mount.dir}" />
-        <delete file="build/result/*.dmg" />
-        <if>
-            <equals arg1="${platform}" arg2="mac" />
-            <then>
-                <untar src="build/result/${product-file}-${package-platform}-${version}.tar.gz" dest="build/result/" compression="gzip" />
-                <echo>Creating Mac disk image (dmg)</echo>
-                <!-- create image -->
-                <echo>hdiutil create -format UDRW -volname ${product-file}-${version} -srcfolder build/result/${product-file}-${package-platform}-${version} build/result/disk-image.dmg</echo>
-                <exec executable="hdiutil" failonerror="true">
-                    <arg line="create -format UDRW -volname ${product-file}-${version} -srcfolder build/result/${product-file}-${package-platform}-${version} build/result/disk-image.dmg" />
-                </exec>
-                <!-- open image -->
-                <exec executable="hdiutil" failonerror="true">
-                    <arg line='attach' />
-                    <arg line='-readwrite' />
-                    <arg line='-noverify' />
-                    <arg line='-noautoopen' />
-                    <arg line='-mountpoint ${mount.dir}' />
-                    <arg line='build/result/disk-image.dmg' />
-                </exec>
-                <!-- make sure root folder is opened when image is -->
-                <exec executable="bless" failonerror="true">
-                    <arg line='--folder ${mount.dir}' />
-                    <arg line='--openfolder ${mount.dir}' />
-                </exec>
-                <!-- hack: wait for completion -->
-                <exec executable="sleep" failonerror="true">
-                    <arg line='2' />
-                </exec>
-                <!-- here we could position items -->
-                <!--
+       </target>
+
+       <target name="create-mac-diskimage">
+               <!-- create Mac disk image (dmg) also -->
+               <property name="mount.dir" value="${result-path}/mac-mounted-image" />
+               <mkdir dir="${mount.dir}" />
+               <delete file="${result-path}/*.dmg" />
+               <if>
+                       <equals arg1="${platform}" arg2="mac" />
+                       <then>
+                               <untar src="${result-path}/${product-file}-${package-platform}-${version}.tar.gz" dest="${result-path}/" compression="gzip" />
+                               <echo>Creating Mac disk image (dmg)</echo>
+                               <!-- create image -->
+                               <echo>hdiutil create -format UDRW -volname ${product-file}-${version} -srcfolder ${result-path}/${product-file}-${package-platform}-${version} ${result-path}/disk-image.dmg</echo>
+                               <exec executable="hdiutil" failonerror="true">
+                                       <arg line="create -format UDRW -volname ${product-file}-${version} -srcfolder ${result-path}/${product-file}-${package-platform}-${version} ${result-path}/disk-image.dmg" />
+                               </exec>
+                               <!-- open image -->
+                               <exec executable="hdiutil" failonerror="true">
+                                       <arg line='attach' />
+                                       <arg line='-readwrite' />
+                                       <arg line='-noverify' />
+                                       <arg line='-noautoopen' />
+                                       <arg line='-mountpoint ${mount.dir}' />
+                                       <arg line='${result-path}/disk-image.dmg' />
+                               </exec>
+                               <!-- make sure root folder is opened when image is -->
+                               <exec executable="bless" failonerror="true">
+                                       <arg line='--folder ${mount.dir}' />
+                                       <arg line='--openfolder ${mount.dir}' />
+                               </exec>
+                               <!-- hack: wait for completion -->
+                               <exec executable="sleep" failonerror="true">
+                                       <arg line='2' />
+                               </exec>
+                               <!-- here we could position items -->
+                               <!--
                                <exec executable="osascript" failonerror="true">
                                        <arg line='package/positionItems.scpt ${mount.dir}' />
                                </exec>
                                -->
-                <!-- turn on volume icon -->
-                <exec executable="/Developer/Tools/SetFile" failonerror="true">
-                    <arg line='-a C' />
-                    <arg line='${mount.dir}' />
-                </exec>
-                <!-- set executable bit -->
-                <chmod file="${mount.dir}/start-demo.sh" perm="ugo+x" />
-                <!-- close image -->
-                <exec executable="hdiutil" failonerror="true">
-                    <arg line='detach ${mount.dir}/' />
-                </exec>
-                <!-- make read-only -->
-                <exec executable="hdiutil" failonerror="true">
-                    <arg line='convert build/result/disk-image.dmg' />
-                    <arg line='-format UDZO' />
-                    <arg line='-imagekey zlib-level=9' />
-                    <arg line='-o build/result/${product-file}-${package-platform}-${version}.dmg' />
-                </exec>
-                <delete file="build/result/disk-image.dmg" />
-                <!-- internet-enable -->
-                <exec executable="hdiutil" failonerror="true">
-                    <arg line='internet-enable build/result/${product-file}-${package-platform}-${version}.dmg' />
-                </exec>
-            </then>
-        </if>
-    </target>
-
-    <target name="add-platform-specific-files">
-        <delete includeemptydirs="true" defaultexcludes="false">
-            <fileset dir="${output-dir}">
-                <include name="start-demo.*" />
-                <include name=".project" />
-                <include name=".classpath" />
-                <include name="*.launch" />
-            </fileset>
-        </delete>
-        <copy todir="${output-dir}">
-            <filterchain>
-                <expandproperties />
-                <!-- .classpath, *.launch, build-widgetsets.xml -->
-                <replacetokens begintoken="&lt;" endtoken=">">
-                    <token key="version" value="${version}" />
-                    <token key="/version" value="" />
-                </replacetokens>
-                <!-- .classpath -->
-                <replacetokens begintoken="&lt;" endtoken=">">
-                    <token key="platform-specific-entries" value="&lt;classpathentry kind=&quot;lib&quot; path=&quot;gwt/gwt-dev-${package-platform}.jar&quot; /&gt;" />
-                    <token key="/platform-specific-entries" value="" />
-                </replacetokens>
-                <!-- .classpath, HostedMode.launch, build-widgetsets.xml -->
-                <replacetokens begintoken="&lt;" endtoken=">">
-                    <token key="platform" value="${package-platform}" />
-                    <token key="/platform" value="" />
-                </replacetokens>
-                <!-- .project, *.launch -->
-                <replacetokens begintoken="&lt;" endtoken=">">
-                    <token key="eclipse-workspace-name" value="${eclipse-workspace-name}" />
-                    <token key="/eclipse-workspace-name" value="" />
-                </replacetokens>
-                <!-- HostedMode.launch -->
-                <replacetokens begintoken="&lt;" endtoken=">">
-                    <token key="eclipse-launch-vmargs" value="${eclipse-launch-vmargs}" />
-                    <token key="/eclipse-launch-vmargs" value="" />
-                </replacetokens>
-            </filterchain>
-            <fileset dir="build/package">
-                <include name="eclipse-classpath" />
-                <include name="eclipse-project" />
-                <include name="eclipse*launch" />
-                <include name="build-widgetsets.xml" />
-            </fileset>
-        </copy>
-               <rename src="eclipse-classpath" dest=".classpath" />
-               <rename src="eclipse-project" dest=".project" />
-        <if>
-            <equals arg1="${package-platform}" arg2="windows" />
-            <then>
-                <copy todir="${output-dir}">
-                    <fileset dir="build/package">
-                        <include name="start-demo.bat" />
-                    </fileset>
-                </copy>
-            </then>
-        </if>
-        <if>
-            <equals arg1="${package-platform}" arg2="linux" />
-            <then>
-                <copy todir="${output-dir}">
-                    <fileset dir="build/package">
-                        <include name="start-demo.sh" />
-                    </fileset>
-                </copy>
-                <chmod file="${output-dir}/start-demo.sh" perm="ugo+x" />
-            </then>
-        </if>
-        <if>
-            <equals arg1="${package-platform}" arg2="mac" />
-            <then>
-                <copy todir="${output-dir}">
-                    <fileset dir="build/package">
-                        <include name="start-demo.sh" />
-                        <include name=".VolumeIcon.icns" />
-                        <include name=".DS_Store" />
-                    </fileset>
-                </copy>
-                <!-- TODO: this does not work, why? -->
-                <chmod file="${output-dir}/start-demo.sh" perm="ugo+x" />
-            </then>
-        </if>
-    </target>
-
-    <target name="build" depends="root, demo" description="Build package required files, without packing them.">
-    </target>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                               <!-- turn on volume icon -->
+                               <exec executable="/Developer/Tools/SetFile" failonerror="true">
+                                       <arg line='-a C' />
+                                       <arg line='${mount.dir}' />
+                               </exec>
+                               <!-- set executable bit -->
+                               <chmod file="${mount.dir}/start-demo.sh" perm="ugo+x" />
+                               <!-- close image -->
+                               <exec executable="hdiutil" failonerror="true">
+                                       <arg line='detach ${mount.dir}/' />
+                               </exec>
+                               <!-- make read-only -->
+                               <exec executable="hdiutil" failonerror="true">
+                                       <arg line='convert ${result-path}/disk-image.dmg' />
+                                       <arg line='-format UDZO' />
+                                       <arg line='-imagekey zlib-level=9' />
+                                       <arg line='-o ${result-path}/${product-file}-${package-platform}-${version}.dmg' />
+                               </exec>
+                               <delete file="${result-path}/disk-image.dmg" />
+                               <!-- internet-enable -->
+                               <exec executable="hdiutil" failonerror="true">
+                                       <arg line='internet-enable ${result-path}/${product-file}-${package-platform}-${version}.dmg' />
+                               </exec>
+                       </then>
+               </if>
+       </target>
+
+       <target name="add-platform-specific-files">
+               <delete includeemptydirs="true" defaultexcludes="false">
+                       <fileset dir="${output-dir}">
+                               <include name="start-demo.*" />
+                               <include name=".project" />
+                               <include name=".classpath" />
+                               <include name="*.launch" />
+                       </fileset>
+               </delete>
+               <copy todir="${output-dir}">
+                       <filterchain>
+                               <expandproperties />
+                               <!-- .classpath, *.launch, build-widgetsets.xml -->
+                               <replacetokens begintoken="&lt;" endtoken=">">
+                                       <token key="version" value="${version}" />
+                                       <token key="/version" value="" />
+                               </replacetokens>
+                               <!-- .classpath -->
+                               <replacetokens begintoken="&lt;" endtoken=">">
+                                       <token key="platform-specific-entries" value="&lt;classpathentry kind=&quot;lib&quot; path=&quot;gwt/gwt-dev-${package-platform}.jar&quot; /&gt;" />
+                                       <token key="/platform-specific-entries" value="" />
+                               </replacetokens>
+                               <!-- .classpath, HostedMode.launch, build-widgetsets.xml -->
+                               <replacetokens begintoken="&lt;" endtoken=">">
+                                       <token key="platform" value="${package-platform}" />
+                                       <token key="/platform" value="" />
+                               </replacetokens>
+                               <!-- .project, *.launch -->
+                               <replacetokens begintoken="&lt;" endtoken=">">
+                                       <token key="eclipse-workspace-name" value="${eclipse-workspace-name}" />
+                                       <token key="/eclipse-workspace-name" value="" />
+                               </replacetokens>
+                               <!-- HostedMode.launch -->
+                               <replacetokens begintoken="&lt;" endtoken=">">
+                                       <token key="eclipse-launch-vmargs" value="${eclipse-launch-vmargs}" />
+                                       <token key="/eclipse-launch-vmargs" value="" />
+                               </replacetokens>
+                       </filterchain>
+                       <fileset dir="build/package">
+                               <include name="eclipse-classpath" />
+                               <include name="eclipse-project" />
+                               <include name="eclipse*launch" />
+                               <include name="build-widgetsets.xml" />
+                       </fileset>
+               </copy>
+
+               <rename src="${output-dir}/eclipse-classpath" dest="${output-dir}/.classpath" />
+               <rename src="${output-dir}/eclipse-project" dest="${output-dir}/.project" />
+               <rename src="${output-dir}/eclipse-IT Mill Toolkit Hosted Mode-launch" dest="${output-dir}/IT Mill Toolkit Hosted Mode.launch" />
+               <rename src="${output-dir}/eclipse-IT Mill Toolkit Web Mode-launch" dest="${output-dir}/IT Mill Toolkit Web Mode.launch" />
+               <if>
+                       <equals arg1="${package-platform}" arg2="windows" />
+                       <then>
+                               <copy todir="${output-dir}">
+                                       <fileset dir="build/package">
+                                               <include name="start-demo.bat" />
+                                       </fileset>
+                               </copy>
+                       </then>
+               </if>
+               <if>
+                       <equals arg1="${package-platform}" arg2="linux" />
+                       <then>
+                               <copy todir="${output-dir}">
+                                       <fileset dir="build/package">
+                                               <include name="start-demo.sh" />
+                                       </fileset>
+                               </copy>
+                               <chmod file="${output-dir}/start-demo.sh" perm="ugo+x" />
+                       </then>
+               </if>
+               <if>
+                       <equals arg1="${package-platform}" arg2="mac" />
+                       <then>
+                               <copy todir="${output-dir}">
+                                       <fileset dir="build/package">
+                                               <include name="start-demo.sh" />
+                                               <include name=".VolumeIcon.icns" />
+                                               <include name=".DS_Store" />
+                                       </fileset>
+                               </copy>
+                               <!-- TODO: this does not work, why? -->
+                               <chmod file="${output-dir}/start-demo.sh" perm="ugo+x" />
+                       </then>
+               </if>
+       </target>
+
+       <target name="build" depends="root, demo" description="Build package required files, without packing them.">
+       </target>
+
+       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   Add and filter root files
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <target name="root">
-
-        <copy todir="${output-dir}/license">
-            <fileset dir="license">
-                <filename name="*.pdf" />
-            </fileset>
-        </copy>
-        <copy todir="${output-dir}">
-            <filterchain>
-                <expandproperties />
-                <replacetokens begintoken="&lt;" endtoken=">">
-                    <token key="version" value="${version}" />
-                    <token key="/version" value="" />
-                </replacetokens>
-            </filterchain>
-            <fileset dir="">
-                <filename name="release-notes.html" />
-            </fileset>
-        </copy>
-        <copy todir="${output-dir}">
-            <filterchain>
-                <expandproperties />
-                <replacetokens begintoken="&lt;" endtoken=">">
-                    <token key="body" value="${html.body.tag}${html.body.start1}${product-name}${html.body.start2}" />
-                    <token key="/body" value="${html.body.end}${html.body.endtag}" />
-                    <token key="version" value="${version}" />
-                    <token key="/version" value="" />
-                </replacetokens>
-            </filterchain>
-            <fileset dir="">
-                <exclude name="**/.svn" />
-                <exclude name="release-notes.html" />
-                <include name="*.html" />
-                <include name="*.txt" />
-                <include name="license/*.html" />
-            </fileset>
-        </copy>
-
-        <!-- copy 3rd part libraries used by demo -->
-        <copy todir="${output-dir}/lib/demo">
-            <fileset dir="lib">
-                <include name="reservr/**/*" />
-            </fileset>
-        </copy>
-        <copy todir="${output-dir}/lib">
-            <fileset dir="lib">
-                <include name="jetty/**/*" />
-            </fileset>
-        </copy>
-    </target>
-
-
-    <!-- Copy and preprocess sources for packaging 
+       <target name="root">
+
+               <copy todir="${output-dir}/license">
+                       <fileset dir="license">
+                               <filename name="*.pdf" />
+                       </fileset>
+               </copy>
+               <copy todir="${output-dir}">
+                       <filterchain>
+                               <expandproperties />
+                               <replacetokens begintoken="&lt;" endtoken=">">
+                                       <token key="version" value="${version}" />
+                                       <token key="/version" value="" />
+                               </replacetokens>
+                       </filterchain>
+                       <fileset dir="">
+                               <filename name="release-notes.html" />
+                       </fileset>
+               </copy>
+               <copy todir="${output-dir}">
+                       <filterchain>
+                               <expandproperties />
+                               <replacetokens begintoken="&lt;" endtoken=">">
+                                       <token key="body" value="${html.body.tag}${html.body.start1}${product-name}${html.body.start2}" />
+                                       <token key="/body" value="${html.body.end}${html.body.endtag}" />
+                                       <token key="version" value="${version}" />
+                                       <token key="/version" value="" />
+                               </replacetokens>
+                       </filterchain>
+                       <fileset dir="">
+                               <exclude name="**/.svn" />
+                               <exclude name="release-notes.html" />
+                               <include name="*.html" />
+                               <include name="*.txt" />
+                               <include name="license/*.html" />
+                       </fileset>
+               </copy>
+
+               <!-- copy 3rd part libraries used by demo -->
+               <copy todir="${output-dir}/lib/demo">
+                       <fileset dir="lib">
+                               <include name="reservr/**/*" />
+                       </fileset>
+               </copy>
+               <copy todir="${output-dir}/lib">
+                       <fileset dir="lib">
+                               <include name="jetty/**/*" />
+                       </fileset>
+               </copy>
+       </target>
+
+
+       <!-- Copy and preprocess sources for packaging 
        NOTE: Replaces <version></version> tags with build version tag for some "textual" files
        -->
-    <target name="preprocess-src">
-        <mkdir dir="build/result/src" />
-        <echo>Copying src directory and processing copied files.</echo>
-        <echo>Replacing &lt;version&gt; tag with build version for java/html/css/xml files.</echo>
-        <copy todir="build/result/src">
-            <filterset>
-                <filter token="VERSION" value="${version}" />
-            </filterset>
-            <fileset dir="src">
-                <patternset>
-                    <include name="**/*.java" />
-                    <include name="**/*.html" />
-                    <include name="**/*.css" />
-                    <include name="**/*.xml" />
-                </patternset>
-            </fileset>
-        </copy>
-
-        <!-- Unify mix usage of mac/Linux/Win characters -->
-        <echo>Unifying mix usage of Mac/Linux/Win linefeeds for java/html/css/xml files.</echo>
-        <fixcrlf srcdir="build/result/src" eol="crlf" tablength="4" tab="asis" includes="**/*.java **/*.html **/*.css **/*.xml" />
-
-        <!-- Add other files such as images, these are not filtered or processed by fixcrlf task -->
-        <echo>Copying non java/html/css/xml files such as images.</echo>
-        <copy todir="build/result/src">
-            <fileset dir="src">
-                <patternset>
-                    <exclude name="**/.svn" />
-                    <exclude name="**/*.java" />
-                    <exclude name="**/*.html" />
-                    <exclude name="**/*.css" />
-                    <exclude name="**/*.xml" />
-                </patternset>
-            </fileset>
-        </copy>
-
-    </target>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+       <target name="preprocess-src">
+               <mkdir dir="${result-path}/src" />
+               <echo>Copying src directory and processing copied files.</echo>
+               <echo>Replacing &lt;version&gt; tag with build version for java/html/css/xml files.</echo>
+               <copy todir="${result-path}/src">
+                       <filterset>
+                               <filter token="VERSION" value="${version}" />
+                       </filterset>
+                       <fileset dir="src">
+                               <patternset>
+                                       <include name="**/*.java" />
+                                       <include name="**/*.html" />
+                                       <include name="**/*.css" />
+                                       <include name="**/*.xml" />
+                               </patternset>
+                       </fileset>
+               </copy>
+
+               <!-- Unify mix usage of mac/Linux/Win characters -->
+               <echo>Unifying mix usage of Mac/Linux/Win linefeeds for java/html/css/xml files.</echo>
+               <fixcrlf srcdir="${result-path}/src" eol="crlf" tablength="4" tab="asis" includes="**/*.java **/*.html **/*.css **/*.xml" />
+
+               <!-- Add other files such as images, these are not filtered or processed by fixcrlf task -->
+               <echo>Copying non java/html/css/xml files such as images.</echo>
+               <copy todir="${result-path}/src">
+                       <fileset dir="src">
+                               <patternset>
+                                       <exclude name="**/.svn" />
+                                       <exclude name="**/*.java" />
+                                       <exclude name="**/*.html" />
+                                       <exclude name="**/*.css" />
+                                       <exclude name="**/*.xml" />
+                               </patternset>
+                       </fileset>
+               </copy>
+
+       </target>
+
+       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   WebContent
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <target name="webcontent" depends="preprocess-src">
-
-        <!-- Add demo sources -->
-        <echo>Adding demo sources to WebContent/WEB-INF/src</echo>
-        <copy todir="${output-dir}/WebContent/WEB-INF/src">
-            <fileset dir="build/result/src">
-                <include name="${toolkit-package}/demo/**/*" />
-            </fileset>
-        </copy>
-
-        <echo>Creating demo source html files</echo>
-        <java2html srcdir="${output-dir}/WebContent/WEB-INF/src/${toolkit-package}/demo" destdir="${output-dir}/WebContent/doc/demo-source/${toolkit-package}/demo" includes="**/*.java" style="eclipse" showLineNumbers="false" showFileName="true" showTableBorder="false" />
-
-        <!-- Add WebContent -->
-        <echo>Adding WebContent files, excluding ITMILL/widgetsets and few internal development libraries.</echo>
-        <copy todir="${output-dir}/WebContent">
-            <fileset dir="WebContent">
-                <exclude name="**/.svn" />
-                <exclude name="openajax/**" />
-               <exclude name="index.html" />
-               <exclude name="WEB-INF/web.xml" />
-                <exclude name="ITMILL/widgetsets/**" />
-                <exclude name="WEB-INF/lib/commons-fileupload-custom.jar" />
-                <exclude name="ITMILL/themes/tests-*" />
-                <exclude name="WEB-INF/classes/**" />
-            </fileset>
-        </copy>
-       
-       <copy file="build/package/webcontent-index.html" tofile="${output-dir}/WebContent/index.html" />
-       <copy file="build/package/web.xml" tofile="${output-dir}/WebContent/WEB-INF/web.xml" />
-
-    </target>
-
-    <target name="compile-fileupload">
-        <echo>Compiling custom fileupload classes.</echo>
-        <ant dir="build/external/fileupload" antfile="build.xml" target="compile" />
-    </target>
-
-    <target name="compile-java" depends="compile-fileupload, webcontent">
-        <echo>Compiling src (server-side)</echo>
-        <!-- Compile -->
-        <mkdir dir="build/result/classes" />
-        <javac source="1.4" target="1.4" classpathref="compile.classpath" srcdir="build/result/src" destdir="build/result/classes" includes="${toolkit-package}/**" debug="true">
-        </javac>
-    </target>
-
-    <target name="compile-client-side" depends="webcontent">
-        <echo>Compiling src (client-side)</echo>
-        <echo>com.itmill.toolkit.terminal.gwt.DefaultWidgetSet</echo>
-        <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m">
-            <arg value="-out" />
-            <arg value="${output-dir}/WebContent/ITMILL/widgetsets" />
-            <arg value="com.itmill.toolkit.terminal.gwt.DefaultWidgetSet" />
-            <arg value="-style" />
-            <arg value="OBF" />
-            <classpath>
-                <pathelement location="build/gwt/${platform}/gwt-user.jar" />
-                <pathelement location="build/gwt/${platform}/${lib-gwt-dev}" />
-                <pathelement location="build/result/src" />
-            </classpath>
-        </java>
-
-        <echo>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</echo>
-        <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m">
-            <arg value="-out" />
-            <arg value="${output-dir}/WebContent/ITMILL/widgetsets" />
-            <arg value="com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet" />
-            <arg value="-style" />
-            <arg value="OBF" />
-            <classpath>
-                <pathelement location="build/gwt/${platform}/gwt-user.jar" />
-                <pathelement location="build/gwt/${platform}/${lib-gwt-dev}" />
-                <pathelement location="build/result/src" />
-                <!-- demo jars -->
-                <pathelement location="${output-dir}/lib/demo/reservr/googlemaps_gwt.jar" />
-                <!-- demo widgetset sources -->
-                <pathelement path="${output-dir}/WebContent/WEB-INF/src" />
-            </classpath>
-        </java>
-
-        <echo>com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet</echo>
-        <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m">
-            <arg value="-out" />
-            <arg value="${output-dir}/WebContent/ITMILL/widgetsets" />
-            <arg value="com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet" />
-            <arg value="-style" />
-            <arg value="OBF" />
-            <classpath>
-                <pathelement location="build/gwt/${platform}/gwt-user.jar" />
-                <pathelement location="build/gwt/${platform}/${lib-gwt-dev}" />
-                <pathelement location="build/result/src" />
-                <!-- demo widgetset sources -->
-                <pathelement path="${output-dir}/WebContent/WEB-INF/src" />
-            </classpath>
-        </java>
-    </target>
-
-    <target name="libs" depends="compile-java, compile-client-side">
-        <echo>Creating libs (server-side)</echo>
-        <!-- Create Toolkit JAR -->
-        <jar jarfile="${output-dir}/lib/${lib-jar-name}" compress="true">
-            <fileset dir="build/result/classes">
-                <patternset>
-                    <exclude name="${toolkit-package}/demo/**" />
-                    <exclude name="${toolkit-package}/launcher/**" />
-                </patternset>
-            </fileset>
-            <!-- fileupload, see build/external/fileupload/build.xml -->
-            <fileset dir="build/external/fileupload/classes">
-                <include name="**/*" />
-            </fileset>
-            <!-- add sources -->
-            <fileset dir="build/result/src">
-                <patternset>
-                    <exclude name="${toolkit-package}/demo/**" />
-                    <exclude name="${toolkit-package}/launcher/**" />
-                </patternset>
-            </fileset>
-            <fileset dir="${output-dir}/WebContent">
-                <patternset>
-                    <include name="ITMILL/widgetsets/com.itmill.toolkit.terminal.gwt.DefaultWidgetSet/**/*" />
-                </patternset>
-            </fileset>
-        </jar>
-        <!-- Create Toolkit source JAR -->
-        <!-- Now included within lib-jar-name
+       <target name="webcontent" depends="preprocess-src">
+
+               <!-- Add demo sources -->
+               <echo>Adding demo sources to WebContent/WEB-INF/src</echo>
+               <copy todir="${output-dir}/WebContent/WEB-INF/src">
+                       <fileset dir="${result-path}/src">
+                               <include name="${toolkit-package}/demo/**/*" />
+                       </fileset>
+               </copy>
+
+               <echo>Creating demo source html files</echo>
+               <java2html srcdir="${output-dir}/WebContent/WEB-INF/src/${toolkit-package}/demo" destdir="${output-dir}/WebContent/doc/demo-source/${toolkit-package}/demo" includes="**/*.java" style="eclipse" showLineNumbers="false" showFileName="true" showTableBorder="false" />
+
+               <!-- Add WebContent -->
+               <echo>Adding WebContent files, excluding ITMILL/widgetsets and few internal development libraries.</echo>
+               <copy todir="${output-dir}/WebContent">
+                       <fileset dir="WebContent">
+                               <exclude name="**/.svn" />
+                               <exclude name="openajax/**" />
+                               <exclude name="index.html" />
+                               <exclude name="WEB-INF/web.xml" />
+                               <exclude name="ITMILL/widgetsets/**" />
+                               <exclude name="WEB-INF/lib/commons-fileupload-custom.jar" />
+                               <exclude name="ITMILL/themes/tests-*" />
+                               <exclude name="WEB-INF/classes/**" />
+                       </fileset>
+               </copy>
+
+               <copy file="build/package/webcontent-index.html" tofile="${output-dir}/WebContent/index.html" />
+               <copy file="build/package/web.xml" tofile="${output-dir}/WebContent/WEB-INF/web.xml" />
+
+       </target>
+
+       <target name="compile-fileupload">
+               <echo>Compiling custom fileupload classes.</echo>
+               <ant dir="build/external/fileupload" antfile="build.xml" target="compile" />
+       </target>
+
+       <target name="compile-java" depends="compile-fileupload, webcontent">
+               <echo>Compiling src (server-side)</echo>
+               <!-- Compile -->
+               <mkdir dir="${result-path}/classes" />
+               <javac source="1.4" target="1.4" classpathref="compile.classpath" srcdir="${result-path}/src" destdir="${result-path}/classes" includes="${toolkit-package}/**" debug="true">
+               </javac>
+       </target>
+
+       <target name="compile-client-side" depends="webcontent">
+               <echo>Compiling src (client-side)</echo>
+               <echo>com.itmill.toolkit.terminal.gwt.DefaultWidgetSet</echo>
+               <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m">
+                       <arg value="-out" />
+                       <arg value="${output-dir}/WebContent/ITMILL/widgetsets" />
+                       <arg value="com.itmill.toolkit.terminal.gwt.DefaultWidgetSet" />
+                       <arg value="-style" />
+                       <arg value="OBF" />
+                       <classpath>
+                               <pathelement location="build/gwt/${platform}/gwt-user.jar" />
+                               <pathelement location="build/gwt/${platform}/${lib-gwt-dev}" />
+                               <pathelement location="${result-path}/src" />
+                       </classpath>
+               </java>
+
+               <echo>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</echo>
+               <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m">
+                       <arg value="-out" />
+                       <arg value="${output-dir}/WebContent/ITMILL/widgetsets" />
+                       <arg value="com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet" />
+                       <arg value="-style" />
+                       <arg value="OBF" />
+                       <classpath>
+                               <pathelement location="build/gwt/${platform}/gwt-user.jar" />
+                               <pathelement location="build/gwt/${platform}/${lib-gwt-dev}" />
+                               <pathelement location="${result-path}/src" />
+                               <!-- demo jars -->
+                               <pathelement location="${output-dir}/lib/demo/reservr/googlemaps_gwt.jar" />
+                               <!-- demo widgetset sources -->
+                               <pathelement path="${output-dir}/WebContent/WEB-INF/src" />
+                       </classpath>
+               </java>
+
+               <echo>com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet</echo>
+               <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m">
+                       <arg value="-out" />
+                       <arg value="${output-dir}/WebContent/ITMILL/widgetsets" />
+                       <arg value="com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet" />
+                       <arg value="-style" />
+                       <arg value="OBF" />
+                       <classpath>
+                               <pathelement location="build/gwt/${platform}/gwt-user.jar" />
+                               <pathelement location="build/gwt/${platform}/${lib-gwt-dev}" />
+                               <pathelement location="${result-path}/src" />
+                               <!-- demo widgetset sources -->
+                               <pathelement path="${output-dir}/WebContent/WEB-INF/src" />
+                       </classpath>
+               </java>
+       </target>
+
+       <target name="libs" depends="compile-java, compile-client-side">
+               <echo>Creating libs (server-side)</echo>
+               <!-- Create Toolkit JAR -->
+               <jar jarfile="${output-dir}/lib/${lib-jar-name}" compress="true">
+                       <fileset dir="${result-path}/classes">
+                               <patternset>
+                                       <exclude name="${toolkit-package}/demo/**" />
+                                       <exclude name="${toolkit-package}/launcher/**" />
+                               </patternset>
+                       </fileset>
+                       <!-- fileupload, see build/external/fileupload/build.xml -->
+                       <fileset dir="build/external/fileupload/classes">
+                               <include name="**/*" />
+                       </fileset>
+                       <!-- add sources -->
+                       <fileset dir="${result-path}/src">
+                               <patternset>
+                                       <exclude name="${toolkit-package}/demo/**" />
+                                       <exclude name="${toolkit-package}/launcher/**" />
+                               </patternset>
+                       </fileset>
+                       <fileset dir="${output-dir}/WebContent">
+                               <patternset>
+                                       <include name="ITMILL/widgetsets/com.itmill.toolkit.terminal.gwt.DefaultWidgetSet/**/*" />
+                               </patternset>
+                       </fileset>
+               </jar>
+               <!-- Create Toolkit source JAR -->
+               <!-- Now included within lib-jar-name
                <jar jarfile="${output-dir}/lib/${lib-src-jar-name}" compress="true">
-                       <fileset dir="build/result/src">
+                       <fileset dir="${result-path}/src">
                                <patternset>
                                        <exclude name="${toolkit-package}/demo/**" />
                                        <exclude name="${toolkit-package}/tests/**" />
                        </fileset>
                </jar>
                -->
-    </target>
-
-    <!-- Demo  - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <target name="demo" depends="libs, javadoc">
-        <echo>Building demo</echo>
-        <echo>Adding demo class files.</echo>
-        <copy todir="${output-dir}/WebContent/WEB-INF/classes">
-            <fileset dir="build/result/classes">
-                <include name="${toolkit-package}/demo/**/*" />
-                <!-- user might want to tweak launcher classes -->
-                <include name="${toolkit-package}/launcher/**" />
-            </fileset>
-        </copy>
-
-        <echo>Adding (duplicating) Toolkit JAR to WebContent/WEB-INF/lib</echo>
-        <copy todir="${output-dir}/WebContent/WEB-INF/lib">
-            <fileset dir="${output-dir}/lib">
-                <include name="${lib-jar-name}" />
-            </fileset>
-        </copy>
-
-        <echo>Adding (duplicating) source for demo</echo>
-        <copy todir="${output-dir}/WebContent/WEB-INF/src">
-            <fileset dir="build/result/src">
-                <include name="${toolkit-package}/demo/**/*" />
-                <!-- user might want to tweak launcher classes -->
-                <include name="${toolkit-package}/launcher/**" />
-            </fileset>
-        </copy>
-
-        <echo>Adding (duplicating) javadocs for demo</echo>
-        <copy todir="${output-dir}/WebContent/doc">
-            <fileset dir="${output-dir}/doc">
-                <include name="api/**/*" />
-            </fileset>
-        </copy>
-
-        <echo>Building WAR</echo>
-        <war warfile="${output-dir}/lib/${product-file}.war" webxml="WebContent/WEB-INF/web.xml">
-            <fileset dir="${output-dir}/WebContent">
-                <exclude name="WEB-INF/web.xml" />
-                <include name="**/*" />
-            </fileset>
-            <lib dir="${output-dir}/lib">
-                <include name="${lib-jar-name}" />
-            </lib>
-            <!-- All javadoc (demos link to these)-->
-            <fileset dir="${output-dir}">
-                <include name="doc/api/**/*" />
-            </fileset>
-            <!-- All sources (demos link to these)-->
-            <fileset dir="build/result/src">
-                <include name="**/*" />
-            </fileset>
-        </war>
-    </target>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+       </target>
+
+       <!-- Demo  - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+       <target name="demo" depends="libs, javadoc">
+               <echo>Building demo</echo>
+               <echo>Adding demo class files.</echo>
+               <copy todir="${output-dir}/WebContent/WEB-INF/classes">
+                       <fileset dir="${result-path}/classes">
+                               <include name="${toolkit-package}/demo/**/*" />
+                               <!-- user might want to tweak launcher classes -->
+                               <include name="${toolkit-package}/launcher/**" />
+                       </fileset>
+               </copy>
+
+               <echo>Adding (duplicating) Toolkit JAR to WebContent/WEB-INF/lib</echo>
+               <copy todir="${output-dir}/WebContent/WEB-INF/lib">
+                       <fileset dir="${output-dir}/lib">
+                               <include name="${lib-jar-name}" />
+                       </fileset>
+               </copy>
+
+               <echo>Adding (duplicating) source for demo</echo>
+               <copy todir="${output-dir}/WebContent/WEB-INF/src">
+                       <fileset dir="${result-path}/src">
+                               <include name="${toolkit-package}/demo/**/*" />
+                               <!-- user might want to tweak launcher classes -->
+                               <include name="${toolkit-package}/launcher/**" />
+                       </fileset>
+               </copy>
+
+               <echo>Adding (duplicating) javadocs for demo</echo>
+               <copy todir="${output-dir}/WebContent/doc">
+                       <fileset dir="${output-dir}/doc">
+                               <include name="api/**/*" />
+                       </fileset>
+               </copy>
+
+               <echo>Building WAR</echo>
+               <war warfile="${output-dir}/lib/${product-file}.war" webxml="WebContent/WEB-INF/web.xml">
+                       <fileset dir="${output-dir}/WebContent">
+                               <exclude name="WEB-INF/web.xml" />
+                               <include name="**/*" />
+                       </fileset>
+                       <lib dir="${output-dir}/lib">
+                               <include name="${lib-jar-name}" />
+                       </lib>
+                       <!-- All javadoc (demos link to these)-->
+                       <fileset dir="${output-dir}">
+                               <include name="doc/api/**/*" />
+                       </fileset>
+                       <!-- All sources (demos link to these)-->
+                       <fileset dir="${result-path}/src">
+                               <include name="**/*" />
+                       </fileset>
+               </war>
+       </target>
+
+       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   Documentation 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <target name="docs" depends="javadoc,manual-pdf,manual-html,package-docs">
-    </target>
+       <target name="docs" depends="javadoc,manual-pdf,manual-html,package-docs">
+       </target>
 
 
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   Documentation: Add documentation including style files
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <target name="package-docs">
-        <copy todir="${output-dir}/doc/manual/html-style">
-            <fileset dir="doc/manual/html-style">
-                <exclude name="**/.svn" />
-                <exclude name="**/test.html" />
-            </fileset>
-        </copy>
-        <copy todir="${output-dir}/doc">
-            <fileset dir="doc">
-                <exclude name="**/.svn" />
-                <include name="dtd/**/*.dtd" />
-            </fileset>
-        </copy>
-    </target>
-
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+       <target name="package-docs">
+               <copy todir="${output-dir}/doc/manual/html-style">
+                       <fileset dir="doc/manual/html-style">
+                               <exclude name="**/.svn" />
+                               <exclude name="**/test.html" />
+                       </fileset>
+               </copy>
+               <copy todir="${output-dir}/doc">
+                       <fileset dir="doc">
+                               <exclude name="**/.svn" />
+                               <include name="dtd/**/*.dtd" />
+                       </fileset>
+               </copy>
+       </target>
+
+
+       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   Documentation: Add Javadoc to doc
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <target name="javadoc" depends="preprocess-src">
-        <javadoc destdir="${output-dir}/doc/api" author="true" version="true" use="true" windowtitle="${product-name}" classpathref="compile.classpath">
-            <packageset dir="build/result/src">
-                <include name="${toolkit-package}/**" />
-                <exclude name="${toolkit-package}/demo/**" />
-                <exclude name="${toolkit-package}/tests/**/*" />
-            </packageset>
-            <doctitle>${javadoc.doctitle}</doctitle>
-            <!-- <header><![CDATA[<script type="text/javascript" src=".html-style/style.js"></script>]]></header> -->
-            <bottom>${javadoc.bottom}</bottom>
-            <link offline="true" href="http://java.sun.com/j2se/1.5.0/docs/api/" packagelistLoc="build/javadoc/j2se-1.5.0" />
-            <link offline="true" href="http://java.sun.com/j2ee/1.4/docs/api/" packagelistLoc="build/javadoc/j2ee-1.4" />
-        </javadoc>
-    </target>
-
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+       <target name="javadoc" depends="preprocess-src">
+               <javadoc destdir="${output-dir}/doc/api" author="true" version="true" use="true" windowtitle="${product-name}" classpathref="compile.classpath">
+                       <packageset dir="${result-path}/src">
+                               <include name="${toolkit-package}/**" />
+                               <exclude name="${toolkit-package}/demo/**" />
+                               <exclude name="${toolkit-package}/tests/**/*" />
+                       </packageset>
+                       <doctitle>${javadoc.doctitle}</doctitle>
+                       <!-- <header><![CDATA[<script type="text/javascript" src=".html-style/style.js"></script>]]></header> -->
+                       <bottom>${javadoc.bottom}</bottom>
+                       <link offline="true" href="http://java.sun.com/j2se/1.5.0/docs/api/" packagelistLoc="build/javadoc/j2se-1.5.0" />
+                       <link offline="true" href="http://java.sun.com/j2ee/1.4/docs/api/" packagelistLoc="build/javadoc/j2ee-1.4" />
+               </javadoc>
+       </target>
+
+
+       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   Documentation: Add book part 2 (TBD)   
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <target name="book-part2" depends="dbdoclet">
-        <!-- TODO Add XSLT to transform dbdoclet results to book part 2 -->
-    </target>
+       <target name="book-part2" depends="dbdoclet">
+               <!-- TODO Add XSLT to transform dbdoclet results to book part 2 -->
+       </target>
 
 
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   Documentation: Add manual
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <target name="dbdoclet" depends="preprocess-src">
-        <echo>Manual: DocBookDoclet</echo>
-        <javadoc access="public" charset="UTF-8" docencoding="UTF-8" encoding="ISO-8859-15" failonerror="yes" classpath="build/lib/servlet-api.jar" maxmemory="512m" source="1.5">
-            <packageset dir="build/result/src">
-                <include name="${toolkit-package}/**" />
-                <exclude name="${toolkit-package}/demo/**" />
-                <exclude name="${toolkit-package}/tests/**/*" />
-            </packageset>
-            <doclet name="org.dbdoclet.doclet.docbook.DocBookDoclet" path="build/lib/jdk${java.specification.version}/dbdoclet.jar">
-                <param name="-d" value="result/docbook" />
-            </doclet>
-        </javadoc>
-    </target>
-
-    <!-- XEP-based FO building -->
-    <target name="manual-pdf">
-        <echo>PDF Manual: processing images (TBD)</echo>
-        <!-- TBD -->
-        <echo>PDF Manual: converting xml to fo</echo>
-        <java classname="org.apache.xalan.xslt.Process" failonerror="yes" fork="yes" maxmemory="512m">
-            <arg value="-xsl" />
-            <arg value="build/docbook/conf/custom-fo-docbook.xsl" />
-            <arg value="-in" />
-            <arg value="doc/manual/book.xml" />
-            <arg value="-out" />
-            <arg value="build/result/book.fo" />
-            <arg value="-param" />
-            <arg value="section.autolabel" />
-            <arg value="1" />
-            <arg value="-param" />
-            <arg value="section.label.includes.component.label" />
-            <arg value="1" />
-            <arg value="-param" />
-            <arg value="section.autolabel.max.depth" />
-            <arg value="2" />
-            <classpath>
-                <pathelement location="build/lib/xalan.jar" />
-                <pathelement location="build/lib/xercesImpl.jar" />
-                <pathelement location="build/lib/xml-apis.jar" />
-            </classpath>
-        </java>
-        <echo>PDF Manual: converting fo to pdf</echo>
-        <!-- Run XEP FO processor to convert FO to PDF -->
-        <java classname="com.renderx.xep.XSLDriver" error="build/result/xep-error.log" failonerror="yes" fork="yes" maxmemory="512m" input="build/result/book.fo" output="${output-dir}/doc/manual.pdf">
-            <arg value="-Dcom.renderx.xep.CONFIG=build/lib/XEP/xep.xml" />
-            <classpath>
-                <pathelement location="build/lib/XEP/lib/tools.jar" />
-                <pathelement location="build/lib/XEP/lib/xep.jar" />
-                <pathelement location="build/lib/XEP/lib/saxon.jar" />
-                <pathelement location="build/lib/XEP/lib/xt.jar" />
-            </classpath>
-        </java>
-    </target>
-
-    <target name="manual-html">
-        <echo>Manual: HTML</echo>
-        <delete file="build/docbook/conf/temp.xsl" />
-        <copy file="build/docbook/conf/custom-html-docbook.xsl" tofile="build/docbook/conf/temp.xsl">
-            <filterchain>
-                <replacetokens>
-                    <token key="BODYHEADER" value="${html.body.start1}${docbook.head.title}${html.body.start2}" />
-                    <token key="BODYFOOTER" value="${html.body.end}" />
-                </replacetokens>
-            </filterchain>
-        </copy>
-        <path id="docbook-xsl.classpath">
-            <pathelement path="build/lib/fserializer.jar" />
-            <pathelement path="build/lib/xalan.jar" />
-            <pathelement path="build/lib/xercesImpl.jar" />
-            <pathelement path="build/lib/xml-apis.jar" />
-        </path>
-        <java classname="org.apache.xalan.xslt.Process" failonerror="yes" fork="yes" maxmemory="1300m">
-            <arg value="-in" />
-            <arg value="doc/manual/book.xml" />
-            <arg value="-xsl" />
-            <arg value="build/docbook/conf/temp.xsl" />
-            <arg value="-out" />
-            <arg value="${output-dir}/doc/manual/index.html" />
-            <arg value="-param" />
-            <arg value="use.extensions" />
-            <arg value="1" />
-            <classpath refid="docbook-xsl.classpath" />
-        </java>
-        <delete file="build/docbook/conf/temp.xsl" />
-        <copy todir="${output-dir}/doc/manual/img">
-            <fileset dir="doc/manual/img">
-                <exclude name="**/.svn" />
-            </fileset>
-        </copy>
-    </target>
-
-
-    <!-- Clean results - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <target name="clean-all" depends="">
-        <delete includeemptydirs="true" defaultexcludes="false" followsymlinks="false">
-            <fileset dir="build/result" includes="**/*" />
-        </delete>
-    </target>
-
-    <!-- ant contrib required for flow control (for loop, if, property override) -->
-    <taskdef resource="net/sf/antcontrib/antlib.xml">
-        <classpath>
-            <pathelement location="build/lib/ant-contrib-1.0b3.jar" />
-        </classpath>
-    </taskdef>
-
-    <!-- java2html converter -->
-    <taskdef name="java2html" classname="de.java2html.anttasks.Java2HtmlTask" classpath="build/lib/java2html.jar" />
+       <target name="dbdoclet" depends="preprocess-src">
+               <echo>Manual: DocBookDoclet</echo>
+               <javadoc access="public" charset="UTF-8" docencoding="UTF-8" encoding="ISO-8859-15" failonerror="yes" classpath="build/lib/servlet-api.jar" maxmemory="512m" source="1.5">
+                       <packageset dir="${result-path}/src">
+                               <include name="${toolkit-package}/**" />
+                               <exclude name="${toolkit-package}/demo/**" />
+                               <exclude name="${toolkit-package}/tests/**/*" />
+                       </packageset>
+                       <doclet name="org.dbdoclet.doclet.docbook.DocBookDoclet" path="build/lib/jdk${java.specification.version}/dbdoclet.jar">
+                               <param name="-d" value="result/docbook" />
+                       </doclet>
+               </javadoc>
+       </target>
+
+       <!-- XEP-based FO building -->
+       <target name="manual-pdf">
+               <echo>PDF Manual: processing images (TBD)</echo>
+               <!-- TBD -->
+               <echo>PDF Manual: converting xml to fo</echo>
+               <java classname="org.apache.xalan.xslt.Process" failonerror="yes" fork="yes" maxmemory="512m">
+                       <arg value="-xsl" />
+                       <arg value="build/docbook/conf/custom-fo-docbook.xsl" />
+                       <arg value="-in" />
+                       <arg value="doc/manual/book.xml" />
+                       <arg value="-out" />
+                       <arg value="${result-path}/book.fo" />
+                       <arg value="-param" />
+                       <arg value="section.autolabel" />
+                       <arg value="1" />
+                       <arg value="-param" />
+                       <arg value="section.label.includes.component.label" />
+                       <arg value="1" />
+                       <arg value="-param" />
+                       <arg value="section.autolabel.max.depth" />
+                       <arg value="2" />
+                       <arg value="-param" />
+                       <arg value="draft.watermark.image" />
+                       <arg value="''" />
+                       <arg value="-param" />
+                       <arg value="draft.mode" />
+                       <arg value="'no'" />
+                       <classpath>
+                               <pathelement location="build/lib/xalan.jar" />
+                               <pathelement location="build/lib/xercesImpl.jar" />
+                               <pathelement location="build/lib/xml-apis.jar" />
+                       </classpath>
+               </java>
+               <echo>PDF Manual: converting fo to pdf</echo>
+               <!-- Run XEP FO processor to convert FO to PDF -->
+               <java classname="com.renderx.xep.XSLDriver" error="${result-path}/xep-error.log" failonerror="yes" fork="yes" maxmemory="512m" input="${result-path}/book.fo" output="${output-dir}/doc/manual.pdf">
+                       <arg value="-Dcom.renderx.xep.CONFIG=build/lib/XEP/xep.xml" />
+                       <classpath>
+                               <pathelement location="build/lib/XEP/lib/tools.jar" />
+                               <pathelement location="build/lib/XEP/lib/xep.jar" />
+                               <pathelement location="build/lib/XEP/lib/saxon.jar" />
+                               <pathelement location="build/lib/XEP/lib/xt.jar" />
+                       </classpath>
+               </java> 
+       </target>
+
+       <target name="manual-html">
+               <echo>Manual: HTML</echo>
+               <delete file="build/docbook/conf/temp.xsl" />
+               <copy file="build/docbook/conf/custom-html-docbook.xsl" tofile="build/docbook/conf/temp.xsl">
+                       <filterchain>
+                               <replacetokens>
+                                       <token key="BODYHEADER" value="${html.body.start1}${docbook.head.title}${html.body.start2}" />
+                                       <token key="BODYFOOTER" value="${html.body.end}" />
+                               </replacetokens>
+                       </filterchain>
+               </copy>
+               <path id="docbook-xsl.classpath">
+                       <pathelement path="build/lib/fserializer.jar" />
+                       <pathelement path="build/lib/xalan.jar" />
+                       <pathelement path="build/lib/xercesImpl.jar" />
+                       <pathelement path="build/lib/xml-apis.jar" />
+               </path>
+               <java classname="org.apache.xalan.xslt.Process" failonerror="yes" fork="yes" maxmemory="1300m">
+                       <arg value="-in" />
+                       <arg value="doc/manual/book.xml" />
+                       <arg value="-xsl" />
+                       <arg value="build/docbook/conf/temp.xsl" />
+                       <arg value="-out" />
+                       <arg value="${output-dir}/doc/manual/index.html" />
+                       <arg value="-param" />
+                       <arg value="use.extensions" />
+                       <arg value="1" />
+                       <classpath refid="docbook-xsl.classpath" />
+               </java>
+               <delete file="build/docbook/conf/temp.xsl" />
+               <copy todir="${output-dir}/doc/manual/img">
+                       <fileset dir="doc/manual/img">
+                               <exclude name="**/.svn" />
+                       </fileset>
+               </copy>
+       </target>
+
+       <!-- ant contrib required for flow control (for loop, if, property override) -->
+       <taskdef resource="net/sf/antcontrib/antlib.xml">
+               <classpath>
+                       <pathelement location="build/lib/ant-contrib-1.0b3.jar" />
+               </classpath>
+       </taskdef>
+
+       <!-- java2html converter -->
+       <taskdef name="java2html" classname="de.java2html.anttasks.Java2HtmlTask" classpath="build/lib/java2html.jar" />
 
 
 </project>