You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build-widgetset.xml 3.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?xml version="1.0"?>
  2. <!--
  3. Client-side code is compiled by using GWTCompiler which compiles client-side Java code into
  4. JavaScript. Generated files are located under WebContent/ITMILL/widgetsets/*.
  5. Client-side compilation is required if you create new or modify existing widgets.
  6. You may use either this script or IT Mill Toolkit Hosted Mode.launch (in Eclipse)
  7. to compile your client-side java code.
  8. By default IT Mill Toolkit first tries to serve widgetset resources from the file system, if that
  9. fails then files are streamed from itmill-toolkit-<version>.jar.
  10. See configure target to adjust this buildfile.
  11. -->
  12. <project name="Widgetset compile example" basedir="." default="compile-widgetset">
  13. <!--
  14. Update based on your project structure, by default this buildfile assumes that you
  15. 1. use WebContent under your project's root directory
  16. 2. WebContent/WEB-INF/lib/itmill-toolkit-<version>.jar exists
  17. 3. WebContent/WEB-INF/src contains your project source files
  18. 4. gwt directory contains extracted GWT distribution for your platform (windows, linux or mac)
  19. -->
  20. <target name="configure">
  21. <!-- Path from this file to the root of the toolkit distribution package -->
  22. <property name="base" value="../../../" />
  23. <!-- which platform we are in, possible values are windows, linux and mac -->
  24. <property name="gwt-platform" value="@platform@" />
  25. <!-- where platform specific GWT distribution is located -->
  26. <property name="gwt-location" value="${base}gwt" />
  27. <!-- where Toolkit jar is located -->
  28. <property name="toolkit-jar-location" value="${base}WebContent/WEB-INF/lib/itmill-toolkit-@version@.jar" />
  29. <!-- where project client-side widgetset source files are located -->
  30. <property name="client-side-src-location" value="${base}WebContent/WEB-INF/src" />
  31. <!-- where to generate compiled javascript and theme files -->
  32. <property name="client-side-destination" value="${base}WebContent/ITMILL/widgetsets" />
  33. </target>
  34. <target name="init" depends="configure">
  35. <echo>Configured for ${gwt-platform} platform.</echo>
  36. <echo>Requirements for classpath:</echo>
  37. <echo> ${gwt-location}/gwt-dev-${gwt-platform}.jar</echo>
  38. <echo> ${gwt-location}/gwt-user.jar</echo>
  39. <echo> ${toolkit-jar-location}</echo>
  40. <echo> ${client-side-src-location}</echo>
  41. <echo>Output will be written into ${client-side-destination}</echo>
  42. <!-- Check that files exist -->
  43. <fail message="Some of the required files (listed above) are missing.">
  44. <condition><not><resourcecount count="3">
  45. <filelist files="${gwt-location}/gwt-dev-${gwt-platform}.jar,${gwt-location}/gwt-user.jar,${toolkit-jar-location}"/>
  46. </resourcecount></not></condition>
  47. </fail>
  48. <!-- Construct and check classpath -->
  49. <path id="compile.classpath">
  50. <pathelement path="${client-side-src-location}" />
  51. <pathelement path="${toolkit-jar-location}" />
  52. <pathelement path="${gwt-location}/gwt-user.jar" />
  53. <pathelement path="${gwt-location}/gwt-dev-${gwt-platform}.jar" />
  54. </path>
  55. </target>
  56. <!-- NOTE: Modify this example to compile your own widgetset -->
  57. <target name="compile-widgetset" depends="init">
  58. <echo>Compiling com.vaadin.demo.colorpicker.gwt.ColorPickerWidgetSet.</echo>
  59. <echo>Modify this example ant-script to compile your own widgetsets.</echo>
  60. <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="256m">
  61. <arg value="-out" />
  62. <arg value="${client-side-destination}" />
  63. <arg value="com.vaadin.demo.colorpicker.gwt.ColorPickerWidgetSet" />
  64. <jvmarg value="-Xss1024k"/>
  65. <jvmarg value="-Djava.awt.headless=true"/>
  66. <classpath>
  67. <path refid="compile.classpath"/>
  68. </classpath>
  69. </java>
  70. </target>
  71. </project>