diff options
author | Marko Grönroos <magi@iki.fi> | 2009-12-02 11:33:38 +0000 |
---|---|---|
committer | Marko Grönroos <magi@iki.fi> | 2009-12-02 11:33:38 +0000 |
commit | 6d722740881cbb69281ab52d04e233a27c9dc968 (patch) | |
tree | 5e9fd8634a60f30a7d6cd90ca39f84047484d4e9 /build | |
parent | 92b52da4106554f43f7de8d57e76950153033e7b (diff) | |
download | vaadin-framework-6d722740881cbb69281ab52d04e233a27c9dc968.tar.gz vaadin-framework-6d722740881cbb69281ab52d04e233a27c9dc968.zip |
Enhanced build-widgetset.xml script for Vaadin 6.2. For #3640.
svn changeset:10128/svn branch:6.2
Diffstat (limited to 'build')
-rw-r--r-- | build/package/build-widgetset.xml | 121 |
1 files changed, 79 insertions, 42 deletions
diff --git a/build/package/build-widgetset.xml b/build/package/build-widgetset.xml index 35f5852ef3..84772dc1a2 100644 --- a/build/package/build-widgetset.xml +++ b/build/package/build-widgetset.xml @@ -21,7 +21,7 @@ See configure target to adjust this buildfile. <!-- 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/vaadin-@version@.jar exists + 2. WebContent/WEB-INF/lib/vaadin-6.2.0.dev-20091201.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) --> @@ -49,24 +49,37 @@ See configure target to adjust this buildfile. <property name="client-side-destination" value="${base}WebContent/VAADIN/widgetsets" /> </target> - <!-- NOTE: Modify this example to compile your own widgetset --> + <!-- NOTE: Modify this example to compile your own widgetset --> <target name="configure-widgetset"> - <!-- Name of the widget set. --> - <property name="widgetset" value="com.vaadin.demo.colorpicker.gwt.ColorPickerWidgetSet"/> - - <!-- The compiled JAR name --> - <property name="jar-destination" value="${base}colorpicker.jar"/> + <echo>Modify this example Ant script to compile your own widget sets.</echo> + + <!-- Name of the widget set --> + <property name="widgetset" value="com.vaadin.demo.widgetset.GeneratedWidgetSet"/> + + <!-- Path to the widgetset directory. Required only for generated widget sets. --> + <!-- Must be relative to $src-location, that is, under the first entry in class path. --> + <property name="widgetset-path" value="com/vaadin/demo/widgetset"/> + </target> + + <!-- Note: Modify this example to compile your own widgetset Jar. --> + <target name="configure-jar"> + <!-- The compiled JAR name --> + <property name="jar-destination" value="${base}colorpicker.jar"/> - <!-- Title of the widget set (for JAR) --> + <!-- Title of the widget set (for JAR) --> <property name="widgetset-title" value="ColorPicker"/> - - <!-- Version of the widget set (for JAR) --> + + <!-- Version of the widget set (for JAR) --> <property name="widgetset-version" value="1.0"/> - - <!-- Vendor of the widget set (for JAR) --> - <property name="widgetset-vendor" value="IT Mill Oy"/> + + <!-- Vendor of the widget set (for JAR) --> + <property name="widgetset-vendor" value="IT Mill Oy"/> </target> - + + <!-- ================================================== --> + <!-- Build Targets --> + <!-- ================================================== --> + <target name="init" depends="configure"> <echo>Configured for ${gwt-platform} platform.</echo> @@ -87,11 +100,15 @@ See configure target to adjust this buildfile. <!-- Construct and check classpath --> <!-- Includes paths required for both server and client-side compilation --> <path id="compile.classpath"> + <!-- The source location must be first, as required by generate-widgetset. --> + <pathelement path="${src-location}" /> <pathelement path="${server-side-destination}" /> - <pathelement path="${src-location}" /> <pathelement path="${toolkit-jar-location}" /> <pathelement path="${gwt-location}/gwt-user.jar" /> <pathelement path="${gwt-location}/gwt-dev-${gwt-platform}.jar" /> + <fileset dir="${base}WebContent/WEB-INF/lib/"> + <include name="*.jar"/> + </fileset> </path> </target> @@ -104,8 +121,46 @@ See configure target to adjust this buildfile. </javac> </target> - <!-- Build JAR --> - <target name="package-jar" depends="init, configure-widgetset"> + <!-- Generates a combined widget set from all widget --> + <!-- sets in the class path, including project sources. --> + <!-- Updates the configuration if it already exists. --> + <target name="generate-widgetset" + depends="compile-server-side, configure-widgetset"> + + <!-- Create the directory if it does not already exist. --> + <mkdir dir="${src-location}/${widgetset-path}"/> + + <java classname="com.vaadin.terminal.gwt.widgetsetutils.WidgetSetBuilder" + failonerror="yes" fork="yes" maxmemory="256m"> + <arg value="${widgetset}"/> + <jvmarg value="-Xss1024k"/> + <jvmarg value="-Djava.awt.headless=true"/> + <classpath> + <path refid="compile.classpath"/> + </classpath> + </java> + </target> + + <!-- Build the widget set --> + <target name="compile-widgetset" + depends="compile-server-side, generate-widgetset"> + <echo>Compiling ${widgetset}...</echo> + + <java classname="com.google.gwt.dev.Compiler" + failonerror="yes" fork="yes" maxmemory="256m"> + <arg value="-war" /> + <arg value="${client-side-destination}" /> + <arg value="${widgetset}" /> + <jvmarg value="-Xss1024k"/> + <jvmarg value="-Djava.awt.headless=true"/> + <classpath> + <path refid="compile.classpath"/> + </classpath> + </java> + </target> + + <!-- Build JAR --> + <target name="package-jar" depends="init, configure-widgetset"> <jar jarfile="${jar-destination}" compress="true"> <manifest> <attribute name="Vaadin-Package-Version" value="1" /> @@ -113,43 +168,25 @@ See configure target to adjust this buildfile. <attribute name="Implementation-Title" value="${widgetset-title}" /> <attribute name="Implementation-Version" value="${widgetset-version}" /> <attribute name="Implementation-Vendor" value="${widgetset-vendor}" /> - - <!-- The following are Vaadin-specific. --> + + <!-- The following are Vaadin-specific. --> <attribute name="Vaadin-License-Title" value="Apache2" /> <attribute name="Vaadin-License-File" value="http://www.apache.org/licenses/LICENSE-2.0" /> </manifest> - - <!-- The built server-side classes are here. --> + + <!-- The built server-side classes are here. --> <fileset dir="${server-side-destination}"> <patternset> <include name="**/*" /> </patternset> </fileset> - <!-- Especially all the widget set source files are required. --> - <fileset dir="${src-location}"> + <!-- Especially all the widget set source files are required. --> + <fileset dir="${src-location}"> <patternset> <include name="**/*" /> </patternset> </fileset> </jar> - </target> - - <!-- Build the widget set --> - <target name="compile-widgetset" depends="compile-server-side, configure-widgetset"> - <echo>Compiling ${widgetset}...</echo> - <echo>Modify this example Ant script to compile your own widget sets.</echo> - - <java classname="com.google.gwt.dev.Compiler" failonerror="yes" fork="yes" maxmemory="256m"> - <arg value="-war" /> - <arg value="${client-side-destination}" /> - <arg value="${widgetset}" /> - <jvmarg value="-Xss1024k"/> - <jvmarg value="-Djava.awt.headless=true"/> - <classpath> - <path refid="compile.classpath"/> - </classpath> - </java> - </target> - + </target> </project> |