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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. <!-- Ensure filtered webcontent files are available -->
  39. <antcall target="common.filter.webcontent" />
  40. <!-- Unpack all source files to javadoc.temp.dir -->
  41. <antcontrib:foreach list="${modules.to.publish.to.maven}"
  42. target="unzip.to.javadoctemp" param="module" />
  43. <property name="javadoc.dir" location="${result.dir}/javadoc" />
  44. <property name="title" value="Vaadin ${vaadin.version} API" />
  45. <javadoc maxmemory="1024m" destdir="${javadoc.dir}"
  46. author="true" version="true" use="true" windowtitle="${title}"
  47. encoding="utf-8">
  48. <packageset dir="${javadoc.temp.dir}">
  49. <!-- TODO Javadoc throws ClassCastException if this is included
  50. (#9660) -->
  51. <exclude name="com/google/gwt/uibinder/elementparsers" />
  52. </packageset>
  53. <doctitle>&lt;h1>${title}&lt;/h1></doctitle>
  54. <!-- <header><![CDATA[<script type="text/javascript" src=".html-style/style.js"></script>]]></header> -->
  55. <bottom>${javadoc.bottom}</bottom>
  56. <link offline="true"
  57. href="http://docs.oracle.com/javase/6/docs/api/"
  58. packagelistLoc="build/javadoc/j2se-1.6.0" />
  59. <link offline="true" href="http://java.sun.com/j2ee/1.4/docs/api/"
  60. packagelistLoc="build/javadoc/j2ee-1.4" />
  61. <classpath refid="classpath.javadoc" />
  62. </javadoc>
  63. <!-- Create a javadoc jar -->
  64. <jar file="${javadoc.jar}" compress="true">
  65. <fileset dir="${javadoc.dir}" />
  66. <fileset refid="common.files.for.all.jars" />
  67. </jar>
  68. </target>
  69. <target name="copy-jars">
  70. <delete dir="${temp.dir}" />
  71. <antcontrib:foreach list="${modules.to.publish.to.maven}"
  72. target="fetch.module.and.dependencies" param="module" />
  73. <!-- All jars are now in temp.dir. Still need to separate vaadin
  74. and deps -->
  75. <move todir="${temp.deps.dir}">
  76. <fileset dir="${temp.dir}">
  77. <exclude name="vaadin-*-${vaadin.version}.*" />
  78. <exclude name="vaadin-*-${vaadin.version}-*.*" />
  79. </fileset>
  80. </move>
  81. </target>
  82. <target name="zip" depends="copy-jars, javadoc">
  83. <!-- Ensure filtered webcontent files are available -->
  84. <antcall target="common.filter.webcontent" />
  85. <zip destfile="${zip.file}">
  86. <fileset dir="${temp.dir}">
  87. <!-- Avoid conflicts with servlet and portlet API. They are
  88. provided by the container -->
  89. <exclude name="**/servlet-api*" />
  90. <exclude name="**/portlet-api*" />
  91. <!-- Buildhelpers should not even get here ... -->
  92. <exclude name="*buildhelpers*" />
  93. <!-- Zip users should not need javadoc, sources or pom files -->
  94. <exclude name="*.pom" />
  95. <exclude name="*-javadoc.jar" />
  96. <exclude name="*-sources.jar" />
  97. </fileset>
  98. <fileset refid="common.files.for.all.jars" />
  99. <fileset dir="${result.dir}/..">
  100. <include name="README.TXT" />
  101. </fileset>
  102. <!-- Do not include javadoc jar in zip as it is huge (> 40MB)
  103. and most people do not need it. -->
  104. </zip>
  105. </target>
  106. <target name="publish-local" depends="zip">
  107. <antcall target="common.publish-local" />
  108. </target>
  109. <target name="clean">
  110. <antcall target="common.clean" />
  111. </target>
  112. <target name="checkstyle">
  113. <!-- Checkstyle is handled by all separate modules -->
  114. </target>
  115. <target name="test" depends="checkstyle">
  116. <!-- No tests for this zip.. -->
  117. </target>
  118. </project>