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.

build.xml 23 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. <?xml version="1.0"?>
  2. <!-- ======================================================================= -->
  3. <!-- Ant own build file -->
  4. <!-- ======================================================================= -->
  5. <project name="Ant" default="main" basedir=".">
  6. <!-- Give user a chance to override without editing this file
  7. (and without typing -D each time it compiles it) -->
  8. <property file="${user.home}/.ant.properties" />
  9. <property file=".ant.properties" />
  10. <property name="Name" value="Ant"/>
  11. <property name="name" value="ant"/>
  12. <property name="version" value="1.3alpha"/>
  13. <property name="ant.home" value="."/>
  14. <property name="src.bin.dir" value="src/bin"/>
  15. <property name="src.etc.dir" value="src/etc"/>
  16. <property name="src.dir" value="src/main"/>
  17. <property name="src.tests.dir" value="src/testcases"/>
  18. <property name="docs.dir" value="docs"/>
  19. <property name="build.dir" value="../build/ant"/>
  20. <property name="lib.dir" value="${build.dir}/lib"/>
  21. <property name="bin.dir" value="${build.dir}/bin"/>
  22. <property name="build.classes" value="${build.dir}/classes"/>
  23. <property name="build.javadocs" value="${build.dir}/javadocs"/>
  24. <property name="build.tests" value="${build.dir}/testcases"/>
  25. <property name="ant.dist.dir" value="../dist/ant"/>
  26. <path id="classpath">
  27. </path>
  28. <property name="packages" value="org.apache.tools.*"/>
  29. <property name="manifest" value="src/etc/manifest"/>
  30. <!-- =================================================================== -->
  31. <!-- Set some the defaults the user can override in .ant.properties -->
  32. <!-- =================================================================== -->
  33. <property name="build.compiler" value="classic"/>
  34. <property name="build.compiler.emacs" value="on"/>
  35. <property name="junit.fork" value="false" />
  36. <!-- =================================================================== -->
  37. <!-- Define a global set of patterns that can be referenced by -->
  38. <!-- its id attribute -->
  39. <!-- =================================================================== -->
  40. <patternset id="chmod.patterns">
  41. <include name="**/ant" />
  42. <include name="**/antRun" />
  43. <include name="**/bootstrap.sh" />
  44. <include name="**/build.sh" />
  45. </patternset>
  46. <!-- =================================================================== -->
  47. <!-- Check to see what optional dependencies are available -->
  48. <!-- =================================================================== -->
  49. <target name="check_for_optional_packages">
  50. <available property="jdk1.2+" classname="java.lang.ThreadLocal" />
  51. <available property="jdk1.3+" classname="java.lang.StrictMath" />
  52. <available property="bsf.present" classname="com.ibm.bsf.BSFManager" />
  53. <available property="netrexx.present" classname="netrexx.lang.Rexx" />
  54. <available property="xslp.present"
  55. classname="com.kvisco.xsl.XSLProcessor" />
  56. <available property="xalan.present"
  57. classname="org.apache.xalan.xslt.XSLTProcessorFactory" />
  58. <available property="ejb.ejbc.present" classname="weblogic.ejbc" />
  59. <available property="ejb.DDCreator.present" classname="weblogic.ejb.utils.DDCreator" />
  60. <available property="ejb.wls.present" classname="weblogic.Server" />
  61. <available property="junit.present" classname="junit.framework.TestCase" />
  62. <available property="netcomp.present" classname="com.oroinc.net.ftp.FTPClient" />
  63. <available property="starteam.present" classname="com.starbase.util.Platform" />
  64. <available property="antlr.present" classname="antlr.Tool" />
  65. <available property="vaj.present" classname="com.ibm.ivj.util.base.Workspace" />
  66. <available property="stylebook.present" classname="org.apache.stylebook.Engine" />
  67. </target>
  68. <!-- =================================================================== -->
  69. <!-- Prepares the build directory -->
  70. <!-- =================================================================== -->
  71. <target name="prepare">
  72. <mkdir dir="${build.dir}"/>
  73. <tstamp />
  74. </target>
  75. <!-- =================================================================== -->
  76. <!-- Compiles the source code -->
  77. <!-- =================================================================== -->
  78. <target name="compile" depends="prepare,check_for_optional_packages">
  79. <mkdir dir="${build.classes}"/>
  80. <javac srcdir="${src.dir}"
  81. destdir="${build.classes}"
  82. debug="on"
  83. deprecation="off"
  84. optimize="on" >
  85. <classpath refid="classpath" />
  86. <exclude name="**/Script.java" unless="bsf.present" />
  87. <exclude name="**/StyleBook.java" unless="stylebook.present" />
  88. <exclude name="**/NetRexxC.java" unless="netrexx.present" />
  89. <exclude name="**/XslpLiaison.java" unless="xslp.present" />
  90. <exclude name="**/XalanLiaison.java" unless="xalan.present" />
  91. <exclude name="**/Ejbc*.java" unless="ejb.ejbc.present" />
  92. <exclude name="**/DDCreator*.java" unless="ejb.DDCreator.present" />
  93. <exclude name="**/WLRun.java" unless="ejb.wls.present" />
  94. <exclude name="**/WLStop.java" unless="ejb.wls.present" />
  95. <exclude name="**/EjbJar.java" unless="jdk1.2+" />
  96. <exclude name="**/*DeploymentTool.java" unless="jdk1.2+" />
  97. <exclude name="**/junit/*" unless="junit.present" />
  98. <exclude name="**/net/*.java" unless="netcomp.present" />
  99. <exclude name="**/AntStarTeam*.java" unless="starteam.present" />
  100. <exclude name="**/ANTLR.java" unless="antlr.present" />
  101. <exclude name="**/ide/VAJ*.java" unless="vaj.present" />
  102. </javac>
  103. <copy todir="${build.classes}">
  104. <fileset dir="${src.dir}">
  105. <include name="**/*.properties" />
  106. </fileset>
  107. </copy>
  108. <filter token="VERSION" value="${version}" />
  109. <filter token="DATE" value="${TODAY}" />
  110. <filter token="TIME" value="${TSTAMP}" />
  111. <copy todir="${build.classes}"
  112. overwrite="true"
  113. filtering="on">
  114. <fileset dir="${src.dir}">
  115. <include name="**/version.txt" />
  116. <include name="**/defaultManifest.mf" />
  117. </fileset>
  118. </copy>
  119. </target>
  120. <!-- =================================================================== -->
  121. <!-- Creates the jar archive -->
  122. <!-- =================================================================== -->
  123. <target name="jar" depends="compile">
  124. <mkdir dir="${lib.dir}"/>
  125. <jar jarfile="${lib.dir}/${name}.jar"
  126. basedir="${build.classes}"
  127. includes="org/**"
  128. manifest="${manifest}"
  129. />
  130. </target>
  131. <!-- =================================================================== -->
  132. <!-- Creates the binary structure -->
  133. <!-- =================================================================== -->
  134. <target name="main" depends="jar" description="Creates the binary structure">
  135. <mkdir dir="${bin.dir}"/>
  136. <copy todir="${bin.dir}">
  137. <fileset dir="${src.bin.dir}"/>
  138. </copy>
  139. <chmod perm="+x">
  140. <fileset dir="${bin.dir}">
  141. <patternset refid="chmod.patterns"/>
  142. </fileset>
  143. </chmod>
  144. <fixcrlf srcdir="${bin.dir}" includes="ant,antRun" cr="remove"/>
  145. <fixcrlf srcdir="${bin.dir}" includes="*.bat" cr="add"/>
  146. </target>
  147. <!-- =================================================================== -->
  148. <!-- Creates the API documentation -->
  149. <!-- =================================================================== -->
  150. <target name="javadocs" depends="prepare" description="Creates the API documentation">
  151. <mkdir dir="${build.javadocs}"/>
  152. <javadoc packagenames="${packages}"
  153. sourcepath="${basedir}/${src.dir}"
  154. destdir="${build.javadocs}"
  155. author="true"
  156. version="true"
  157. windowtitle="${Name} API"
  158. doctitle="${Name}"
  159. bottom="Copyright &#169; 2000 Apache Software Foundation. All Rights Reserved.">
  160. <group title="Ant Core" packages="org.apache.tools.ant*" />
  161. <group title="Core Tasks" packages="org.apache.tools.ant.taskdefs*" />
  162. <group title="Optional Tasks" packages="org.apache.tools.ant.taskdefs.optional*" />
  163. </javadoc>
  164. </target>
  165. <!-- =================================================================== -->
  166. <!-- Creates the distribution -->
  167. <!-- =================================================================== -->
  168. <target name="dist" depends="main,jar,javadocs" description="Creates the distribution">
  169. <mkdir dir="${ant.dist.dir}"/>
  170. <mkdir dir="${ant.dist.dir}/bin"/>
  171. <mkdir dir="${ant.dist.dir}/lib"/>
  172. <mkdir dir="${ant.dist.dir}/docs"/>
  173. <mkdir dir="${ant.dist.dir}/docs/api"/>
  174. <mkdir dir="${ant.dist.dir}/src"/>
  175. <copy todir="${ant.dist.dir}/src">
  176. <fileset dir="${src.dir}"/>
  177. </copy>
  178. <copy todir="${ant.dist.dir}/lib">
  179. <fileset dir="${lib.dir}"/>
  180. </copy>
  181. <copy file="build.xml" tofile="${ant.dist.dir}/lib/build.xml"/>
  182. <copy todir="${ant.dist.dir}/bin">
  183. <fileset dir="src/bin"/>
  184. </copy>
  185. <copy todir="${ant.dist.dir}/docs">
  186. <fileset dir="${docs.dir}"/>
  187. </copy>
  188. <copy todir="${ant.dist.dir}/docs/api">
  189. <fileset dir="${build.javadocs}"/>
  190. </copy>
  191. <fixcrlf srcdir="${ant.dist.dir}/bin" includes="ant,antRun" cr="remove"/>
  192. <fixcrlf srcdir="${ant.dist.dir}/bin" includes="*.bat" cr="add"/>
  193. <chmod perm="+x">
  194. <fileset dir="${ant.dist.dir}/bin">
  195. <patternset refid="chmod.patterns"/>
  196. </fileset>
  197. </chmod>
  198. <copy file="README" tofile="${ant.dist.dir}/README"/>
  199. <copy file="WHATSNEW" tofile="${ant.dist.dir}/WHATSNEW"/>
  200. <copy file="TODO" tofile="${ant.dist.dir}/TODO"/>
  201. <copy file="LICENSE" tofile="${ant.dist.dir}/LICENSE"/>
  202. </target>
  203. <!-- =================================================================== -->
  204. <!-- Packages the distribution with ZIP -->
  205. <!-- =================================================================== -->
  206. <target name="dist-zip" depends="dist">
  207. <zip zipfile="${Name}-${version}.zip" basedir="${ant.dist.dir}" includes="**"/>
  208. </target>
  209. <!-- =================================================================== -->
  210. <!-- Packages the distribution with TAR-GZIP -->
  211. <!-- =================================================================== -->
  212. <target name="dist-tgz" depends="dist">
  213. <tar tarfile="${Name}-${version}.tar" basedir="${ant.dist.dir}" includes="**"/>
  214. <gzip zipfile="${Name}-${version}.tar.gz" src="${Name}-${version}.tar"/>
  215. </target>
  216. <!-- =================================================================== -->
  217. <!-- Installs the ant.jar library and binary files into ant.home -->
  218. <!-- =================================================================== -->
  219. <target name="bootstrap" depends="main" description="Installs the ant.jar library and binary files into ant.home">
  220. <echo message="copying bootstrapped files into bin and lib"/>
  221. <copy todir="lib">
  222. <fileset dir="${lib.dir}"/>
  223. </copy>
  224. <copy todir="bin">
  225. <fileset dir="${bin.dir}"/>
  226. </copy>
  227. </target>
  228. <target name="install" depends="dist" if="ant.install">
  229. <echo message="installing full copy of ant into ${ant.install}"/>
  230. <mkdir dir="${ant.install}"/>
  231. <copy todir="${ant.install}">
  232. <fileset dir="${ant.dist.dir}"/>
  233. </copy>
  234. <chmod perm="+x">
  235. <fileset dir="${ant.install}/bin">
  236. <patternset refid="chmod.patterns"/>
  237. </fileset>
  238. </chmod>
  239. </target>
  240. <target name="fullinstall" depends="install"/>
  241. <target name="mininstall" depends="main" if="ant.install">
  242. <echo message="copy minimal ant installation into ${ant.install}"/>
  243. <mkdir dir="${ant.install}"/>
  244. <copy todir="${ant.install}/lib">
  245. <fileset dir="${lib.dir}"/>
  246. </copy>
  247. <copy todir="${ant.install}/bin">
  248. <fileset dir="${bin.dir}"/>
  249. </copy>
  250. <chmod perm="+x">
  251. <fileset dir="${ant.install}/bin">
  252. <patternset refid="chmod.patterns"/>
  253. </fileset>
  254. </chmod>
  255. </target>
  256. <!-- =================================================================== -->
  257. <!-- Cleans up generated stuff -->
  258. <!-- =================================================================== -->
  259. <target name="clean">
  260. <delete dir="${build.dir}"/>
  261. <delete dir="${ant.dist.dir}"/>
  262. <delete>
  263. <fileset dir="." includes="**/*~" defaultexcludes="no"/>
  264. </delete>
  265. </target>
  266. <!-- =================================================================== -->
  267. <!-- Total cleanup -->
  268. <!-- =================================================================== -->
  269. <target name="total-clean" depends="clean">
  270. <delete dir="${bin.dir}"/>
  271. <delete file="${lib.dir}/${name}.jar"/>
  272. <delete file="${Name}-${version}.zip"/>
  273. <delete file="${Name}-${version}.tar"/>
  274. <delete file="${Name}-${version}.tar.gz"/>
  275. </target>
  276. <!-- in progress ! (may not work) -->
  277. <target name="get.snapshot">
  278. <get src="http://jakarta.apache.org/build/tmp/ant/ant.src.zip" dest="ant-src.zip" />
  279. <unzip src="ant-src.zip" dest="." />
  280. </target>
  281. <target name="make.snapshot">
  282. <cvs cvsRoot=":pserver:anoncvs@jakarta.apache.org:/home/cvspublic"
  283. package="jakarta-ant"
  284. dest="." />
  285. <zip zipfile="/www/jakarta.apache.org/builds/tmp/ant/ant.src.zip" basedir="." includes="jakarta-ant/**"/>
  286. </target>
  287. <!-- =================================================================== -->
  288. <!-- Compile testcases -->
  289. <!-- =================================================================== -->
  290. <target name="compiletests" depends="jar" if="junit.present">
  291. <mkdir dir="${build.tests}"/>
  292. <javac srcdir="${src.tests.dir}"
  293. destdir="${build.tests}"
  294. debug="on"
  295. deprecation="off" >
  296. <classpath>
  297. <pathelement location="${lib.dir}/${name}.jar" />
  298. <path refid="classpath" />
  299. </classpath>
  300. <exclude name="org/apache/tools/ant/taskdefs/optional/ANTLRTest.java" unless="antlr.present" />
  301. </javac>
  302. </target>
  303. <!-- =================================================================== -->
  304. <!-- Run testcase -->
  305. <!-- =================================================================== -->
  306. <target name="runtests" depends="compiletests" if="junit.present">
  307. <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
  308. <jvmarg value="-classic"/>
  309. <classpath>
  310. <pathelement location="${lib.dir}/${name}.jar" />
  311. <pathelement location="${build.tests}" />
  312. <path refid="classpath" />
  313. <pathelement path="${java.class.path}" />
  314. </classpath>
  315. <formatter type="plain" usefile="false" />
  316. <batchtest>
  317. <fileset dir="${src.tests.dir}">
  318. <include name="**/*Test*" />
  319. <!-- abstract class, not a testcase -->
  320. <exclude name="org/apache/tools/ant/taskdefs/TaskdefsTest.java" />
  321. <!-- these depend on order -->
  322. <exclude name="org/apache/tools/ant/taskdefs/GUnzipTest.java" />
  323. <exclude name="org/apache/tools/ant/taskdefs/GzipTest.java" />
  324. <!-- only run this test if ANTLR is installed -->
  325. <exclude name="org/apache/tools/ant/taskdefs/optional/ANTLRTest.java" unless="antlr.present" />
  326. </fileset>
  327. </batchtest>
  328. <test name="org.apache.tools.ant.taskdefs.GzipTest" />
  329. <test name="org.apache.tools.ant.taskdefs.GUnzipTest" />
  330. </junit>
  331. <!-- clean up again -->
  332. <delete dir="src/etc/testcases/taskdefs/optional/antlr/antlr.tmp" />
  333. <delete dir="src/etc/testcases/taskdefs/taskdefs.tmp" />
  334. <delete dir="src/etc/testcases/taskdefs.tmp" />
  335. </target>
  336. <target name="run.single.test" if="testcase" depends="compiletests">
  337. <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
  338. <jvmarg value="-classic"/>
  339. <classpath>
  340. <pathelement location="${lib.dir}/${name}.jar" />
  341. <pathelement location="${build.tests}" />
  342. <path refid="classpath" />
  343. <pathelement path="${java.class.path}" />
  344. </classpath>
  345. <formatter type="plain" usefile="false" />
  346. <test name="${testcase}" />
  347. </junit>
  348. </target>
  349. <!-- =================================================================== -->
  350. <!-- Targets to build distributions, probaly not that useful for -->
  351. <!-- anybody but the people doing Ant releases. -->
  352. <!-- =================================================================== -->
  353. <property name="JAXP_HOME" value="/usr/local/java/lib/jaxp1.0.1" />
  354. <property name="ant.srcdist.dir" value="../dist/jakarta-ant-src"/>
  355. <target name="srcbuild">
  356. <mkdir dir="${ant.srcdist.dir}" />
  357. <mkdir dir="${ant.srcdist.dir}/lib" />
  358. <copy todir="${ant.srcdist.dir}">
  359. <fileset dir=".">
  360. <exclude name="bin/**" />
  361. <exclude name="lib/**" />
  362. </fileset>
  363. </copy>
  364. <fixcrlf srcdir="${ant.srcdist.dir}" includes="ant,antRun,bootstrap.sh,build.sh" cr="remove"/>
  365. <fixcrlf srcdir="${ant.srcdist.dir}" includes="*.bat" cr="add"/>
  366. <chmod perm="+x">
  367. <fileset dir="${ant.srcdist.dir}">
  368. <patternset refid="chmod.patterns"/>
  369. </fileset>
  370. </chmod>
  371. <copy todir="${ant.srcdist.dir}/lib">
  372. <fileset dir="${JAXP_HOME}">
  373. <include name="**/*.jar" />
  374. </fileset>
  375. </copy>
  376. </target>
  377. <target name="src.zip" depends="srcbuild">
  378. <zip zipfile="${ant.srcdist.dir}/../jakarta-ant-src.zip"
  379. basedir="${ant.srcdist.dir}" />
  380. </target>
  381. <target name="src.tgz" depends="srcbuild">
  382. <property name="src.tar"
  383. value="${ant.srcdist.dir}/../jakarta-ant-src.tar" />
  384. <tar tarfile="${src.tar}" basedir="${ant.srcdist.dir}" />
  385. <gzip src="${src.tar}" zipfile="${src.tar}.gz" />
  386. <delete file="${src.tar}" />
  387. </target>
  388. <target name="srcdist" description="Creates the source distribution"
  389. depends="src.zip,src.tgz" />
  390. <property name="ant.bindist.dir" value="../dist/jakarta-ant-bin"/>
  391. <target name="binbuild" depends="compile">
  392. <!-- ugly hack to build a binary distribution without optional tasks -->
  393. <delete>
  394. <fileset dir="${build.classes}">
  395. <include name="**/Script.java" />
  396. <include name="**/NetRexxC.java" />
  397. <include name="**/XslpLiaison.java" />
  398. <include name="**/XalanLiaison.java" />
  399. <include name="**/Ejbc*.java" />
  400. <include name="**/DDCreator*.java" />
  401. <include name="**/WLRun.java" />
  402. <include name="**/WLStop.java" />
  403. <include name="**/junit/*" />
  404. <include name="**/FTP*.java" />
  405. <include name="**/AntStarTeam*.java" />
  406. </fileset>
  407. </delete>
  408. <mkdir dir="${ant.bindist.dir}"/>
  409. <mkdir dir="${ant.bindist.dir}/bin"/>
  410. <mkdir dir="${ant.bindist.dir}/src"/>
  411. <mkdir dir="${ant.bindist.dir}/etc"/>
  412. <mkdir dir="${ant.bindist.dir}/lib"/>
  413. <mkdir dir="${ant.bindist.dir}/docs/api"/>
  414. <jar jarfile="${ant.bindist.dir}/lib/${name}.jar"
  415. basedir="${build.classes}"
  416. includes="org/**"
  417. manifest="${manifest}"
  418. />
  419. <copy todir="${ant.bindist.dir}/docs">
  420. <fileset dir="${docs.dir}"/>
  421. </copy>
  422. <javadoc packagenames="${packages}"
  423. sourcepath="${basedir}/${src.dir}"
  424. destdir="${ant.bindist.dir}/docs/api"
  425. author="true"
  426. version="true"
  427. windowtitle="${Name} API"
  428. doctitle="${Name}"
  429. bottom="Copyright &#169; 2000 Apache Software Foundation. All Rights Reserved.">
  430. </javadoc>
  431. <copy todir="${ant.bindist.dir}/src">
  432. <fileset dir="${src.dir}"/>
  433. </copy>
  434. <copy todir="${ant.bindist.dir}/etc">
  435. <fileset dir="${src.etc.dir}">
  436. <exclude name="testcases/**" />
  437. </fileset>
  438. </copy>
  439. <copy todir="${ant.bindist.dir}/bin">
  440. <fileset dir="${src.bin.dir}"/>
  441. </copy>
  442. <fixcrlf srcdir="${ant.bindist.dir}/bin" includes="ant,antRun" cr="remove"/>
  443. <fixcrlf srcdir="${ant.bindist.dir}/bin" includes="*.bat" cr="add"/>
  444. <chmod perm="+x">
  445. <fileset dir="${ant.bindist.dir}/bin">
  446. <patternset refid="chmod.patterns"/>
  447. </fileset>
  448. </chmod>
  449. <copy file="build.xml" tofile="${ant.bindist.dir}/lib/build.xml"/>
  450. <copy file="README" tofile="${ant.bindist.dir}/README"/>
  451. <copy file="WHATSNEW" tofile="${ant.bindist.dir}/WHATSNEW"/>
  452. <copy file="TODO" tofile="${ant.bindist.dir}/TODO"/>
  453. <copy file="LICENSE" tofile="${ant.bindist.dir}/LICENSE"/>
  454. <copy todir="${ant.bindist.dir}/lib">
  455. <fileset dir="${JAXP_HOME}">
  456. <include name="**/*.jar" />
  457. </fileset>
  458. </copy>
  459. </target>
  460. <target name="bin.zip" depends="binbuild">
  461. <zip zipfile="${ant.bindist.dir}/../jakarta-ant-bin.zip"
  462. basedir="${ant.bindist.dir}" />
  463. </target>
  464. <target name="bin.tgz" depends="binbuild">
  465. <property name="bin.tar"
  466. value="${ant.bindist.dir}/../jakarta-ant-bin.tar" />
  467. <tar tarfile="${bin.tar}" basedir="${ant.bindist.dir}" />
  468. <gzip src="${bin.tar}" zipfile="${bin.tar}.gz" />
  469. <delete file="${bin.tar}" />
  470. </target>
  471. <target name="bindist" description="Creates the binary distribution"
  472. depends="bin.zip,bin.tgz" />
  473. <property name="contributed.tasks" value="../build/ant.contrib" />
  474. <property name="optional" value="../dist/optional.jar" />
  475. <target name="optional.jar" depends="compile"
  476. description="Creates a JAR of the optional tasks">
  477. <mkdir dir="${contributed.tasks}" />
  478. <copy todir="${contributed.tasks}">
  479. <fileset dir="${build.classes}">
  480. <include name="**/optional/**" />
  481. </fileset>
  482. </copy>
  483. <jar jarfile="${optional}"
  484. basedir="${contributed.tasks}"
  485. manifest="${manifest}"
  486. />
  487. </target>
  488. <target name="release.dist" depends="srcdist,bindist,optional.jar"
  489. description="Creates all five files for a release build" />
  490. </project>