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

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