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

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