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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  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. <delete>
  262. <fileset dir="." includes="**/*~" defaultexcludes="no"/>
  263. </delete>
  264. </target>
  265. <!-- =================================================================== -->
  266. <!-- Total cleanup -->
  267. <!-- =================================================================== -->
  268. <target name="total-clean" depends="clean">
  269. <delete dir="${bin.dir}"/>
  270. <delete file="${lib.dir}/${name}.jar"/>
  271. <delete file="${Name}-${version}.zip"/>
  272. <delete file="${Name}-${version}.tar"/>
  273. <delete file="${Name}-${version}.tar.gz"/>
  274. </target>
  275. <!-- in progress ! (may not work) -->
  276. <target name="get.snapshot">
  277. <get src="http://jakarta.apache.org/build/tmp/ant/ant.src.zip" dest="ant-src.zip" />
  278. <unzip src="ant-src.zip" dest="." />
  279. </target>
  280. <target name="make.snapshot">
  281. <cvs cvsRoot=":pserver:anoncvs@jakarta.apache.org:/home/cvspublic"
  282. package="jakarta-ant"
  283. dest="." />
  284. <zip zipfile="/www/jakarta.apache.org/builds/tmp/ant/ant.src.zip" basedir="." includes="jakarta-ant/**"/>
  285. </target>
  286. <!-- =================================================================== -->
  287. <!-- Compile testcases -->
  288. <!-- =================================================================== -->
  289. <target name="compiletests" depends="jar" if="junit.present">
  290. <mkdir dir="${build.tests}"/>
  291. <javac srcdir="${src.tests.dir}"
  292. destdir="${build.tests}"
  293. debug="on"
  294. deprecation="off" >
  295. <classpath>
  296. <pathelement location="${lib.dir}/${name}.jar" />
  297. <path refid="classpath" />
  298. </classpath>
  299. <exclude name="org/apache/tools/ant/taskdefs/optional/ANTLRTest.java" unless="antlr.present" />
  300. </javac>
  301. </target>
  302. <!-- =================================================================== -->
  303. <!-- Run testcase -->
  304. <!-- =================================================================== -->
  305. <target name="runtests" depends="compiletests" if="junit.present">
  306. <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
  307. <jvmarg value="-classic"/>
  308. <classpath>
  309. <pathelement location="${lib.dir}/${name}.jar" />
  310. <pathelement location="${build.tests}" />
  311. <path refid="classpath" />
  312. <pathelement path="${java.class.path}" />
  313. </classpath>
  314. <formatter type="plain" usefile="false" />
  315. <batchtest>
  316. <fileset dir="${src.tests.dir}">
  317. <include name="**/*Test*" />
  318. <!-- abstract class, not a testcase -->
  319. <exclude name="org/apache/tools/ant/taskdefs/TaskdefsTest.java" />
  320. <!-- these depend on order -->
  321. <exclude name="org/apache/tools/ant/taskdefs/GUnzipTest.java" />
  322. <exclude name="org/apache/tools/ant/taskdefs/GzipTest.java" />
  323. <!-- only run this test if ANTLR is installed -->
  324. <exclude name="org/apache/tools/ant/taskdefs/optional/ANTLRTest.java" unless="antlr.present" />
  325. </fileset>
  326. </batchtest>
  327. <test name="org.apache.tools.ant.taskdefs.GzipTest" />
  328. <test name="org.apache.tools.ant.taskdefs.GUnzipTest" />
  329. </junit>
  330. <!-- clean up again -->
  331. <delete dir="src/etc/testcases/taskdefs/optional/antlr/antlr.tmp" />
  332. <delete dir="src/etc/testcases/taskdefs/taskdefs.tmp" />
  333. <delete dir="src/etc/testcases/taskdefs.tmp" />
  334. </target>
  335. <target name="run.single.test" if="testcase" depends="compiletests">
  336. <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
  337. <jvmarg value="-classic"/>
  338. <classpath>
  339. <pathelement location="${lib.dir}/${name}.jar" />
  340. <pathelement location="${build.tests}" />
  341. <path refid="classpath" />
  342. <pathelement path="${java.class.path}" />
  343. </classpath>
  344. <formatter type="plain" usefile="false" />
  345. <test name="${testcase}" />
  346. </junit>
  347. </target>
  348. <!-- =================================================================== -->
  349. <!-- Targets to build distributions, probaly not that useful for -->
  350. <!-- anybody but the people doing Ant releases. -->
  351. <!-- =================================================================== -->
  352. <property name="JAXP_HOME" value="/usr/local/java/lib/jaxp1.0.1" />
  353. <property name="ant.srcdist.dir" value="../dist/jakarta-ant-src"/>
  354. <target name="srcbuild">
  355. <mkdir dir="${ant.srcdist.dir}" />
  356. <mkdir dir="${ant.srcdist.dir}/lib" />
  357. <copy todir="${ant.srcdist.dir}">
  358. <fileset dir=".">
  359. <exclude name="bin/**" />
  360. <exclude name="lib/**" />
  361. </fileset>
  362. </copy>
  363. <fixcrlf srcdir="${ant.srcdist.dir}" includes="ant,antRun,bootstrap.sh,build.sh" cr="remove"/>
  364. <fixcrlf srcdir="${ant.srcdist.dir}" includes="*.bat" cr="add"/>
  365. <chmod perm="+x">
  366. <fileset dir="${ant.srcdist.dir}">
  367. <patternset refid="chmod.patterns"/>
  368. </fileset>
  369. </chmod>
  370. <copy todir="${ant.srcdist.dir}/lib">
  371. <fileset dir="${JAXP_HOME}">
  372. <include name="**/*.jar" />
  373. </fileset>
  374. </copy>
  375. </target>
  376. <target name="src.zip" depends="srcbuild">
  377. <zip zipfile="${ant.srcdist.dir}/../jakarta-ant-src.zip"
  378. basedir="${ant.srcdist.dir}" />
  379. </target>
  380. <target name="src.tgz" depends="srcbuild">
  381. <property name="src.tar"
  382. value="${ant.srcdist.dir}/../jakarta-ant-src.tar" />
  383. <tar tarfile="${src.tar}" basedir="${ant.srcdist.dir}" />
  384. <gzip src="${src.tar}" zipfile="${src.tar}.gz" />
  385. <delete file="${src.tar}" />
  386. </target>
  387. <target name="srcdist" description="Creates the source distribution"
  388. depends="src.zip,src.tgz" />
  389. <property name="ant.bindist.dir" value="../dist/jakarta-ant-bin"/>
  390. <target name="binbuild" depends="compile">
  391. <!-- ugly hack to build a binary distribution without optional tasks -->
  392. <delete>
  393. <fileset dir="${build.classes}">
  394. <include name="**/Script.java" />
  395. <include name="**/NetRexxC.java" />
  396. <include name="**/XslpLiaison.java" />
  397. <include name="**/XalanLiaison.java" />
  398. <include name="**/Ejbc*.java" />
  399. <include name="**/DDCreator*.java" />
  400. <include name="**/WLRun.java" />
  401. <include name="**/WLStop.java" />
  402. <include name="**/junit/*" />
  403. <include name="**/FTP*.java" />
  404. <include name="**/AntStarTeam*.java" />
  405. </fileset>
  406. </delete>
  407. <mkdir dir="${ant.bindist.dir}"/>
  408. <mkdir dir="${ant.bindist.dir}/bin"/>
  409. <mkdir dir="${ant.bindist.dir}/src"/>
  410. <mkdir dir="${ant.bindist.dir}/etc"/>
  411. <mkdir dir="${ant.bindist.dir}/lib"/>
  412. <mkdir dir="${ant.bindist.dir}/docs/api"/>
  413. <jar jarfile="${ant.bindist.dir}/lib/${name}.jar"
  414. basedir="${build.classes}"
  415. includes="org/**"
  416. manifest="${manifest}"
  417. />
  418. <copy todir="${ant.bindist.dir}/docs">
  419. <fileset dir="${docs.dir}"/>
  420. </copy>
  421. <javadoc packagenames="${packages}"
  422. sourcepath="${basedir}/${src.dir}"
  423. destdir="${ant.bindist.dir}/docs/api"
  424. author="true"
  425. version="true"
  426. windowtitle="${Name} API"
  427. doctitle="${Name}"
  428. bottom="Copyright &#169; 2000 Apache Software Foundation. All Rights Reserved.">
  429. </javadoc>
  430. <copy todir="${ant.bindist.dir}/src">
  431. <fileset dir="${src.dir}"/>
  432. </copy>
  433. <copy todir="${ant.bindist.dir}/etc">
  434. <fileset dir="${src.etc.dir}">
  435. <exclude name="testcases/**" />
  436. </fileset>
  437. </copy>
  438. <copy todir="${ant.bindist.dir}/bin">
  439. <fileset dir="${src.bin.dir}"/>
  440. </copy>
  441. <fixcrlf srcdir="${ant.bindist.dir}/bin" includes="ant,antRun" cr="remove"/>
  442. <fixcrlf srcdir="${ant.bindist.dir}/bin" includes="*.bat" cr="add"/>
  443. <chmod perm="+x">
  444. <fileset dir="${ant.bindist.dir}/bin">
  445. <patternset refid="chmod.patterns"/>
  446. </fileset>
  447. </chmod>
  448. <copy file="build.xml" tofile="${ant.bindist.dir}/lib/build.xml"/>
  449. <copy file="README" tofile="${ant.bindist.dir}/README"/>
  450. <copy file="WHATSNEW" tofile="${ant.bindist.dir}/WHATSNEW"/>
  451. <copy file="TODO" tofile="${ant.bindist.dir}/TODO"/>
  452. <copy file="LICENSE" tofile="${ant.bindist.dir}/LICENSE"/>
  453. <copy todir="${ant.bindist.dir}/lib">
  454. <fileset dir="${JAXP_HOME}">
  455. <include name="**/*.jar" />
  456. </fileset>
  457. </copy>
  458. </target>
  459. <target name="bin.zip" depends="binbuild">
  460. <zip zipfile="${ant.bindist.dir}/../jakarta-ant-bin.zip"
  461. basedir="${ant.bindist.dir}" />
  462. </target>
  463. <target name="bin.tgz" depends="binbuild">
  464. <property name="bin.tar"
  465. value="${ant.bindist.dir}/../jakarta-ant-bin.tar" />
  466. <tar tarfile="${bin.tar}" basedir="${ant.bindist.dir}" />
  467. <gzip src="${bin.tar}" zipfile="${bin.tar}.gz" />
  468. <delete file="${bin.tar}" />
  469. </target>
  470. <target name="bindist" description="Creates the binary distribution"
  471. depends="bin.zip,bin.tgz" />
  472. <property name="contributed.tasks" value="../build/ant.contrib" />
  473. <property name="optional" value="../dist/optional.jar" />
  474. <target name="optional.jar" depends="compile"
  475. description="Creates a JAR of the optional tasks">
  476. <mkdir dir="${contributed.tasks}" />
  477. <copy todir="${contributed.tasks}">
  478. <fileset dir="${build.classes}">
  479. <include name="**/optional/**" />
  480. </fileset>
  481. </copy>
  482. <jar jarfile="${optional}"
  483. basedir="${contributed.tasks}"
  484. manifest="${manifest}"
  485. />
  486. </target>
  487. <target name="release.dist" depends="srcdist,bindist,optional.jar"
  488. description="Creates all five files for a release build" />
  489. </project>