You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

buildAnt.xml 3.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <project name="Ant Nightly Distribution" default="all" basedir=".">
  2. <!-- Build Management Properties
  3. buildAnt.archive Distribution directory to be archived
  4. buildAnt.cvsRoot CVS login root for Ant
  5. buildAnt.dateStamp YYYYMMDD date stamp (from executing script)
  6. buildAnt.dist Distribution directory produced by "build" target
  7. buildAnt.name Base name of packaged distribution files
  8. buildAnt.package CVS package name for Ant
  9. buildAnt.server Jakarta server's nightly builds directory
  10. buildAnt.source Directory into which Ant sources are extracted
  11. buildAnt.uploads Directory into which archives to upload are made
  12. jaxp.home Home directory of the JAXP distribution
  13. -->
  14. <property name="buildAnt.archive" value="archive/jakarta-ant"/>
  15. <property name="buildAnt.cvsRoot" value=":pserver:anoncvs@jakarta.apache.org:/home/cvspublic"/>
  16. <property name="buildAnt.dist" value="dist/ant"/>
  17. <property name="buildAnt.name" value="jakarta-ant"/>
  18. <property name="buildAnt.package" value="jakarta-ant"/>
  19. <property name="buildAnt.server" value="/www/jakarta.apache.org/builds/ant/nightly"/>
  20. <property name="buildAnt.source" value="jakarta-ant"/>
  21. <property name="buildAnt.uploads" value="uploads/ant"/>
  22. <!-- Extract the most recent sources from the CVS repository -->
  23. <target name="extract">
  24. <deltree dir="${buildAnt.source}"/>
  25. <cvs cvsRoot="${buildAnt.cvsRoot}" package="${buildAnt.package}"
  26. dest="${buildAnt.source}"/>
  27. </target>
  28. <!-- Build the distribution according to its instructions -->
  29. <target name="build">
  30. <ant dir="${buildAnt.source}" target="clean"/>
  31. <ant dir="${buildAnt.source}" target="dist"/>
  32. </target>
  33. <!-- Insert add-ons as required for the nightly distribution -->
  34. <target name="addons">
  35. <echo message="Copying addons from '${jaxp.home}' to '${buildAnt.dist}/lib'"/>
  36. <copyfile src="${jaxp.home}/jaxp.jar"
  37. dest="${buildAnt.dist}/lib/jaxp.jar"/>
  38. <copyfile src="${jaxp.home}/parser.jar"
  39. dest="${buildAnt.dist}/lib/parser.jar"/>
  40. </target>
  41. <!-- Package up the distribution in various formats -->
  42. <target name="package">
  43. <!-- Recreate the archive directory -->
  44. <deltree dir="${buildAnt.archive}"/>
  45. <mkdir dir="${buildAnt.archive}"/>
  46. <copydir src="${buildAnt.dist}" dest="${buildAnt.archive}"/>
  47. <!-- Recreate the uploads directory -->
  48. <deltree dir="${buildAnt.uploads}"/>
  49. <mkdir dir="${buildAnt.uploads}"/>
  50. <!-- Create the uploadable files in various formats -->
  51. <tstamp/>
  52. <tar tarfile="${buildAnt.uploads}/${buildAnt.name}-${DSTAMP}.tar"
  53. basedir="${buildAnt.archive}/.."/>
  54. <gzip src="${buildAnt.uploads}/${buildAnt.name}-${DSTAMP}.tar"
  55. zipfile="${buildAnt.uploads}/${buildAnt.name}-${DSTAMP}.tar.gz"/>
  56. <exec dir="${buildAnt.uploads}"
  57. command="compress ${buildAnt.name}-${DSTAMP}.tar"/>
  58. <zip zipfile="${buildAnt.uploads}/${buildAnt.name}-${DSTAMP}.zip"
  59. basedir="${buildAnt.archive}/.."/>
  60. </target>
  61. <!-- Install the distributable files to the Jakarta server -->
  62. <!-- Obviously, this will only work right on the real server!!! -->
  63. <target name="install">
  64. <copydir src="${buildAnt.uploads}" dest="${buildAnt.server}"
  65. includes="${buildAnt.name}-${DSTAMP}.*"/>
  66. <chmod src="${buildAnt.server}/${buildAnt.name}-${DSTAMP}.*"
  67. perm="g+w"/>
  68. <chmod src="${buildAnt.server}/${buildAnt.name}-${DSTAMP}.*"
  69. perm="o+r"/>
  70. </target>
  71. <!-- All-in-one target (except for install) -->
  72. <target name="all" depends="extract,build,addons,package"/>
  73. </project>