123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727 |
- <?xml version="1.0"?>
-
- <project name="IT Mill Toolkit" basedir="../" default="package-all">
-
- <!-- Package creation - - - - - - - - - - - - - - - - - - - - - - - - -
-
- When creating release use only "package-*" targets:
- package-all
- * creates four release packages for three three platforms (below)
-
- package-windows
- * itmill-toolkit-windows-<version>.zip
-
- package-linux
- * itmill-toolkit-linux-<version>.tar.bz2
-
- package-mac
- * itmill-toolkit-mac-<version>.tar.gz
- * itmill-toolkit-mac-<version>.dmg
-
- NOTE: This build script requires directories named build/gwt/(linux|windows|mac) .
- You must unpack platform specific binaries under linux, windows and mac directories.
- build/gwt/(linux|windows|mac) are used for
- a) compile WebContent/ITMILL/widgetsets
- 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, 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, internal-package-mac" description="Create public tar.gz package for Mac.">
- </target>
-
- <target name="package-windows" depends="clean-all, init, build, internal-package-windows" description="Create public ZIP package for Windows.">
- </target>
-
- <target name="package-linux" depends="clean-all, init, build, internal-package-linux" description="Create public tar.bz2 package for Linux.">
- </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 file="build/html-style.properties" />
-
- <!-- Destination files -->
- <property name="lib-bin-jar-name" value="${product-file}-${version}.jar" />
- <property name="lib-dev-jar-name" value="${product-file}-dev-${version}.jar" />
- <property name="demo-lib-jar-name" value="${product-file}-demo-${version}.jar" />
- <property name="lib-src-jar-name" value="${product-file}-src-${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" />
-
- <!-- 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="WebContent/WEB-INF/lib/commons-fileupload-1.2.jar" />
- <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>
- <echo>1: ${package-platform}</echo>
- <var name="package-platform" value="windows" />
- <echo>2: ${package-platform}</echo>
- <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.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" />
- <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>
- <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 -->
- <!--
- <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=".VolumeIcon.icns" />
- <include name=".DS_Store" />
- </fileset>
- </delete>
- <copy todir="${output-dir}">
- <filterchain>
- <expandproperties />
- <replacetokens begintoken="<" endtoken=">">
- <token key="version" value="${version}" />
- <token key="/version" value="" />
- </replacetokens>
- <replacetokens begintoken="<" endtoken=">">
- <token key="platform-specific-entries" value="<classpathentry kind="lib" path="gwt/gwt-dev-${package-platform}.jar" />" />
- <token key="/platform-specific-entries" value="" />
- </replacetokens>
- </filterchain>
- <fileset dir="build/package">
- <include name=".classpath" />
- <include name=".project" />
- </fileset>
- </copy>
- <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, docs" 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="<" 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="<" 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>
- </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 <version> 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>
-
- <echo>Creating demo source html files</echo>
- <java2html srcdir="build/result/src/${toolkit-package}/demo" destdir="build/result/src/${toolkit-package}/demo" includes="**/*.java" style="eclipse" showLineNumbers="false" showFileName="true" showTableBorder="false" />
-
- </target>
-
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- WebContent
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <target name="webcontent" depends="preprocess-src">
-
- <!-- Add demo sources -->
- <echo>Adding demo sources to WebContent/src</echo>
- <copy todir="${output-dir}/WebContent/src">
- <fileset dir="build/result/src">
- <include name="${toolkit-package}/demo/**/*" />
- </fileset>
- </copy>
-
- <!-- 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="ITMILL/widgetsets/**" />
- <exclude name="ITMILL/themes/tests-*" />
- <exclude name="WEB-INF/classes/**" />
- <exclude name="WEB-INF/lib/commons-fileupload-1.2-javadoc.jar" />
- <exclude name="WEB-INF/lib/commons-fileupload-1.2-sources.jar" />
- <exclude name="WEB-INF/lib/jakarta/**" />
- </fileset>
- </copy>
-
- </target>
-
- <target name="compile-java" depends="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="libs" depends="compile-java">
- <echo>Creating libs (server-side)</echo>
- <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>
- <!-- Create Toolkit deployment / server-side only development JAR -->
- <jar jarfile="${output-dir}/lib/${lib-bin-jar-name}" compress="true">
- <fileset dir="build/result/classes">
- <patternset>
- <exclude name="${toolkit-package}/demo/**" />
- <exclude name="${toolkit-package}/launcher/**" />
- <exclude name="${toolkit-package}/tests/**" />
- </patternset>
- </fileset>
- </jar>
- <!-- Create Toolkit source JAR -->
- <jar jarfile="${output-dir}/lib/${lib-src-jar-name}" compress="true">
- <fileset dir="build/result/src">
- <patternset>
- <exclude name="${toolkit-package}/demo/**" />
- <exclude name="${toolkit-package}/tests/**" />
- <exclude name="${toolkit-package}/launcher/**" />
- </patternset>
- </fileset>
- </jar>
- </target>
-
- <target name="compile-client-side" depends="libs">
- <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" />
- <classpath>
- <pathelement location="build/gwt/${platform}/gwt-user.jar" />
- <pathelement location="build/gwt/${platform}/${lib-gwt-dev}" />
- <pathelement location="${output-dir}/lib/itmill-toolkit-src-5.0.0-alpha.jar" />
- </classpath>
- </java>
-
- <echo>com.itmill.toolkit.demo.reservation.gwt.WidgetSet</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.WidgetSet" />
- <classpath>
- <pathelement location="build/gwt/${platform}/gwt-user.jar" />
- <pathelement location="build/gwt/${platform}/${lib-gwt-dev}" />
- <pathelement location="${output-dir}/lib/itmill-toolkit-src-5.0.0-alpha.jar" />
- <!-- demo jars -->
- <pathelement location="${output-dir}/lib/demo/reservr/googlemaps_gwt.jar" />
- <!-- demo widgetset sources -->
- <pathelement path="${output-dir}/WebContent/src" />
- </classpath>
- </java>
-
- <echo>com.itmill.toolkit.demo.colorpicker.gwt.WidgetSet</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.WidgetSet" />
- <classpath>
- <pathelement location="build/gwt/${platform}/gwt-user.jar" />
- <pathelement location="build/gwt/${platform}/${lib-gwt-dev}" />
- <pathelement location="${output-dir}/lib/itmill-toolkit-src-5.0.0-alpha.jar" />
- <!-- demo widgetset sources -->
- <pathelement path="${output-dir}/WebContent/src" />
- </classpath>
- </java>
- </target>
-
- <!-- Demo - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <target name="demo" depends="libs, compile-java, compile-client-side, 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-bin-jar-name}" />
- </fileset>
- </copy>
-
- <echo>Adding (duplicating) source for demo</echo>
- <copy todir="${output-dir}/WebContent/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-bin-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>
-
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Documentation
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <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>
-
-
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 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>
-
-
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Documentation: Add book part 2 (TBD)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <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">
- <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" 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">
- <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">
- <fileset dir="build/result" includes="**/*" />
- </delete>
- </target>
-
- <!-- ant contrib required for flow control (for loop) -->
- <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>
|