diff options
author | Jani Laakso <jani.laakso@itmill.com> | 2007-11-14 19:05:09 +0000 |
---|---|---|
committer | Jani Laakso <jani.laakso@itmill.com> | 2007-11-14 19:05:09 +0000 |
commit | 647dbde29740c65ddf3cf16ea1219e8ef8702bf1 (patch) | |
tree | ff38c0edd880766b9ac6fc656095613c85895563 | |
parent | 4d2adcec0a2b5d4ca5c0e88a8905b2a829933401 (diff) | |
download | vaadin-framework-647dbde29740c65ddf3cf16ea1219e8ef8702bf1.tar.gz vaadin-framework-647dbde29740c65ddf3cf16ea1219e8ef8702bf1.zip |
Building widgetsets is now possible through ANT file, also contains reasonable documentation to use with own project.
svn changeset:2816/svn branch:trunk
-rw-r--r-- | build/build.xml | 12 | ||||
-rw-r--r-- | build/package/build-widgetsets.xml | 123 |
2 files changed, 132 insertions, 3 deletions
diff --git a/build/build.xml b/build/build.xml index 711ec73bcc..53416e4f0f 100644 --- a/build/build.xml +++ b/build/build.xml @@ -243,8 +243,7 @@ <include name="start-demo.*" /> <include name=".project" /> <include name=".classpath" /> - <include name=".VolumeIcon.icns" /> - <include name=".DS_Store" /> + <include name="*.launch" /> </fileset> </delete> <copy todir="${output-dir}"> @@ -258,10 +257,15 @@ <token key="platform-specific-entries" value="<classpathentry kind="lib" path="gwt/gwt-dev-${package-platform}.jar" />" /> <token key="/platform-specific-entries" value="" /> </replacetokens> + <replacetokens begintoken="<" endtoken=">"> + <token key="platform" value="${package-platform}" /> + <token key="/platform" value="" /> + </replacetokens> </filterchain> <fileset dir="build/package"> <include name=".classpath" /> <include name=".project" /> + <include name="build-widgetsets.xml" /> </fileset> </copy> <if> @@ -308,6 +312,7 @@ Add and filter root files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <target name="root"> + <copy todir="${output-dir}/license"> <fileset dir="license"> <filename name="*.pdf" /> @@ -421,6 +426,7 @@ <exclude name="**/.svn" /> <exclude name="openajax/**" /> <exclude name="ITMILL/widgetsets/**" /> + <exclude name="WEB-INF/lib/commons-fileupload-custom.jar" /> <!-- <exclude name="ITMILL/themes/tests-*" /> --> <exclude name="WEB-INF/classes/**" /> </fileset> @@ -587,7 +593,7 @@ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <target name="docs" depends="javadoc,manual-pdf,manual-html,package-docs"> + <target name="docs"> <!-- TODO depends="javadoc,manual-pdf,manual-html,package-docs"> --> </target> diff --git a/build/package/build-widgetsets.xml b/build/package/build-widgetsets.xml new file mode 100644 index 0000000000..9af5696d25 --- /dev/null +++ b/build/package/build-widgetsets.xml @@ -0,0 +1,123 @@ +<?xml version="1.0"?> + +<!-- + +Client-side code is compiled by using GWTCompiler which compiles client-side Java code into +JavaScript. Generated files are located under WebContent/ITMILL/widgetsets/*. + +Client-side compilation is required if you create new or modify existing widgets. + +By default IT Mill Toolkit first tries to serve widgetset resources from the file system, if that +fails then files are streamed from itmill-toolkit-<version>.jar. + +See configure target to adjust this buildfile. + +--> + +<project name="IT Mill Toolkit Widgetset" basedir="." default="compile-demo-widgetsets"> + + <!-- + Update based on your project structure, by default this buildfile assumes that you + 1. use WebContent under your project's root directory + 2. WebContent/WEB-INF/lib/itmill-toolkit-<version>.jar exists + 3. WebContent/WEB-INF/src contains your project source files + 4. gwt directory contains extracted GWT distribution for your platform (windows, linux or mac) + --> + <target name="configure"> + <!-- which platform we are in, possible values are windows, linux and mac --> + <property name="platform" value="<platform></platform>" /> + + <!-- where platform specific GWT distribution is located --> + <property name="gwt-location" value="gwt" /> + + <!-- where Toolkit jar is located --> + <property name="toolkit-jar-location" value="WebContent/WEB-INF/lib/itmill-toolkit-<version></version>.jar" /> + + <!-- where project client-side widgetset source files are located --> + <property name="client-side-src-location" value="WebContent/src" /> + + <!-- where to generate compiled javascript and theme files --> + <property name="client-side-destination" value="WebContent/ITMILL/widgetsets" /> + </target> + + + <target name="init" depends="configure"> + + <echo>Configured for ${platform} platform.</echo> + <echo>Requirements for classpath:</echo> + <echo> ${gwt-location}/gwt-dev-${platform}.jar</echo> + <echo> ${gwt-location}/gwt-user.jar</echo> + <echo> ${toolkit-jar-location}</echo> + <echo> ${client-side-src-location}</echo> + <echo>Output will be written into ${client-side-destination}</echo> + <echo>Note, if you have created your own widgetset, please modify target compile-my-widgetset first.</echo> + + <!-- Construct classpath --> + <path id="compile.classpath"> + <pathelement path="${client-side-src-location}" /> + <pathelement path="${toolkit-jar-location}" /> + <pathelement path="${gwt-location}/gwt-user.jar" /> + <pathelement path="${gwt-location}/gwt-dev-${platform}.jar" /> + </path> + + </target> + + + <!-- NOTE: use this template to compile your own widgetset --> + <target name="compile-my-widgetset" depends="init"> + <fail message="Please open build-widgetset.xml and update your widgetset's package name to enable this target" /> + <!-- remove upper fail message --> + <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="128m"> + <arg value="-out" /> + <arg value="${client-side-destination}" /> + <echo>NOTE: Update line below and tell package name to your own widgetset</echo> + <arg value="com.itmill.toolkit.terminal.gwt.DefaultWidgetSet" /> + <classpath> + <path refid="compile.classpath"/> + </classpath> + </java> + </target> + + <!-- NOTE: used only in demos, execute after changes to colorpicker demo's client-side source code --> + <target name="compile-colorpicker_demo-widgetset" depends="init"> + <echo>com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet</echo> + <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="128m"> + <arg value="-out" /> + <arg value="${client-side-destination}" /> + <arg value="com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet" /> + <classpath> + <path refid="compile.classpath"/> + </classpath> + </java> + </target> + + <!-- NOTE: used only in demos, execute changes to reservation demo's client-side source code --> + <target name="compile-reservation_demo-widgetset" depends="init"> + <echo>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</echo> + <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="128m"> + <arg value="-out" /> + <arg value="${client-side-destination}" /> + <arg value="com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet" /> + <classpath> + <path refid="compile.classpath"/> + <pathelement location="lib/demo/reservr/googlemaps_gwt.jar" /> + </classpath> + </java> + </target> + + <!-- NOTE: only required if you extract Toolkit sources and change default widgetset --> + <target name="compile-default-widgetset" depends="init"> + <echo>com.itmill.toolkit.terminal.gwt.DefaultWidgetSet</echo> + <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="128m"> + <arg value="-out" /> + <arg value="${client-side-destination}" /> + <arg value="com.itmill.toolkit.terminal.gwt.DefaultWidgetSet" /> + <classpath> + <path refid="compile.classpath"/> + </classpath> + </java> + </target> + + <target name="compile-demo-widgetsets" depends="compile-colorpicker_demo-widgetset, compile-reservation_demo-widgetset" /> + +</project> |