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 22 kB

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