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 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?xml version="1.0"?>
  2. <project name="vaadin-all" basedir="." default="publish-local"
  3. xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib">
  4. <description>
  5. Compiles a zip containing all jars + dependencies
  6. </description>
  7. <include file="../common.xml" as="common" />
  8. <include file="../build.xml" as="vaadin" />
  9. <!-- global properties -->
  10. <property name="module.name" value="vaadin-all" />
  11. <property name="result.dir" value="result" />
  12. <property name="javadoc.jar"
  13. location="${result.dir}/lib/vaadin-all-${vaadin.version}-javadoc.jar" />
  14. <property name="temp.dir" location="${result.dir}/temp" />
  15. <property name="temp.deps.dir" value="${temp.dir}/lib" />
  16. <property name="javadoc.temp.dir" location="${result.dir}/javadoc-temp" />
  17. <property name="zip.file"
  18. location="${result.dir}/lib/${module.name}-${vaadin.version}.zip" />
  19. <path id="classpath.javadoc">
  20. <fileset dir="${temp.deps.dir}" includes="*.jar">
  21. </fileset>
  22. </path>
  23. <target name="fetch.module.and.dependencies">
  24. <fail unless="module" message="No 'module' parameter given" />
  25. <ivy:cachepath pathid="module.and.deps" inline="true"
  26. organisation="com.vaadin" module="vaadin-${module}"
  27. revision="${vaadin.version}" />
  28. <copy todir="${temp.dir}" flatten="true">
  29. <path refid="module.and.deps" />
  30. </copy>
  31. </target>
  32. <target name="unzip.to.javadoctemp">
  33. <property name="file"
  34. location="${temp.dir}/vaadin-${module}-${vaadin.version}.jar" />
  35. <unzip src="${file}" dest="${javadoc.temp.dir}" />
  36. </target>
  37. <target name="javadoc" depends="copy-jars">
  38. <antcontrib:if>
  39. <isset property="nojavadoc" />
  40. <then>
  41. <jar file="${javadoc.jar}" compress="true">
  42. <fileset dir="${common.jarfiles.dir}" />
  43. </jar>
  44. </then>
  45. <else>
  46. <!-- Unpack all source files to javadoc.temp.dir -->
  47. <antcontrib:foreach list="${modules.producing.jar}"
  48. target="unzip.to.javadoctemp" param="module" />
  49. <property name="javadoc.dir" location="${result.dir}/javadoc" />
  50. <property name="title" value="Vaadin ${vaadin.version} API" />
  51. <javadoc maxmemory="1024m" destdir="${javadoc.dir}"
  52. author="true" version="true" use="true" windowtitle="${title}"
  53. encoding="utf-8" stylesheetfile="javadoc.css">
  54. <packageset dir="${javadoc.temp.dir}">
  55. <!-- TODO Javadoc throws ClassCastException if this
  56. is included (#9660) -->
  57. <exclude
  58. name="com/google/gwt/uibinder/elementparsers" />
  59. </packageset>
  60. <doctitle>&lt;h1>${title}&lt;/h1></doctitle>
  61. <!-- <header><![CDATA[<script type="text/javascript"
  62. src=".html-style/style.js"></script>]]></header> -->
  63. <bottom>${javadoc.bottom}</bottom>
  64. <link offline="true"
  65. href="http://docs.oracle.com/javase/6/docs/api/"
  66. packagelistLoc="build/javadoc/j2se-1.6.0" />
  67. <link offline="true"
  68. href="http://java.sun.com/j2ee/1.4/docs/api/"
  69. packagelistLoc="build/javadoc/j2ee-1.4" />
  70. <classpath refid="classpath.javadoc" />
  71. </javadoc>
  72. <!-- Create a javadoc jar -->
  73. <jar file="${javadoc.jar}" compress="true">
  74. <fileset dir="${javadoc.dir}" />
  75. <fileset dir="${common.jarfiles.dir}" />
  76. </jar>
  77. </else>
  78. </antcontrib:if>
  79. </target>
  80. <target name="copy-jars">
  81. <delete dir="${temp.dir}" />
  82. <antcontrib:foreach list="${modules.producing.jar}"
  83. target="fetch.module.and.dependencies" param="module" />
  84. <!-- All jars are now in temp.dir. Still need to separate vaadin
  85. and deps -->
  86. <move todir="${temp.deps.dir}">
  87. <fileset dir="${temp.dir}">
  88. <exclude name="vaadin-*-${vaadin.version}.*" />
  89. <exclude name="vaadin-*-${vaadin.version}-*.*" />
  90. </fileset>
  91. </move>
  92. </target>
  93. <target name="zip" depends="copy-jars, javadoc">
  94. <zip destfile="${zip.file}">
  95. <fileset dir="${temp.dir}">
  96. <!-- Avoid conflicts with servlet and portlet API. They are
  97. provided by the container -->
  98. <exclude name="**/servlet-api*" />
  99. <exclude name="**/portlet-api*" />
  100. <exclude name="**/portal-service-*" />
  101. <!-- Buildhelpers should not even get here ... -->
  102. <exclude name="*buildhelpers*" />
  103. <!-- Zip users should not need javadoc, sources or pom files -->
  104. <exclude name="*.pom" />
  105. <exclude name="*-javadoc.jar" />
  106. <exclude name="*-sources.jar" />
  107. </fileset>
  108. <fileset dir="${common.jarfiles.dir}" />
  109. <fileset dir="${result.dir}/..">
  110. <include name="README.TXT" />
  111. </fileset>
  112. <!-- Do not include javadoc jar in zip as it is huge (> 40MB)
  113. and most people do not need it. -->
  114. </zip>
  115. </target>
  116. <target name="publish-local" depends="zip">
  117. <antcall target="common.publish-local" />
  118. </target>
  119. <target name="clean">
  120. <antcall target="common.clean" />
  121. </target>
  122. <target name="checkstyle">
  123. <!-- Checkstyle is handled by all separate modules -->
  124. </target>
  125. <target name="test" depends="checkstyle">
  126. <!-- No tests for this zip.. -->
  127. </target>
  128. </project>