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.xml 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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.debug.js" />
  25. </fileset>
  26. </union>
  27. <target name="vaadinPush.js">
  28. <mkdir dir="${result.dir}/js/VAADIN" />
  29. <ivy:resolve log="download-only" file="ivy.xml"
  30. conf="push.js" />
  31. <ivy:cachepath pathid="atmosphere.jquery.deps"
  32. conf="push.js" />
  33. <delete dir="${temp.dir}" />
  34. <copy flatten="true" tofile="${temp.dir}/jquery.war">
  35. <path refid="atmosphere.jquery.deps" />
  36. </copy>
  37. <!-- Unzip to temp dir -->
  38. <unzip src="${temp.dir}/jquery.war" dest="${jquery.unpack}">
  39. <patternset>
  40. <include name="**/jquery.atmosphere.js" />
  41. </patternset>
  42. <mapper type="flatten" />
  43. </unzip>
  44. <loadfile srcfile="${jquery.js}" property="jquery.js.contents" />
  45. <loadfile srcfile="${jquery.unpack}/jquery.atmosphere.js"
  46. property="jquery.atmosphere.js.contents" />
  47. <loadfile
  48. srcfile="${vaadin.basedir}/WebContent/VAADIN/vaadinPush.js.tpl"
  49. property="vaadinPush.js.contents">
  50. <filterchain>
  51. <replacetokens begintoken="@" endtoken="@">
  52. <token key="jquery.js" value="${jquery.js.contents}" />
  53. <token key="jquery.atmosphere.js" value="${jquery.atmosphere.js.contents}" />
  54. </replacetokens>
  55. </filterchain>
  56. </loadfile>
  57. <!-- Non-obfuscated version for debugging -->
  58. <echo file="${vaadinPush.debug.js}">${vaadinPush.js.contents}</echo>
  59. <!-- Minify -->
  60. <ivy:retrieve organisation="com.yahoo.platform.yui"
  61. module="yuicompressor" revision="2.4.7" inline="true" type="jar"
  62. pattern="${result.dir}/compressor.jar" />
  63. <java jar="${result.dir}/compressor.jar" fork="true">
  64. <arg value="-v" />
  65. <arg value="-o" />
  66. <arg file="${vaadinPush.js}" />
  67. <arg file="${vaadinPush.debug.js}" />
  68. </java>
  69. </target>
  70. <target name="jar" depends="vaadinPush.js">
  71. <antcall target="common.jar">
  72. <param name="require-bundle"
  73. value="com.vaadin.external.atmosphere.runtime;bundle-version=&quot;${atmosphere.runtime.version}&quot;;visibility:=reexport" />
  74. <reference torefid="extra.jar.includes" refid="jar.includes" />
  75. </antcall>
  76. </target>
  77. <target name="publish-local" depends="jar">
  78. <antcall target="common.publish-local" />
  79. </target>
  80. <target name="clean">
  81. <antcall target="common.clean" />
  82. </target>
  83. <target name="checkstyle">
  84. </target>
  85. <target name="test" depends="checkstyle">
  86. </target>
  87. </project>