Browse Source

Updated build-widgetset.xml script for Vaadin 6.2. For #3640.

svn changeset:10121/svn branch:6.2
tags/6.7.0.beta1
Marko Grönroos 14 years ago
parent
commit
05cd3bd1ac
2 changed files with 78 additions and 14 deletions
  1. 1
    1
      build/build.xml
  2. 77
    13
      build/package/build-widgetset.xml

+ 1
- 1
build/build.xml View File

<filterchain> <filterchain>
<expandproperties /> <expandproperties />
<!-- .classpath, *.launch, build-widgetset.xml --> <!-- .classpath, *.launch, build-widgetset.xml -->
<replacetokens begintoken="&lt;" endtoken=">">
<replacetokens begintoken="@" endtoken="@">
<token key="version" value="${version.full}" /> <token key="version" value="${version.full}" />
<token key="/version" value="" /> <token key="/version" value="" />
</replacetokens> </replacetokens>

+ 77
- 13
build/package/build-widgetset.xml View File

to compile your client-side java code. to compile your client-side java code.


By default Vaadin first tries to serve widgetset resources from the file system, if that By default Vaadin first tries to serve widgetset resources from the file system, if that
fails then files are streamed from vaadin-<version>.jar.
fails then files are streamed from vaadin-@version@.jar.


See configure target to adjust this buildfile. See configure target to adjust this buildfile.


<!-- <!--
Update based on your project structure, by default this buildfile assumes that you Update based on your project structure, by default this buildfile assumes that you
1. use WebContent under your project's root directory 1. use WebContent under your project's root directory
2. WebContent/WEB-INF/lib/vaadin-<version>.jar exists
2. WebContent/WEB-INF/lib/vaadin-@version@.jar exists
3. WebContent/WEB-INF/src contains your project source files 3. WebContent/WEB-INF/src contains your project source files
4. gwt directory contains extracted GWT distribution for your platform (windows, linux or mac) 4. gwt directory contains extracted GWT distribution for your platform (windows, linux or mac)
--> -->
<property name="toolkit-jar-location" value="${base}WebContent/WEB-INF/lib/vaadin-@version@.jar" /> <property name="toolkit-jar-location" value="${base}WebContent/WEB-INF/lib/vaadin-@version@.jar" />
<!-- where project client-side widgetset source files are located --> <!-- where project client-side widgetset source files are located -->
<property name="client-side-src-location" value="${base}WebContent/WEB-INF/src" />
<property name="src-location" value="${base}WebContent/WEB-INF/src" />

<!-- where to compile server-side classes -->
<property name="server-side-destination" value="${base}WebContent/WEB-INF/classes"/>
<!-- where to generate compiled javascript and theme files --> <!-- where to generate compiled javascript and theme files -->
<property name="client-side-destination" value="${base}WebContent/VAADIN/widgetsets" /> <property name="client-side-destination" value="${base}WebContent/VAADIN/widgetsets" />
</target> </target>
<!-- 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"/>

<!-- Title of the widget set (for JAR) -->
<property name="widgetset-title" value="ColorPicker"/>
<!-- 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"/>
</target>

<target name="init" depends="configure"> <target name="init" depends="configure">


<echo>Configured for ${gwt-platform} platform.</echo> <echo>Configured for ${gwt-platform} platform.</echo>
<echo> ${gwt-location}/gwt-dev-${gwt-platform}.jar</echo> <echo> ${gwt-location}/gwt-dev-${gwt-platform}.jar</echo>
<echo> ${gwt-location}/gwt-user.jar</echo> <echo> ${gwt-location}/gwt-user.jar</echo>
<echo> ${toolkit-jar-location}</echo> <echo> ${toolkit-jar-location}</echo>
<echo> ${client-side-src-location}</echo>
<echo> ${src-location}</echo>
<echo>Output will be written into ${client-side-destination}</echo> <echo>Output will be written into ${client-side-destination}</echo>


<!-- Check that files exist --> <!-- Check that files exist -->
</fail> </fail>


<!-- Construct and check classpath --> <!-- Construct and check classpath -->
<!-- Includes paths required for both server and client-side compilation -->
<path id="compile.classpath"> <path id="compile.classpath">
<pathelement path="${client-side-src-location}" />
<pathelement path="${server-side-destination}" />
<pathelement path="${src-location}" />
<pathelement path="${toolkit-jar-location}" /> <pathelement path="${toolkit-jar-location}" />
<pathelement path="${gwt-location}/gwt-user.jar" /> <pathelement path="${gwt-location}/gwt-user.jar" />
<pathelement path="${gwt-location}/gwt-dev-${gwt-platform}.jar" /> <pathelement path="${gwt-location}/gwt-dev-${gwt-platform}.jar" />
</path> </path>
</target> </target>

<!-- Compiled server-side components are needed for building the client-side -->
<target name="compile-server-side" depends="init">
<javac srcdir="${src-location}" destdir="${server-side-destination}">
<classpath>
<path refid="compile.classpath"/>
</classpath>
</javac>
</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" />
<attribute name="Vaadin-Widgetsets" value="${widgetset}" />
<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. -->
<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. -->
<fileset dir="${server-side-destination}">
<patternset>
<include name="**/*" />
</patternset>
</fileset>

<!-- Especially all the widget set source files are required. -->
<fileset dir="${src-location}">
<patternset>
<include name="**/*" />
</patternset>
</fileset>
</jar>
</target>
<!-- NOTE: Modify this example to compile your own widgetset -->
<target name="compile-widgetset" depends="init">
<echo>Compiling com.vaadin.demo.colorpicker.gwt.ColorPickerWidgetSet.</echo>
<echo>Modify this example ant-script to compile your own widgetsets.</echo>
<java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="256m">
<arg value="-out" />
<!-- 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="${client-side-destination}" />
<arg value="com.vaadin.demo.colorpicker.gwt.ColorPickerWidgetSet" />
<arg value="${widgetset}" />
<jvmarg value="-Xss1024k"/> <jvmarg value="-Xss1024k"/>
<jvmarg value="-Djava.awt.headless=true"/> <jvmarg value="-Djava.awt.headless=true"/>
<classpath> <classpath>

Loading…
Cancel
Save