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.

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