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.

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