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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?xml version="1.0"?>
  2. <project name="vaadin-push" basedir="." default="publish-local"
  3. xmlns:ivy="antlib:org.apache.ivy.ant">
  4. <description>
  5. Meta package which defines dependencies needed for push
  6. </description>
  7. <include file="../build.xml" as="vaadin" />
  8. <include file="../common.xml" as="common" />
  9. <property name="module.name" value="vaadin-push" />
  10. <property name="module.symbolic" value="com.vaadin.push" />
  11. <property name="result.dir" location="result" />
  12. <property name="temp.dir" location="${result.dir}/temp" />
  13. <property name="jquery.unpack" location="${temp.dir}/jquery" />
  14. <property name="vaadinPush.js" location="${result.dir}/js/VAADIN/vaadinPush.js" />
  15. <property name="vaadinPush.debug.js"
  16. location="${result.dir}/js/VAADIN/vaadinPush.debug.js" />
  17. <!-- Keep the version number in sync with ivy.xml, server/src/com/vaadin/server/Constants.java -->
  18. <property name="atmosphere.runtime.version" value="2.2.7.vaadin1" />
  19. <property name="jquery.js" location="lib/jquery/jquery-1.11.0.js" />
  20. <path id="classpath.compile.custom" />
  21. <union id="jar.includes">
  22. <fileset dir="${result.dir}/js">
  23. <include name="VAADIN/vaadinPush.js" />
  24. <include name="VAADIN/vaadinPush.js.gz" />
  25. <include name="VAADIN/vaadinPush.debug.js" />
  26. <include name="VAADIN/vaadinPush.debug.js.gz" />
  27. </fileset>
  28. </union>
  29. <target name="vaadinPush.js">
  30. <mkdir dir="${result.dir}/js/VAADIN" />
  31. <ivy:resolve log="download-only" file="ivy.xml"
  32. conf="push.js" />
  33. <ivy:cachepath pathid="atmosphere.jquery.deps"
  34. conf="push.js" />
  35. <delete dir="${temp.dir}" />
  36. <copy flatten="true" tofile="${temp.dir}/jquery.war">
  37. <path refid="atmosphere.jquery.deps" />
  38. </copy>
  39. <!-- Unzip to temp dir -->
  40. <unzip src="${temp.dir}/jquery.war" dest="${jquery.unpack}">
  41. <patternset>
  42. <include name="**/jquery.atmosphere.js" />
  43. </patternset>
  44. <mapper type="flatten" />
  45. </unzip>
  46. <loadfile srcfile="${jquery.js}" property="jquery.js.contents" />
  47. <loadfile srcfile="${jquery.unpack}/jquery.atmosphere.js"
  48. property="jquery.atmosphere.js.contents" />
  49. <loadfile
  50. srcfile="${vaadin.basedir}/WebContent/VAADIN/vaadinPush.js.tpl"
  51. property="vaadinPush.js.contents">
  52. <filterchain>
  53. <replacetokens begintoken="@" endtoken="@">
  54. <token key="jquery.js" value="${jquery.js.contents}" />
  55. <token key="jquery.atmosphere.js" value="${jquery.atmosphere.js.contents}" />
  56. </replacetokens>
  57. </filterchain>
  58. </loadfile>
  59. <!-- Non-obfuscated version for debugging -->
  60. <echo file="${vaadinPush.debug.js}">${vaadinPush.js.contents}</echo>
  61. <!-- Minify -->
  62. <ivy:retrieve organisation="com.yahoo.platform.yui"
  63. module="yuicompressor" revision="2.4.7" inline="true" type="jar"
  64. pattern="${result.dir}/compressor.jar" />
  65. <java jar="${result.dir}/compressor.jar" fork="true">
  66. <arg value="-v" />
  67. <arg value="-o" />
  68. <arg file="${vaadinPush.js}" />
  69. <arg file="${vaadinPush.debug.js}" />
  70. </java>
  71. <!-- Gzipped versions -->
  72. <gzip src="${vaadinPush.js}" destfile="${vaadinPush.js}.gz" />
  73. <gzip src="${vaadinPush.debug.js}" destfile="${vaadinPush.debug.js}.gz" />
  74. </target>
  75. <target name="jar" depends="vaadinPush.js">
  76. <antcall target="common.jar">
  77. <param name="require-bundle"
  78. value="com.vaadin.external.atmosphere.runtime;bundle-version=&quot;${atmosphere.runtime.version}&quot;;visibility:=reexport" />
  79. <reference torefid="extra.jar.includes" refid="jar.includes" />
  80. </antcall>
  81. </target>
  82. <target name="publish-local" depends="jar">
  83. <antcall target="common.publish-local" />
  84. </target>
  85. <target name="clean">
  86. <antcall target="common.clean" />
  87. </target>
  88. <target name="checkstyle">
  89. </target>
  90. <target name="test" depends="checkstyle">
  91. </target>
  92. </project>