Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

build.xml 4.6KB

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