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.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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="2.1.2.vaadin2" />
  17. <property name="jquery.js" location="lib/jquery/jquery-1.11.0.js" />
  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. </patternset>
  38. <mapper type="flatten" />
  39. </unzip>
  40. <loadfile srcfile="${jquery.js}" property="jquery.js.contents" />
  41. <loadfile srcfile="${jquery.unpack}/jquery.atmosphere.js" property="jquery.atmosphere.js.contents" />
  42. <loadfile srcfile="${vaadin.basedir}/WebContent/VAADIN/vaadinPush.js.tpl" property="vaadinPush.js.contents">
  43. <filterchain>
  44. <replacetokens begintoken="@" endtoken="@">
  45. <token key="jquery.js" value="${jquery.js.contents}" />
  46. <token key="jquery.atmosphere.js" value="${jquery.atmosphere.js.contents}" />
  47. </replacetokens>
  48. </filterchain>
  49. </loadfile>
  50. <!-- Non-obfuscated version for debugging -->
  51. <echo file="${vaadinPush.debug.js}">${vaadinPush.js.contents}</echo>
  52. <!-- Minify -->
  53. <ivy:retrieve organisation="com.yahoo.platform.yui" module="yuicompressor" revision="2.4.7" inline="true" type="jar" pattern="${result.dir}/compressor.jar" />
  54. <java jar="${result.dir}/compressor.jar" fork="true">
  55. <arg value="-v" />
  56. <arg value="-o" />
  57. <arg file="${vaadinPush.js}" />
  58. <arg file="${vaadinPush.debug.js}" />
  59. </java>
  60. </target>
  61. <target name="jar" depends="vaadinPush.js">
  62. <antcall target="common.jar">
  63. <param name="require-bundle" value="com.vaadin.external.atmosphere.runtime;bundle-version=&quot;${atmosphere.runtime.version}&quot;;visibility:=reexport" />
  64. <reference torefid="extra.jar.includes" refid="jar.includes" />
  65. </antcall>
  66. </target>
  67. <target name="publish-local" depends="jar">
  68. <antcall target="common.publish-local" />
  69. </target>
  70. <target name="clean">
  71. <antcall target="common.clean" />
  72. </target>
  73. <target name="checkstyle">
  74. </target>
  75. <target name="test" depends="checkstyle">
  76. </target>
  77. </project>