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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732
  1. <?xml version="1.0"?>
  2. <!--
  3. =======================================================================
  4. Apache Ant own build file
  5. Copyright (c) 2000-2005 The Apache Software Foundation. All rights
  6. reserved.
  7. =======================================================================
  8. -->
  9. <project name="apache-ant" default="main" basedir=".">
  10. <!-- Give user a chance to override without editing this file
  11. (and without typing -D each time it compiles it) -->
  12. <property file=".ant.properties"/>
  13. <property file="${user.home}/.ant.properties"/>
  14. <property environment="env"/>
  15. <!--
  16. ===================================================================
  17. Set the properties that control names and versions
  18. ===================================================================
  19. -->
  20. <property name="Name" value="Apache Ant"/>
  21. <property name="name" value="ant"/>
  22. <property name="version" value="1.7alpha"/>
  23. <property name="manifest-version" value="1.7"/>
  24. <property name="bootstrap.jar" value="ant-bootstrap.jar"/>
  25. <property name="ant.package" value="org/apache/tools/ant"/>
  26. <property name="taskdefs.package" value="${ant.package}/taskdefs"/>
  27. <property name="condition.package" value="${taskdefs.package}/condition"/>
  28. <property name="optional.package" value="${taskdefs.package}/optional"/>
  29. <property name="optional.condition.package" value="${optional.package}/condition"/>
  30. <property name="type.package" value="${ant.package}/types"/>
  31. <property name="optional.type.package" value="${type.package}/optional"/>
  32. <property name="apache.resolver.type.package" value="${ant.package}/types/resolver"/>
  33. <property name="util.package" value="${ant.package}/util"/>
  34. <property name="regexp.package" value="${util.package}/regexp"/>
  35. <property name="optional.jars.prefix" value="ant"/>
  36. <!--
  37. ===================================================================
  38. Set the properties that control various build options
  39. ===================================================================
  40. -->
  41. <property name="debug" value="true"/>
  42. <property name="chmod.fail" value="true"/>
  43. <property name="chmod.maxparallel" value="250"/>
  44. <property name="deprecation" value="false"/>
  45. <property name="optimize" value="true"/>
  46. <property name="javac.target" value="1.2"/>
  47. <property name="javac.source" value="1.2"/>
  48. <property name="junit.fork" value="false"/>
  49. <property name="junit.filtertrace" value="off"/>
  50. <property name="junit.summary" value="no"/>
  51. <property name="test.haltonfailure" value="yes"/>
  52. <property name="junit.forkmode" value="once"/>
  53. <property name="unfiltered.files" value="**/*.gif,**/*.jpg,**/*.ico,**/*.pdf,**/*.zip"/>
  54. <!--
  55. ===================================================================
  56. Set the properties related to the source tree
  57. ===================================================================
  58. -->
  59. <property name="src.dir" value="src"/>
  60. <property name="java.dir" value="${src.dir}/main"/>
  61. <property name="script.dir" value="${src.dir}/script"/>
  62. <property name="lib.dir" value="lib"/>
  63. <property name="docs.dir" value="docs"/>
  64. <property name="etc.dir" value="src/etc"/>
  65. <property name="tests.dir" value="src/testcases"/>
  66. <property name="tests.etc.dir" value="src/etc/testcases"/>
  67. <property name="manifest" value="src/etc/manifest"/>
  68. <!--
  69. ===================================================================
  70. Set the properties for the build area
  71. ===================================================================
  72. -->
  73. <property name="build.dir" value="build"/>
  74. <property name="bootstrap.dir" value="bootstrap"/>
  75. <property name="build.classes" value="${build.dir}/classes"/>
  76. <property name="build.lib" value="${build.dir}/lib"/>
  77. <property name="build.javadocs" value="${build.dir}/javadocs"/>
  78. <property name="build.tests" value="${build.dir}/testcases"/>
  79. <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/>
  80. <property name="manifest.tmp" value="${build.dir}/optional.manifest"/>
  81. <!-- the absolute path -->
  82. <property name="build.tests.value" location="${build.tests}"/>
  83. <!--
  84. ===================================================================
  85. Set the paths used in the build
  86. ===================================================================
  87. -->
  88. <path id="classpath">
  89. </path>
  90. <path id="tests-classpath">
  91. <pathelement location="${build.classes}"/>
  92. <pathelement location="${build.tests}"/>
  93. <!--
  94. include the test source and test data dirs
  95. so that we can pick resources via getResource(AsStream)
  96. -->
  97. <pathelement location="${tests.dir}"/>
  98. <pathelement location="${tests.etc.dir}"/>
  99. <path refid="classpath"/>
  100. </path>
  101. <!-- turn this path into a string which is passed to the tests -->
  102. <property name="tests-classpath.value"
  103. refid="tests-classpath"/>
  104. <!--
  105. ===================================================================
  106. Set up properties for the distribution area
  107. ===================================================================
  108. -->
  109. <property name="dist.name" value="apache-${name}-${version}"/>
  110. <property name="dist.base" value="distribution"/>
  111. <property name="dist.dir" value="dist"/>
  112. <property name="dist.bin" value="${dist.dir}/bin"/>
  113. <property name="dist.lib" value="${dist.dir}/lib"/>
  114. <property name="dist.docs" value="${dist.dir}/docs"/>
  115. <property name="dist.etc" value="${dist.dir}/etc"/>
  116. <property name="dist.javadocs" value="${dist.dir}/docs/manual/api"/>
  117. <property name="src.dist.dir" value="dist-src"/>
  118. <property name="src.dist.src" value="${src.dist.dir}/src"/>
  119. <property name="src.dist.docs" value="${src.dist.dir}/docs"/>
  120. <property name="src.dist.lib" value="${src.dist.dir}/lib"/>
  121. <property name="java-repository.dir" value="java-repository/ant/jars"/>
  122. <!--
  123. ===================================================================
  124. Set up selectors to be used by javac, junit and jar to exclude
  125. files that have dependencies that are not available
  126. ===================================================================
  127. -->
  128. <!-- depends on JDK version -->
  129. <selector id="needs.jdk1.3+">
  130. <or>
  131. <filename name="${ant.package}/taskdefs/TestProcess*"/>
  132. <filename name="${optional.package}/extension/**"/>
  133. </or>
  134. </selector>
  135. <selector id="needs.jdk1.4+">
  136. <or>
  137. <filename name="${regexp.package}/Jdk14Regexp*"/>
  138. <filename name="${ant.package}/types/AssertionsTest.java"/>
  139. </or>
  140. </selector>
  141. <selector id="needs.jdk1.5+">
  142. <or>
  143. <filename name="${taskdefs.package}/AptTest*"/>
  144. </or>
  145. </selector>
  146. <!-- Kaffe has some JDK 1.5 features including java.lang.Readable,
  147. but not all of them -->
  148. <selector id="not.in.kaffe">
  149. <or>
  150. <filename name="${condition.package}/IsReachable*"/>
  151. </or>
  152. </selector>
  153. <selector id="needs.sun.uue">
  154. <filename name="${ant.package}/taskdefs/email/UUMailer*"/>
  155. </selector>
  156. <selector id="needs.sun.b64">
  157. <or>
  158. <filename name="${optional.package}/splash/SplashTask*"/>
  159. <filename name="${optional.package}/splash/SplashScreenTest.java"/>
  160. </or>
  161. </selector>
  162. <!-- depends on external libraries -->
  163. <selector id="needs.trax">
  164. <or>
  165. <filename name="${optional.package}/junit/Xalan2Executor*"/>
  166. <filename name="${optional.package}/TraXLiaison*"/>
  167. <filename name="${optional.package}/sitraka/**"/>
  168. <filename name="${optional.package}/metamata/MMetrics*"/>
  169. <filename name="${optional.package}/XsltTest*"/>
  170. <filename name="${type.package}/XMLCatalogBuildFileTest*"/>
  171. </or>
  172. </selector>
  173. <selector id="needs.xalan1">
  174. <or>
  175. <filename name="${optional.package}/XalanLiaison*"/>
  176. <filename name="${optional.package}/junit/Xalan1Executor*"/>
  177. </or>
  178. </selector>
  179. <selector id="needs.xslp">
  180. <filename name="${optional.package}/XslpLiaison*"/>
  181. </selector>
  182. <selector id="needs.apache-resolver">
  183. <filename name="${apache.resolver.type.package}/**"/>
  184. </selector>
  185. <selector id="needs.junit">
  186. <filename name="${optional.package}/junit/**"/>
  187. </selector>
  188. <selector id="needs.apache-regexp">
  189. <filename name="${regexp.package}/JakartaRegexp*"/>
  190. </selector>
  191. <selector id="needs.apache-oro">
  192. <or>
  193. <filename name="${regexp.package}/JakartaOro*"/>
  194. <filename name="${optional.package}/perforce/*"/>
  195. <filename name="${optional.package}/metamata/MAudit*"/>
  196. </or>
  197. </selector>
  198. <selector id="needs.apache-bcel">
  199. <or>
  200. <filename name="${ant.package}/filters/util/JavaClassHelper*"/>
  201. <filename name="${util.package}/depend/bcel/*"/>
  202. <filename name="${optional.type.package}/depend/ClassFileSetTest*"/>
  203. </or>
  204. </selector>
  205. <selector id="needs.apache-log4j">
  206. <filename name="${ant.package}/listener/Log4jListener*"/>
  207. </selector>
  208. <selector id="needs.commons-logging">
  209. <filename name="${ant.package}/listener/CommonsLoggingListener*"/>
  210. </selector>
  211. <selector id="needs.apache-bsf">
  212. <or>
  213. <filename name="${optional.package}/Script*"/>
  214. <filename name="${optional.package}/script/**/*"/>
  215. <filename name="${optional.type.package}/Script*"/>
  216. <filename name="${util.package}/Script*"/>
  217. </or>
  218. </selector>
  219. <selector id="needs.stylebook">
  220. <filename name="${optional.package}/StyleBook*"/>
  221. </selector>
  222. <selector id="needs.javamail">
  223. <or>
  224. <filename name="${ant.package}/taskdefs/email/MimeMailer*"/>
  225. </or>
  226. </selector>
  227. <selector id="needs.icontract">
  228. <filename name="${optional.package}/IContract*"/>
  229. </selector>
  230. <selector id="needs.netrexx">
  231. <filename name="${optional.package}/NetRexxC*"/>
  232. </selector>
  233. <selector id="needs.weblogic.ejbc">
  234. <filename name="${optional.package}/ejb/Ejbc*"/>
  235. </selector>
  236. <selector id="needs.weblogic.ddcreator">
  237. <filename name="${optional.package}/ejb/DDCreator*"/>
  238. </selector>
  239. <selector id="needs.weblogic.server">
  240. <or>
  241. <filename name="${optional.package}/ejb/WLRun*"/>
  242. <filename name="${optional.package}/ejb/WLStop*"/>
  243. </or>
  244. </selector>
  245. <selector id="needs.commons-net">
  246. <or>
  247. <filename name="${optional.package}/net/FTP*"/>
  248. <filename name="${optional.package}/net/RExec*"/>
  249. <filename name="${optional.package}/net/TelnetTask*"/>
  250. </or>
  251. </selector>
  252. <selector id="needs.starteam">
  253. <or>
  254. <filename name="${optional.package}/scm/AntStarTeam*"/>
  255. <filename name="${optional.package}/starteam/*"/>
  256. </or>
  257. </selector>
  258. <selector id="needs.vaj">
  259. <filename name="${optional.package}/ide/VAJ*"/>
  260. </selector>
  261. <selector id="needs.antlr">
  262. <filename name="${optional.package}/ANTLR*"/>
  263. </selector>
  264. <selector id="needs.jmf">
  265. <filename name="${optional.package}/sound/*"/>
  266. </selector>
  267. <selector id="needs.jai">
  268. <or>
  269. <filename name="${optional.package}/image/*"/>
  270. <filename name="${optional.type.package}/image/*"/>
  271. </or>
  272. </selector>
  273. <selector id="needs.jdepend">
  274. <filename name="${optional.package}/jdepend/*"/>
  275. </selector>
  276. <selector id="needs.swing">
  277. <filename name="${optional.package}/splash/*"/>
  278. </selector>
  279. <selector id="needs.jsch">
  280. <filename name="${optional.package}/ssh/*"/>
  281. </selector>
  282. <selector id="ant.launcher">
  283. <filename name="${ant.package}/launch/**/*"/>
  284. </selector>
  285. <patternset id="onlinetests">
  286. <exclude name="**/GetTest.java" if="offline"/>
  287. </patternset>
  288. <patternset id="teststhatfail">
  289. <!-- Property 'run.failing.tests' should force Ant to run these tests. -->
  290. <!-- Because the whole patternset can not be excluded, you have to add -->
  291. <!-- an unless-attribute on each exclude-element. -->
  292. <exclude unless="run.failing.tests" name="${optional.package}/BeanShellScriptTest.java"/>
  293. <exclude unless="run.failing.tests" name="${optional.package}/jdepend/JDependTest.java"/>
  294. <exclude unless="run.failing.tests" name="${optional.package}/DotnetTest.java"/>
  295. <exclude unless="run.failing.tests" name="${optional.package}/WsdlToDotnetTest.java"/>
  296. </patternset>
  297. <!--tests that need an XML Schema-supporting parser to work-->
  298. <selector id="needs.xmlschema">
  299. <or>
  300. <filename name="${optional.package}/SchemaValidateTest.*"/>
  301. <filename name="${optional.package}/XmlValidateTest.*"/>
  302. </or>
  303. </selector>
  304. <!--
  305. ===================================================================
  306. Set up a patternsets that matches the parts of our JUnit testsuite
  307. that may be useful for task developers.
  308. ===================================================================
  309. -->
  310. <patternset id="useful.tests">
  311. <include name="${ant.package}/BuildFileTest*"/>
  312. <include name="${regexp.package}/RegexpMatcherTest*"/>
  313. <include name="${regexp.package}/RegexpTest*"/>
  314. <include name="${optional.package}/AbstractXSLTLiaisonTest*"/>
  315. <include name="${ant.package}/types/AbstractFileSetTest*"/>
  316. </patternset>
  317. <!--
  318. ===================================================================
  319. Set up a patternsets that matches the parts of our site that
  320. should not be part of the distribution.
  321. ===================================================================
  322. -->
  323. <patternset id="site.excludes">
  324. <exclude name="bindownload.html"/>
  325. <exclude name="srcdownload.html"/>
  326. <exclude name="*.cgi"/>
  327. </patternset>
  328. <!--
  329. ===================================================================
  330. Check to see what optional dependencies are available
  331. ===================================================================
  332. -->
  333. <target name="check_for_optional_packages">
  334. <available property="jdk1.3+" classname="java.lang.StrictMath"/>
  335. <available property="jdk1.4+" classname="java.lang.CharSequence"/>
  336. <available property="jdk1.5+" classname="java.lang.Readable"/>
  337. <available property="kaffe" classname="kaffe.util.NotImplemented"/>
  338. <available property="bsf.present"
  339. classname="org.apache.bsf.BSFManager"
  340. classpathref="classpath"/>
  341. <available property="netrexx.present"
  342. classname="netrexx.lang.Rexx"
  343. classpathref="classpath"/>
  344. <available property="trax.present"
  345. classname="javax.xml.transform.Transformer"
  346. classpathref="classpath"/>
  347. <condition property="trax.impl.present">
  348. <or>
  349. <and>
  350. <isset property="javax.xml.transform.TransformerFactory"/>
  351. <available classname="${javax.xml.transform.TransformerFactory}"
  352. classpathref="classpath"/>
  353. </and>
  354. <available resource="META-INF/services/javax.xml.transform.TransformerFactory"/>
  355. </or>
  356. </condition>
  357. <available property="xslp.present"
  358. classname="com.kvisco.xsl.XSLProcessor"
  359. classpathref="classpath"/>
  360. <available property="apache.resolver.present"
  361. classname="org.apache.xml.resolver.tools.CatalogResolver"
  362. classpathref="classpath"/>
  363. <available property="xalan.present"
  364. classname="org.apache.xalan.xslt.XSLTProcessorFactory"
  365. classpathref="classpath"/>
  366. <available property="xalan2.present"
  367. classname="org.apache.xalan.transformer.TransformerImpl"
  368. classpathref="classpath"/>
  369. <available property="ejb.ejbc.present"
  370. classname="weblogic.ejbc"
  371. classpathref="classpath"/>
  372. <available property="ejb.DDCreator.present"
  373. classname="weblogic.ejb.utils.DDCreator"
  374. classpathref="classpath"/>
  375. <available property="ejb.wls.present"
  376. classname="weblogic.Server"
  377. classpathref="classpath"/>
  378. <available property="junit.present"
  379. classname="junit.framework.TestCase"
  380. classpathref="classpath"/>
  381. <available property="commons.net.present"
  382. classname="org.apache.commons.net.ftp.FTPClient"
  383. classpathref="classpath"/>
  384. <available property="starteam.present"
  385. classname="com.starbase.util.Platform"
  386. classpathref="classpath"/>
  387. <available property="antlr.present"
  388. classname="antlr.Tool"
  389. classpathref="classpath"/>
  390. <available property="vaj.present"
  391. classname="com.ibm.ivj.util.base.Workspace"
  392. classpathref="classpath"/>
  393. <available property="stylebook.present"
  394. classname="org.apache.stylebook.Engine"
  395. classpathref="classpath"/>
  396. <available property="apache.regexp.present"
  397. classname="org.apache.regexp.RE"
  398. classpathref="classpath"/>
  399. <available property="apache.oro.present"
  400. classname="org.apache.oro.text.regex.Perl5Matcher"
  401. classpathref="classpath"/>
  402. <available property="jmf.present"
  403. classname="javax.sound.sampled.Clip"
  404. classpathref="classpath"/>
  405. <available property="jai.present"
  406. classname="javax.media.jai.JAI"
  407. classpathref="classpath"/>
  408. <available property="icontract.present"
  409. classname="com.reliablesystems.iContract.IContracted"
  410. classpathref="classpath"/>
  411. <available property="jdepend.present"
  412. classname="jdepend.framework.JDepend"
  413. classpathref="classpath"/>
  414. <available property="log4j.present"
  415. classname="org.apache.log4j.Logger"
  416. classpathref="classpath"/>
  417. <available property="commons.logging.present"
  418. classname="org.apache.commons.logging.LogFactory"
  419. classpathref="classpath"/>
  420. <available property="xalan.envcheck"
  421. classname="org.apache.xalan.xslt.EnvironmentCheck"
  422. classpathref="classpath"/>
  423. <available property="which.present"
  424. classname="org.apache.env.Which"
  425. classpathref="classpath"/>
  426. <available property="xerces.present"
  427. classname="org.apache.xerces.parsers.SAXParser"
  428. classpathref="classpath"/>
  429. <available property="bcel.present"
  430. classname="org.apache.bcel.Constants"
  431. classpathref="classpath"/>
  432. <available property="sunuue.present"
  433. classname="sun.misc.UUEncoder"
  434. classpathref="classpath"/>
  435. <condition property="javamail.complete">
  436. <and>
  437. <available classname="javax.activation.DataHandler"
  438. classpathref="classpath"/>
  439. <available classname="javax.mail.Transport"
  440. classpathref="classpath"/>
  441. </and>
  442. </condition>
  443. <condition property="some.regexp.support">
  444. <or>
  445. <isset property="jdk1.4+"/>
  446. <isset property="apache.regexp.present"/>
  447. <isset property="apache.oro.present"/>
  448. </or>
  449. </condition>
  450. <condition property="tests.and.ant.share.classloader">
  451. <or>
  452. <equals arg1="${junit.fork}" arg2="true"/>
  453. <equals arg1="${build.sysclasspath}" arg2="only"/>
  454. </or>
  455. </condition>
  456. <condition property="sun.tools.present">
  457. <and>
  458. <available classname="sun.tools.native2ascii.Main"/>
  459. <available classname="com.sun.tools.javah.Main"/>
  460. </and>
  461. </condition>
  462. <available property="base64.present" classname="sun.misc.BASE64Encoder"/>
  463. <property name="build.tests.resolved" location="${build.tests}"/>
  464. <condition property="tests.are.on.system.classpath">
  465. <or>
  466. <!-- relative paths in CLASSPATH -->
  467. <contains string="${java.class.path}"
  468. substring="${build.tests}"/>
  469. <!-- absolute paths in CLASSPATH -->
  470. <contains string="${java.class.path}"
  471. substring="${build.tests.resolved}"/>
  472. <istrue value="${junit.fork}"/>
  473. </or>
  474. </condition>
  475. <condition property="jasper.present">
  476. <and>
  477. <available classname="org.apache.jasper.compiler.Compiler"/>
  478. <available classname="org.apache.jasper.JasperException"/>
  479. </and>
  480. </condition>
  481. <condition property="swing.present">
  482. <or>
  483. <not>
  484. <isset property="kaffe"/>
  485. </not>
  486. <available classname="javax.swing.ImageIcon"
  487. classpathref="classpath"/>
  488. </or>
  489. </condition>
  490. <!-- http client needs commons logging -->
  491. <condition property="apache-httpclient.present">
  492. <and>
  493. <available
  494. classname="org.apache.commons.httpclient.HttpClient"
  495. classpathref="classpath"/>
  496. <isset property="commons.logging.present"/>
  497. </and>
  498. </condition>
  499. <condition property="wsdl.found">
  500. <or>
  501. <available file="wsdl" filepath="${env.PATH}"/>
  502. <available file="wsdl.exe" filepath="${env.PATH}"/>
  503. <available file="wsdl.exe" filepath="${env.Path}"/>
  504. </or>
  505. </condition>
  506. <echo level="verbose"> wsdl.found=${wsdl.found}</echo>
  507. <condition property="csc.found">
  508. <or>
  509. <available file="mcs" filepath="${env.PATH}"/>
  510. <available file="csc" filepath="${env.PATH}"/>
  511. <available file="csc.exe" filepath="${env.PATH}"/>
  512. <available file="csc.exe" filepath="${env.Path}"/>
  513. </or>
  514. </condition>
  515. <echo level="verbose"> csc.found=${csc.found}</echo>
  516. <condition property="dotnetapps.found">
  517. <and>
  518. <isset property="csc.found"/>
  519. <isset property="wsdl.found"/>
  520. </and>
  521. </condition>
  522. <echo level="verbose"> dotnetapps.found=${dotnetapps.found}</echo>
  523. <available property="rhino.present"
  524. classname="org.mozilla.javascript.Scriptable"
  525. classpathref="classpath"/>
  526. <available property="beanshell.present"
  527. classname="bsh.StringUtil"
  528. classpathref="classpath"/>
  529. <available property="xerces1.present"
  530. classname="org.apache.xerces.framework.XMLParser"
  531. classpathref="classpath"/>
  532. <available property="jsch.present"
  533. classname="com.jcraft.jsch.Session"
  534. classpathref="classpath"/>
  535. <condition property="build.compiler" value="classic">
  536. <not>
  537. <isset property="jdk1.3+"/>
  538. </not>
  539. </condition>
  540. <property name="build.compiler" value="modern"/>
  541. <!--check for XSD support in the parser-->
  542. <condition property="xmlschema.present">
  543. <or>
  544. <parsersupports
  545. feature="http://apache.org/xml/features/validation/schema"/>
  546. <parsersupports
  547. feature="http://java.sun.com/xml/jaxp/properties/schemaSource"/>
  548. </or>
  549. </condition>
  550. </target>
  551. <!--
  552. ===================================================================
  553. Prepare the build
  554. ===================================================================
  555. -->
  556. <target name="prepare">
  557. <tstamp>
  558. <format property="year" pattern="yyyy"/>
  559. </tstamp>
  560. <filterchain id="ant.filters">
  561. <replacetokens>
  562. <token key="VERSION" value="${version}"/>
  563. <token key="DATE" value="${TODAY}"/>
  564. <token key="TIME" value="${TSTAMP}"/>
  565. </replacetokens>
  566. </filterchain>
  567. </target>
  568. <!--
  569. ===================================================================
  570. Build the code
  571. ===================================================================
  572. -->
  573. <target name="build"
  574. depends="prepare, check_for_optional_packages"
  575. description="--> compiles the source code">
  576. <mkdir dir="${build.dir}"/>
  577. <mkdir dir="${build.classes}"/>
  578. <mkdir dir="${build.lib}"/>
  579. <javac srcdir="${java.dir}"
  580. destdir="${build.classes}"
  581. debug="${debug}"
  582. deprecation="${deprecation}"
  583. target="${javac.target}"
  584. source="${javac.source}"
  585. optimize="${optimize}">
  586. <classpath refid="classpath"/>
  587. <selector id="conditional-patterns">
  588. <not>
  589. <or>
  590. <selector refid="needs.jdk1.3+" unless="jdk1.3+"/>
  591. <selector refid="needs.jdk1.4+" unless="jdk1.4+"/>
  592. <selector refid="needs.jdk1.5+" unless="jdk1.5+"/>
  593. <selector refid="not.in.kaffe" if="kaffe"/>
  594. <selector refid="needs.sun.uue" unless="sunuue.present"/>
  595. <selector refid="needs.sun.b64" unless="base64.present"/>
  596. <selector refid="needs.trax" unless="trax.present"/>
  597. <selector refid="needs.xalan1" unless="xalan.present"/>
  598. <selector refid="needs.xslp" unless="xslp.present"/>
  599. <selector refid="needs.apache-resolver" unless="apache.resolver.present"/>
  600. <selector refid="needs.junit" unless="junit.present"/>
  601. <selector refid="needs.apache-regexp"
  602. unless="apache.regexp.present"/>
  603. <selector refid="needs.apache-oro" unless="apache.oro.present"/>
  604. <selector refid="needs.apache-bcel" unless="bcel.present"/>
  605. <selector refid="needs.apache-log4j" unless="log4j.present"/>
  606. <selector refid="needs.commons-logging"
  607. unless="commons.logging.present"/>
  608. <selector refid="needs.apache-bsf" unless="bsf.present"/>
  609. <selector refid="needs.stylebook" unless="stylebook.present"/>
  610. <selector refid="needs.javamail" unless="javamail.complete"/>
  611. <selector refid="needs.icontract" unless="icontract.present"/>
  612. <selector refid="needs.netrexx" unless="netrexx.present"/>
  613. <selector refid="needs.weblogic.ejbc" unless="ejb.ejbc.present"/>
  614. <selector refid="needs.weblogic.ddcreator"
  615. unless="ejb.DDCreator.present"/>
  616. <selector refid="needs.weblogic.server" unless="ejb.wls.present"/>
  617. <selector refid="needs.commons-net" unless="commons.net.present"/>
  618. <selector refid="needs.starteam" unless="starteam.present"/>
  619. <selector refid="needs.vaj" unless="vaj.present"/>
  620. <selector refid="needs.antlr" unless="antlr.present"/>
  621. <selector refid="needs.jmf" unless="jmf.present"/>
  622. <selector refid="needs.jai" unless="jai.present"/>
  623. <selector refid="needs.jdepend" unless="jdepend.present"/>
  624. <selector refid="needs.swing" unless="swing.present"/>
  625. <selector refid="needs.jsch" unless="jsch.present"/>
  626. <selector refid="needs.xmlschema" unless="xmlschema.present"/>
  627. </or>
  628. </not>
  629. </selector>
  630. </javac>
  631. <copy todir="${build.classes}">
  632. <fileset dir="${java.dir}">
  633. <include name="**/*.properties"/>
  634. <include name="**/*.dtd"/>
  635. </fileset>
  636. </copy>
  637. <copy todir="${build.classes}"
  638. overwrite="true" encoding="UTF-8">
  639. <fileset dir="${java.dir}">
  640. <include name="**/version.txt"/>
  641. <include name="**/defaultManifest.mf"/>
  642. </fileset>
  643. <filterchain refid="ant.filters"/>
  644. </copy>
  645. <copy todir="${build.classes}/${optional.package}/junit/xsl">
  646. <fileset dir="${etc.dir}">
  647. <include name="junit-frames.xsl"/>
  648. <include name="junit-noframes.xsl"/>
  649. </fileset>
  650. </copy>
  651. </target>
  652. <!--
  653. ===================================================================
  654. Create the all of the Apache Ant jars
  655. ===================================================================
  656. -->
  657. <target name="jars"
  658. depends="build"
  659. description="--> creates the Apache Ant jars">
  660. <copy todir="${build.dir}">
  661. <fileset dir=".">
  662. <include name="LICENSE"/>
  663. <include name="LICENSE.xerces"/>
  664. <include name="LICENSE.dom"/>
  665. <include name="LICENSE.sax"/>
  666. <include name="NOTICE"/>
  667. </fileset>
  668. <mapper type="glob" from="*" to="*.txt"/>
  669. </copy>
  670. <copy file="${manifest}" tofile="${manifest.tmp}"/>
  671. <manifest file="${manifest.tmp}">
  672. <section name="${optional.package}/">
  673. <attribute name="Extension-name"
  674. value="org.apache.tools.ant"/>
  675. <attribute name="Specification-Title"
  676. value="Apache Ant"/>
  677. <attribute name="Specification-Version"
  678. value="${manifest-version}"/>
  679. <attribute name="Specification-Vendor"
  680. value="Apache Software Foundation"/>
  681. <attribute name="Implementation-Title"
  682. value="org.apache.tools.ant"/>
  683. <attribute name="Implementation-Version"
  684. value="${manifest-version}"/>
  685. <attribute name="Implementation-Vendor"
  686. value="Apache Software Foundation"/>
  687. </section>
  688. </manifest>
  689. <jar destfile="${build.lib}/${name}-launcher.jar"
  690. basedir="${build.classes}">
  691. <selector refid="ant.launcher"/>
  692. <manifest>
  693. <attribute name="Main-Class" value="org.apache.tools.ant.launch.Launcher"/>
  694. </manifest>
  695. </jar>
  696. <jar destfile="${build.lib}/${name}.jar"
  697. basedir="${build.classes}"
  698. manifest="${manifest}">
  699. <not>
  700. <selector id="non-core">
  701. <or>
  702. <filename name="${optional.package}/**"/>
  703. <filename name="${optional.type.package}/**"/>
  704. <filename name="${util.package}/depend/**"/>
  705. <filename name="${util.package}/optional/**"/>
  706. <selector refid="needs.apache-log4j"/>
  707. <selector refid="needs.commons-logging"/>
  708. <selector refid="needs.apache-regexp"/>
  709. <selector refid="needs.apache-oro"/>
  710. <selector refid="needs.jdk1.4+"/>
  711. <selector refid="needs.javamail"/>
  712. <selector refid="ant.launcher"/>
  713. </or>
  714. </selector>
  715. </not>
  716. <metainf dir="${build.dir}">
  717. <include name="LICENSE.txt"/>
  718. <include name="NOTICE.txt"/>
  719. </metainf>
  720. <manifest>
  721. <section name="${ant.package}/">
  722. <attribute name="Extension-name"
  723. value="org.apache.tools.ant"/>
  724. <attribute name="Specification-Title"
  725. value="Apache Ant"/>
  726. <attribute name="Specification-Version"
  727. value="${manifest-version}"/>
  728. <attribute name="Specification-Vendor"
  729. value="Apache Software Foundation"/>
  730. <attribute name="Implementation-Title"
  731. value="org.apache.tools.ant"/>
  732. <attribute name="Implementation-Version"
  733. value="${manifest-version}"/>
  734. <attribute name="Implementation-Vendor"
  735. value="Apache Software Foundation"/>
  736. </section>
  737. </manifest>
  738. <fileset dir="${docs.dir}">
  739. <include name="images/ant_logo_large.gif"/>
  740. </fileset>
  741. </jar>
  742. <jar destfile="${build.lib}/${bootstrap.jar}"
  743. basedir="${build.classes}"
  744. manifest="${manifest}">
  745. <include name="${ant.package}/Main.class"/>
  746. <metainf dir="${build.dir}">
  747. <include name="LICENSE.txt"/>
  748. <include name="NOTICE.txt"/>
  749. </metainf>
  750. <manifest>
  751. <attribute name="Class-Path"
  752. value="ant.jar xml-apis.jar xercesImpl.jar xalan.jar"/>
  753. </manifest>
  754. </jar>
  755. <jar destfile="${build.lib}/ant-nodeps.jar"
  756. basedir="${build.classes}"
  757. manifest="${manifest.tmp}">
  758. <and>
  759. <selector refid="non-core"/>
  760. <not>
  761. <or>
  762. <selector refid="needs.trax"/>
  763. <selector refid="needs.xalan1"/>
  764. <selector refid="needs.xslp"/>
  765. <selector refid="needs.apache-resolver"/>
  766. <selector refid="needs.junit"/>
  767. <selector refid="needs.apache-regexp"/>
  768. <selector refid="needs.apache-oro"/>
  769. <selector refid="needs.apache-bcel"/>
  770. <selector refid="needs.apache-log4j"/>
  771. <selector refid="needs.commons-logging"/>
  772. <selector refid="needs.apache-bsf"/>
  773. <selector refid="needs.stylebook"/>
  774. <selector refid="needs.javamail"/>
  775. <selector refid="needs.icontract"/>
  776. <selector refid="needs.netrexx"/>
  777. <selector refid="needs.weblogic.ejbc"/>
  778. <selector refid="needs.weblogic.ddcreator"/>
  779. <selector refid="needs.weblogic.server"/>
  780. <selector refid="needs.commons-net"/>
  781. <selector refid="needs.starteam"/>
  782. <selector refid="needs.vaj"/>
  783. <selector refid="needs.antlr"/>
  784. <selector refid="needs.jmf"/>
  785. <selector refid="needs.jai"/>
  786. <selector refid="needs.jdepend"/>
  787. <selector refid="needs.swing"/>
  788. <selector refid="needs.jsch"/>
  789. </or>
  790. </not>
  791. </and>
  792. <metainf dir="${build.dir}">
  793. <include name="LICENSE.txt"/>
  794. <include name="NOTICE.txt"/>
  795. </metainf>
  796. </jar>
  797. <macrodef name="optional-jar">
  798. <attribute name="dep"/>
  799. <sequential>
  800. <jar destfile="${build.lib}/${optional.jars.prefix}-@{dep}.jar"
  801. basedir="${build.classes}"
  802. manifest="${manifest.tmp}">
  803. <selector refid="needs.@{dep}"/>
  804. </jar>
  805. </sequential>
  806. </macrodef>
  807. <optional-jar dep="trax"/>
  808. <optional-jar dep="xalan1"/>
  809. <optional-jar dep="xslp"/>
  810. <optional-jar dep="apache-resolver"/>
  811. <optional-jar dep="junit"/>
  812. <optional-jar dep="apache-regexp"/>
  813. <optional-jar dep="apache-oro"/>
  814. <optional-jar dep="apache-bcel"/>
  815. <optional-jar dep="apache-log4j"/>
  816. <optional-jar dep="commons-logging"/>
  817. <optional-jar dep="apache-bsf"/>
  818. <optional-jar dep="stylebook"/>
  819. <optional-jar dep="javamail"/>
  820. <optional-jar dep="icontract"/>
  821. <optional-jar dep="netrexx"/>
  822. <optional-jar dep="commons-net"/>
  823. <optional-jar dep="starteam"/>
  824. <optional-jar dep="vaj"/>
  825. <optional-jar dep="antlr"/>
  826. <optional-jar dep="jmf"/>
  827. <optional-jar dep="jai"/>
  828. <optional-jar dep="swing"/>
  829. <optional-jar dep="jsch"/>
  830. <optional-jar dep="jdepend"/>
  831. <jar destfile="${build.lib}/${optional.jars.prefix}-weblogic.jar"
  832. basedir="${build.classes}"
  833. manifest="${manifest.tmp}">
  834. <or>
  835. <selector refid="needs.weblogic.ejbc"/>
  836. <selector refid="needs.weblogic.ddcreator"/>
  837. <selector refid="needs.weblogic.server"/>
  838. </or>
  839. </jar>
  840. </target>
  841. <!-- Creates jar of test utility classes -->
  842. <target name="test-jar"
  843. depends="compile-tests"
  844. description="--> creates the Apache Ant Test Utilties jar">
  845. <fail unless="junit.present">
  846. We cannot build the test jar unless JUnit is present,
  847. as JUnit is needed to compile the test classes.
  848. </fail>
  849. <jar destfile="${build.lib}/${name}-testutil.jar"
  850. basedir="${build.tests}">
  851. <patternset refid="useful.tests"/>
  852. </jar>
  853. </target>
  854. <!--
  855. ===================================================================
  856. Create the essential distribution that can run Apache Ant
  857. ===================================================================
  858. -->
  859. <target name="dist-lite"
  860. depends="jars"
  861. description="--> creates a minimum distribution to run Apache Ant">
  862. <mkdir dir="${dist.dir}"/>
  863. <mkdir dir="${dist.bin}"/>
  864. <mkdir dir="${dist.lib}"/>
  865. <copy todir="${dist.lib}">
  866. <fileset dir="${build.lib}">
  867. <exclude name="${bootstrap.jar}"/>
  868. </fileset>
  869. </copy>
  870. <copy todir="${dist.lib}">
  871. <fileset dir="${lib.dir}">
  872. <include name="*.jar"/>
  873. <include name="*.zip"/>
  874. </fileset>
  875. </copy>
  876. <copy todir="${dist.bin}">
  877. <fileset dir="${script.dir}/"/>
  878. </copy>
  879. <fixcrlf srcdir="${dist.bin}" eol="dos" includes="*.bat,*.cmd"/>
  880. <fixcrlf srcdir="${dist.bin}" eol="unix">
  881. <include name="ant"/>
  882. <include name="antRun"/>
  883. <include name="*.pl"/>
  884. </fixcrlf>
  885. <chmod perm="ugo+rx" dir="${dist.dir}" type="dir" includes="**"
  886. failonerror="${chmod.fail}"/>
  887. <chmod perm="ugo+r" dir="${dist.dir}" type="file" includes="**"
  888. failonerror="${chmod.fail}" maxparallel="${chmod.maxparallel}"/>
  889. <chmod perm="ugo+x" type="file" failonerror="${chmod.fail}">
  890. <fileset dir="${dist.bin}">
  891. <include name="**/ant"/>
  892. <include name="**/antRun"/>
  893. <include name="**/*.pl"/>
  894. <include name="**/*.py"/>
  895. </fileset>
  896. </chmod>
  897. </target>
  898. <!--
  899. ===================================================================
  900. Create the complete distribution
  901. ===================================================================
  902. -->
  903. <target name="dist" description="--> creates a complete distribution">
  904. <antcall inheritAll="false" target="internal_dist">
  905. <param name="dist.dir" value="${dist.name}"/>
  906. </antcall>
  907. </target>
  908. <target name="dist_javadocs" depends="javadocs">
  909. <mkdir dir="${dist.javadocs}"/>
  910. <copy todir="${dist.javadocs}" overwrite="true">
  911. <fileset dir="${build.javadocs}"/>
  912. </copy>
  913. </target>
  914. <target name="internal_dist" depends="dist-lite,dist_javadocs">
  915. <mkdir dir="${dist.docs}"/>
  916. <mkdir dir="${dist.etc}"/>
  917. <copy todir="${dist.lib}" file="${lib.dir}/README"/>
  918. <copy todir="${dist.docs}">
  919. <fileset dir="${docs.dir}" excludes="${unfiltered.files}">
  920. <patternset refid="site.excludes"/>
  921. </fileset>
  922. <filterchain refid="ant.filters"/>
  923. </copy>
  924. <copy todir="${dist.docs}" filtering="false">
  925. <fileset dir="${docs.dir}" includes="${unfiltered.files}">
  926. <patternset refid="site.excludes"/>
  927. </fileset>
  928. </copy>
  929. <copy todir="${dist.dir}">
  930. <fileset dir=".">
  931. <include name="README"/>
  932. <include name="INSTALL"/>
  933. <include name="LICENSE"/>
  934. <include name="LICENSE.xerces"/>
  935. <include name="LICENSE.dom"/>
  936. <include name="LICENSE.sax"/>
  937. <include name="NOTICE"/>
  938. <include name="TODO"/>
  939. <include name="WHATSNEW"/>
  940. <include name="KEYS"/>
  941. <include name="welcome.html"/>
  942. </fileset>
  943. </copy>
  944. <chmod perm="ugo+rx" dir="${dist.dir}" type="dir" includes="**"
  945. failonerror="${chmod.fail}"/>
  946. <chmod perm="ugo+r" dir="${dist.dir}" type="file" includes="**"
  947. failonerror="${chmod.fail}" maxparallel="${chmod.maxparallel}"/>
  948. <chmod perm="ugo+x" type="file" failonerror="${chmod.fail}">
  949. <fileset dir="${dist.bin}">
  950. <include name="**/ant"/>
  951. <include name="**/antRun"/>
  952. <include name="**/*.pl"/>
  953. <include name="**/*.py"/>
  954. </fileset>
  955. </chmod>
  956. <!-- publish some useful stylesheets -->
  957. <copy todir="${dist.etc}">
  958. <fileset dir="${etc.dir}">
  959. <include name="junit-frames.xsl"/>
  960. <include name="junit-noframes.xsl"/>
  961. <include name="junit-frames-xalan1.xsl"/>
  962. <include name="coverage-frames.xsl"/>
  963. <include name="maudit-frames.xsl"/>
  964. <include name="mmetrics-frames.xsl"/>
  965. <include name="changelog.xsl"/>
  966. <include name="jdepend.xsl"/>
  967. <include name="jdepend-frames.xsl"/>
  968. <include name="checkstyle/*.xsl"/>
  969. <include name="log.xsl"/>
  970. <include name="tagdiff.xsl"/>
  971. </fileset>
  972. <fileset dir="${build.lib}">
  973. <include name="${bootstrap.jar}"/>
  974. </fileset>
  975. </copy>
  976. </target>
  977. <!--
  978. ===================================================================
  979. Target to create bootstrap build
  980. ===================================================================
  981. -->
  982. <target name="bootstrap" description="--> creates a bootstrap build">
  983. <antcall inheritAll="false" target="dist-lite">
  984. <param name="dist.dir" value="${bootstrap.dir}"/>
  985. </antcall>
  986. </target>
  987. <!--
  988. ===================================================================
  989. Create the source distribution
  990. ===================================================================
  991. -->
  992. <target name="src-dist"
  993. description="--> creates a source distribution">
  994. <mkdir dir="${src.dist.dir}"/>
  995. <copy todir="${src.dist.lib}">
  996. <fileset dir="${lib.dir}">
  997. <include name="*.jar"/>
  998. <include name="*.zip"/>
  999. <include name="README"/>
  1000. </fileset>
  1001. </copy>
  1002. <copy todir="${src.dist.src}">
  1003. <fileset dir="${src.dir}"/>
  1004. </copy>
  1005. <copy todir="${src.dist.docs}">
  1006. <fileset dir="${docs.dir}">
  1007. <exclude name="manual/api/**"/>
  1008. <patternset refid="site.excludes"/>
  1009. </fileset>
  1010. </copy>
  1011. <copy todir="${src.dist.dir}">
  1012. <fileset dir=".">
  1013. <include name="README"/>
  1014. <include name="INSTALL"/>
  1015. <include name="LICENSE"/>
  1016. <include name="LICENSE.xerces"/>
  1017. <include name="LICENSE.dom"/>
  1018. <include name="LICENSE.sax"/>
  1019. <include name="NOTICE"/>
  1020. <include name="TODO"/>
  1021. <include name="WHATSNEW"/>
  1022. <include name="KEYS"/>
  1023. <include name="build.bat"/>
  1024. <include name="build.sh"/>
  1025. <include name="bootstrap.bat"/>
  1026. <include name="bootstrap.sh"/>
  1027. <include name="build.xml"/>
  1028. <include name="welcome.html"/>
  1029. </fileset>
  1030. </copy>
  1031. <fixcrlf srcdir="${src.dist.dir}" eol="dos" includes="*.bat,*.cmd"/>
  1032. <fixcrlf srcdir="${src.dist.dir}" eol="unix">
  1033. <include name="**/*.sh"/>
  1034. <include name="**/*.pl"/>
  1035. <include name="**/ant"/>
  1036. <include name="**/antRun"/>
  1037. </fixcrlf>
  1038. <fixcrlf srcdir="${src.dist.dir}">
  1039. <include name="**/*.java"/>
  1040. <exclude name="src/etc/testcases/taskdefs/fixcrlf/expected/Junk?.java"/>
  1041. <exclude name="src/etc/testcases/taskdefs/fixcrlf/input/Junk?.java"/>
  1042. </fixcrlf>
  1043. <chmod perm="ugo+x" dir="${src.dist.dir}" type="dir"
  1044. failonerror="${chmod.fail}"/>
  1045. <chmod perm="ugo+r" dir="${src.dist.dir}" failonerror="${chmod.fail}"/>
  1046. <chmod perm="ugo+x" failonerror="${chmod.fail}">
  1047. <fileset dir="${src.dist.dir}">
  1048. <include name="**/.sh"/>
  1049. <include name="**/.pl"/>
  1050. <include name="**/.py"/>
  1051. <include name="**/ant"/>
  1052. <include name="**/antRun"/>
  1053. </fileset>
  1054. </chmod>
  1055. </target>
  1056. <!--
  1057. ===================================================================
  1058. Create the binary distribution
  1059. ===================================================================
  1060. -->
  1061. <target name="main_distribution"
  1062. description="--> creates the zip and tar distributions">
  1063. <delete dir="${dist.name}"/>
  1064. <delete dir="${java-repository.dir}"/>
  1065. <mkdir dir="${dist.base}"/>
  1066. <mkdir dir="${dist.base}/src"/>
  1067. <mkdir dir="${dist.base}/bin"/>
  1068. <mkdir dir="${java-repository.dir}"/>
  1069. <antcall inheritAll="false" target="internal_dist">
  1070. <param name="dist.dir" value="${dist.name}"/>
  1071. </antcall>
  1072. <zip destfile="${dist.base}/bin/${dist.name}-bin.zip">
  1073. <zipfileset dir="${dist.name}/.." filemode="755">
  1074. <include name="${dist.name}/bin/ant"/>
  1075. <include name="${dist.name}/bin/antRun"/>
  1076. <include name="${dist.name}/bin/*.pl"/>
  1077. <include name="${dist.name}/bin/*.py"/>
  1078. </zipfileset>
  1079. <fileset dir="${dist.name}/..">
  1080. <include name="${dist.name}/**"/>
  1081. <exclude name="${dist.name}/bin/ant"/>
  1082. <exclude name="${dist.name}/bin/antRun"/>
  1083. <exclude name="${dist.name}/bin/*.pl"/>
  1084. <exclude name="${dist.name}/bin/*.py"/>
  1085. </fileset>
  1086. </zip>
  1087. <tar longfile="gnu"
  1088. destfile="${dist.base}/bin/${dist.name}-bin.tar">
  1089. <tarfileset dir="${dist.name}/.." mode="755" username="ant" group="ant">
  1090. <include name="${dist.name}/bin/ant"/>
  1091. <include name="${dist.name}/bin/antRun"/>
  1092. <include name="${dist.name}/bin/*.pl"/>
  1093. <include name="${dist.name}/bin/*.py"/>
  1094. </tarfileset>
  1095. <tarfileset dir="${dist.name}/.." username="ant" group="ant">
  1096. <include name="${dist.name}/**"/>
  1097. <exclude name="${dist.name}/bin/ant"/>
  1098. <exclude name="${dist.name}/bin/antRun"/>
  1099. <exclude name="${dist.name}/bin/*.pl"/>
  1100. <exclude name="${dist.name}/bin/*.py"/>
  1101. </tarfileset>
  1102. </tar>
  1103. <gzip destfile="${dist.base}/bin/${dist.name}-bin.tar.gz"
  1104. src="${dist.base}/bin/${dist.name}-bin.tar"/>
  1105. <bzip2 destfile="${dist.base}/bin/${dist.name}-bin.tar.bz2"
  1106. src="${dist.base}/bin/${dist.name}-bin.tar"/>
  1107. <delete file="${dist.base}/bin/${dist.name}-bin.tar"/>
  1108. <copy todir="${java-repository.dir}">
  1109. <fileset dir="${dist.name}/lib">
  1110. <include name="ant*.jar"/>
  1111. </fileset>
  1112. <mapper type="glob" from="*.jar" to="*-${version}.jar"/>
  1113. </copy>
  1114. <checksum fileext=".md5">
  1115. <fileset dir="${java-repository.dir}" includes="*${version}.jar"/>
  1116. </checksum>
  1117. <checksum fileext=".sha1" algorithm="SHA">
  1118. <fileset dir="${java-repository.dir}" includes="*${version}.jar"/>
  1119. </checksum>
  1120. <delete dir="${dist.name}"/>
  1121. <checksum fileext=".md5">
  1122. <fileset dir="${dist.base}/bin/">
  1123. <include name="**/*"/>
  1124. <exclude name="**/*.asc"/>
  1125. <exclude name="**/*.md5"/>
  1126. </fileset>
  1127. </checksum>
  1128. <checksum fileext=".sha1" algorithm="SHA">
  1129. <fileset dir="${dist.base}/bin/">
  1130. <include name="**/*"/>
  1131. <exclude name="**/*.asc"/>
  1132. <exclude name="**/*.md5"/>
  1133. </fileset>
  1134. </checksum>
  1135. <antcall inheritAll="false" target="src-dist">
  1136. <param name="src.dist.dir" value="${dist.name}"/>
  1137. </antcall>
  1138. <zip destfile="${dist.base}/src/${dist.name}-src.zip">
  1139. <zipfileset dir="${dist.name}/.." filemode="755">
  1140. <include name="${dist.name}/bootstrap.sh"/>
  1141. <include name="${dist.name}/build.sh"/>
  1142. </zipfileset>
  1143. <fileset dir="${dist.name}/..">
  1144. <include name="${dist.name}/**"/>
  1145. <exclude name="${dist.name}/bootstrap.sh"/>
  1146. <exclude name="${dist.name}/build.sh"/>
  1147. </fileset>
  1148. </zip>
  1149. <tar longfile="gnu"
  1150. destfile="${dist.base}/src/${dist.name}-src.tar">
  1151. <tarfileset dir="${dist.name}/.." mode="755" username="ant" group="ant">
  1152. <include name="${dist.name}/bootstrap.sh"/>
  1153. <include name="${dist.name}/build.sh"/>
  1154. </tarfileset>
  1155. <tarfileset dir="${dist.name}/.." username="ant" group="ant">
  1156. <include name="${dist.name}/**"/>
  1157. <exclude name="${dist.name}/bootstrap.sh"/>
  1158. <exclude name="${dist.name}/build.sh"/>
  1159. </tarfileset>
  1160. </tar>
  1161. <gzip destfile="${dist.base}/src/${dist.name}-src.tar.gz"
  1162. src="${dist.base}/src/${dist.name}-src.tar"/>
  1163. <bzip2 destfile="${dist.base}/src/${dist.name}-src.tar.bz2"
  1164. src="${dist.base}/src/${dist.name}-src.tar"/>
  1165. <delete file="${dist.base}/src/${dist.name}-src.tar"/>
  1166. <delete dir="${dist.name}"/>
  1167. <checksum fileext=".md5">
  1168. <fileset dir="${dist.base}/src/">
  1169. <include name="**/*"/>
  1170. <exclude name="**/*.asc"/>
  1171. <exclude name="**/*.md5"/>
  1172. </fileset>
  1173. </checksum>
  1174. <checksum fileext=".sha1" algorithm="SHA">
  1175. <fileset dir="${dist.base}/src/">
  1176. <include name="**/*"/>
  1177. <exclude name="**/*.asc"/>
  1178. <exclude name="**/*.md5"/>
  1179. </fileset>
  1180. </checksum>
  1181. </target>
  1182. <target name="distribution" depends="main_distribution"
  1183. description="--> creates the full Apache Ant distribution">
  1184. </target>
  1185. <!--
  1186. ===================================================================
  1187. Cleans up build and distribution directories
  1188. ===================================================================
  1189. -->
  1190. <target name="clean"
  1191. description="--> cleans up build and dist directories">
  1192. <delete dir="${build.dir}"/>
  1193. <delete dir="${dist.base}"/>
  1194. <delete dir="${dist.dir}"/>
  1195. <delete>
  1196. <fileset dir="." includes="**/*~" defaultexcludes="no"/>
  1197. </delete>
  1198. </target>
  1199. <!--
  1200. ===================================================================
  1201. Cleans everything
  1202. ===================================================================
  1203. -->
  1204. <target name="allclean"
  1205. depends="clean"
  1206. description="--> cleans up everything">
  1207. <delete file="${bootstrap.dir}/bin/antRun"/>
  1208. <delete file="${bootstrap.dir}/bin/antRun.bat"/>
  1209. <delete file="${bootstrap.dir}/bin/*.pl"/>
  1210. <delete file="${bootstrap.dir}/bin/*.py"/>
  1211. </target>
  1212. <!--
  1213. ===================================================================
  1214. Installs Apache Ant
  1215. ===================================================================
  1216. -->
  1217. <target name="install" if="ant.install">
  1218. <antcall inheritAll="false" target="internal_dist">
  1219. <param name="dist.dir" value="${ant.install}"/>
  1220. </antcall>
  1221. </target>
  1222. <target name="install-lite" if="ant.install">
  1223. <antcall inheritAll="false" target="dist-lite">
  1224. <param name="dist.dir" value="${ant.install}"/>
  1225. </antcall>
  1226. </target>
  1227. <!--
  1228. ===================================================================
  1229. Creates the API documentation
  1230. ===================================================================
  1231. -->
  1232. <target name="javadoc_check">
  1233. <uptodate property="javadoc.notrequired"
  1234. targetfile="${build.javadocs}/packages.html">
  1235. <srcfiles dir="${java.dir}" includes="**/*.java"/>
  1236. </uptodate>
  1237. <uptodate property="tests.javadoc.notrequired"
  1238. targetfile="${build.tests.javadocs}/packages.html">
  1239. <srcfiles dir="${tests.dir}">
  1240. <patternset refid="useful.tests"/>
  1241. </srcfiles>
  1242. </uptodate>
  1243. </target>
  1244. <target name="javadocs" depends="prepare, javadoc_check"
  1245. unless="javadoc.notrequired"
  1246. description="--> creates the API documentation">
  1247. <mkdir dir="${build.javadocs}"/>
  1248. <javadoc useexternalfile="yes"
  1249. destdir="${build.javadocs}"
  1250. author="true"
  1251. version="true"
  1252. locale="en"
  1253. windowtitle="${Name} API"
  1254. doctitle="${Name}">
  1255. <packageset dir="${java.dir}"/>
  1256. <tag name="todo" description="To do:" scope="all"/>
  1257. <tag name="ant.task" enabled="false" description="Task:" scope="types"/>
  1258. <tag name="ant.datatype" enabled="false" description="Data type:" scope="types"/>
  1259. <tag name="ant.attribute" enabled="false" description="Attribute:" scope="types"/>
  1260. <tag name="ant.attribute.group" enabled="false" description="Attribute group:" scope="types"/>
  1261. <tag name="ant.element" enabled="false" description="Nested element:" scope="types"/>
  1262. <group title="Apache Ant Core" packages="org.apache.tools.ant*"/>
  1263. <group title="Core Tasks" packages="org.apache.tools.ant.taskdefs*"/>
  1264. <group title="Core Types" packages="org.apache.tools.ant.types*"/>
  1265. <group title="Optional Tasks" packages="org.apache.tools.ant.taskdefs.optional*"/>
  1266. <group title="Optional Types" packages="org.apache.tools.ant.types.optional*"/>
  1267. <group title="Ant Utilities" packages="org.apache.tools.ant.util*"/>
  1268. <bottom>Copyright &#169; 2000-${year} Apache Software Foundation. All Rights Reserved.</bottom>
  1269. </javadoc>
  1270. </target>
  1271. <target name="test-javadocs" depends="prepare, javadoc_check"
  1272. unless="tests.javadoc.notrequired"
  1273. description="--> creates the API documentation for test utilities">
  1274. <mkdir dir="${build.tests.javadocs}"/>
  1275. <javadoc useexternalfile="yes"
  1276. destdir="${build.tests.javadocs}"
  1277. author="true"
  1278. version="true"
  1279. locale="en"
  1280. windowtitle="${Name} Test Utilities"
  1281. doctitle="${Name}">
  1282. <fileset dir="${tests.dir}">
  1283. <patternset refid="useful.tests"/>
  1284. </fileset>
  1285. <bottom>Copyright &#169; 2000-${year} Apache Software Foundation. All Rights Reserved.</bottom>
  1286. </javadoc>
  1287. </target>
  1288. <!--
  1289. ===================================================================
  1290. Compile testcases
  1291. ===================================================================
  1292. -->
  1293. <target name="compile-tests" depends="build" if="junit.present">
  1294. <mkdir dir="${build.tests}"/>
  1295. <javac srcdir="${tests.dir}"
  1296. destdir="${build.tests}"
  1297. debug="${debug}"
  1298. target="${javac.target}"
  1299. source="${javac.source}"
  1300. deprecation="${deprecation}">
  1301. <classpath refid="tests-classpath"/>
  1302. <selector refid="conditional-patterns"/>
  1303. </javac>
  1304. <!-- Used by AntlibTest.testAntlibResource: -->
  1305. <jar jarfile="${build.tests}/org/apache/tools/ant/taskdefs/test2-antlib.jar">
  1306. <zipfileset dir="${tests.etc.dir}" fullpath="taskdefs/test.antlib.xml">
  1307. <include name="taskdefs/test2.antlib.xml"/>
  1308. </zipfileset>
  1309. </jar>
  1310. </target>
  1311. <target name="dump-info" depends="dump-sys-properties,run-which"/>
  1312. <target name="dump-sys-properties" unless="which.present"
  1313. depends="xml-check">
  1314. <echo message="java.vm.info=${java.vm.info}"/>
  1315. <echo message="java.vm.name=${java.vm.name}"/>
  1316. <echo message="java.vm.vendor=${java.vm.vendor}"/>
  1317. <echo message="java.vm.version=${java.vm.version}"/>
  1318. <echo message="os.arch=${os.arch}"/>
  1319. <echo message="os.name=${os.name}"/>
  1320. <echo message="os.version=${os.version}"/>
  1321. <echo message="file.encoding=${file.encoding}"/>
  1322. <echo message="user.language=${user.language}"/>
  1323. </target>
  1324. <!-- helper class from Xalan2 to check for jar versioning of xml/xsl processors -->
  1325. <target name="xml-check" depends="check_for_optional_packages"
  1326. if="xalan.envcheck" unless="which.present">
  1327. <java classname="org.apache.xalan.xslt.EnvironmentCheck"/>
  1328. </target>
  1329. <target name="run-which" depends="check_for_optional_packages"
  1330. if="which.present">
  1331. <java classname="org.apache.env.Which" taskname="which"/>
  1332. </target>
  1333. <!-- test to see if we are online or not. can take a while when we are off line, so
  1334. setting the property is a good shortcut-->
  1335. <target name="probe-offline">
  1336. <condition property="offline">
  1337. <or>
  1338. <isset property="offline"/>
  1339. <not>
  1340. <http url="http://www.apache.org/"/>
  1341. </not>
  1342. </or>
  1343. </condition>
  1344. <echo level="verbose"> offline=${offline}</echo>
  1345. </target>
  1346. <!--
  1347. ===================================================================
  1348. Run testcase
  1349. ===================================================================
  1350. -->
  1351. <target name="test" depends="run-tests,run-single-test" description="--> run JUnit tests"/>
  1352. <target name="run-tests" depends="dump-info,compile-tests,probe-offline" if="junit.present" unless="testcase">
  1353. <condition property="run.junitreport">
  1354. <or>
  1355. <isset property="xalan2.present"/>
  1356. <and>
  1357. <isset property="xalan.present"/>
  1358. <isset property="bsf.present"/>
  1359. </and>
  1360. </or>
  1361. </condition>
  1362. <property name="includetests" value="**/*Test*" />
  1363. <junit printsummary="${junit.summary}" haltonfailure="${test.haltonfailure}"
  1364. filtertrace="${junit.filtertrace}"
  1365. fork="${junit.fork}" forkmode="${junit.forkmode}"
  1366. failureproperty="tests.failed">
  1367. <!-- <jvmarg value="-classic"/> -->
  1368. <classpath refid="tests-classpath"/>
  1369. <sysproperty key="ant.home" value="${ant.home}"/>
  1370. <sysproperty key="build.tests" file="${build.tests}"/>
  1371. <sysproperty key="offline" value="${offline}"/>
  1372. <sysproperty key="build.tests.value" value="${build.tests.value}"/>
  1373. <sysproperty key="tests-classpath.value"
  1374. value="${tests-classpath.value}"/>
  1375. <sysproperty key="root" file="${basedir}"/>
  1376. <sysproperty key="build.compiler" value="${build.compiler}"/>
  1377. <formatter type="brief" usefile="false"/>
  1378. <batchtest>
  1379. <fileset dir="${tests.dir}" includes="${includetests}">
  1380. <!-- abstract classes, not testcases -->
  1381. <exclude name="${taskdefs.package}/TaskdefsTest.java"/>
  1382. <exclude name="${ant.package}/BuildFileTest.java"/>
  1383. <exclude name="${regexp.package}/RegexpMatcherTest.java"/>
  1384. <exclude name="${regexp.package}/RegexpTest.java"/>
  1385. <exclude name="${optional.package}/AbstractXSLTLiaisonTest.java"/>
  1386. <exclude name="${ant.package}/types/AbstractFileSetTest.java"/>
  1387. <exclude name="${ant.package}/types/selectors/BaseSelectorTest.java"/>
  1388. <!-- helper classes, not testcases -->
  1389. <exclude name="org/example/**"/>
  1390. <exclude name="${taskdefs.package}/TaskdefTest*Task.java"/>
  1391. <exclude name="${optional.package}/junit/TestFormatter.java"/>
  1392. <!-- interactive tests -->
  1393. <exclude name="${taskdefs.package}/TestProcess.java"/>
  1394. <exclude name="${optional.package}/splash/SplashScreenTest.java"/>
  1395. <!-- only run these tests if their required libraries are
  1396. installed -->
  1397. <selector refid="conditional-patterns"/>
  1398. <!-- tests excluded if the test is run in offline mode -->
  1399. <patternset refid="onlinetests"/>
  1400. <!-- failing tests excluded unless run.failing.tests is set -->
  1401. <patternset refid="teststhatfail"/>
  1402. <!-- runtime dependencies that are different from compile
  1403. time dependencies -->
  1404. <exclude name="${optional.package}/ReplaceRegExpTest.java"
  1405. unless="some.regexp.support"/>
  1406. <exclude name="${optional.package}/sitraka/*.java"
  1407. unless="some.regexp.support"/>
  1408. <exclude name="${ant.package}/types/selectors/ContainsRegexpTest.java"
  1409. unless="some.regexp.support"/>
  1410. <exclude name="${ant.package}/types/mappers/RegexpPatternMapperTest.java"
  1411. unless="some.regexp.support"/>
  1412. <exclude name="${optional.package}/Rhino*.java"
  1413. unless="bsf.present"/>
  1414. <exclude name="${optional.package}/Rhino*.java"
  1415. unless="rhino.present"/>
  1416. <exclude name="${optional.package}/script/*.java"
  1417. unless="bsf.present"/>
  1418. <exclude name="${optional.package}/script/*.java"
  1419. unless="rhino.present"/>
  1420. <exclude name="${optional.package}/BeanShellScriptTest.java"
  1421. unless="bsf.present"/>
  1422. <exclude name="${optional.package}/BeanShellScriptTest.java"
  1423. unless="beanshell.present"/>
  1424. <exclude name="${optional.type.package}/Script*.java"
  1425. unless="bsf.present"/>
  1426. <exclude name="${optional.type.package}/Script*.java"
  1427. unless="rhino.present"/>
  1428. <!-- fail if testcases can be loaded from the system classloader -->
  1429. <exclude name="${ant.package}/AntClassLoaderDelegationTest.java"
  1430. if="tests.are.on.system.classpath"/>
  1431. <exclude name="${optional.package}/junit/JUnitClassLoaderTest.java"
  1432. if="tests.are.on.system.classpath"/>
  1433. <exclude name="${optional.package}/sitraka/XMLReportTest.java"
  1434. if="tests.are.on.system.classpath"/>
  1435. <!-- these tests need to be localised before being ran???? -->
  1436. <exclude name="${optional.package}/PvcsTest.java"/>
  1437. <!-- These tests need a TraX implementation like xalan2 or saxon -->
  1438. <exclude name="${optional.package}/TraXLiaisonTest.java"
  1439. unless="trax.impl.present"/>
  1440. <exclude name="${optional.package}/XsltTest.java"
  1441. unless="trax.impl.present"/>
  1442. <exclude name="${ant.package}/types/XMLCatalogBuildFileTest.java"
  1443. unless="trax.impl.present"/>
  1444. <exclude name="${optional.package}/junit/JUnitReportTest.java"
  1445. unless="run.junitreport"/>
  1446. <exclude name="${taskdefs.package}/StyleTest.java"
  1447. unless="trax.impl.present"/>
  1448. <!-- needs BSF to work -->
  1449. <exclude name="${optional.package}/XalanLiaisonTest.java"
  1450. unless="bsf.present"/>
  1451. <exclude name="${optional.package}/XalanLiaisonTest.java"
  1452. unless="xerces1.present"/>
  1453. <exclude name="${optional.package}/XslpLiaisonTest.java"
  1454. unless="xerces1.present"/>
  1455. <!-- needs resolver.jar to work -->
  1456. <exclude name="${optional.package}/XmlValidateCatalogTest.java"
  1457. unless="apache.resolver.present"/>
  1458. <!-- needs jasperc -->
  1459. <exclude name="${optional.package}/JspcTest.java"
  1460. unless="jasper.present"/>
  1461. <!-- misc oneoff tests -->
  1462. <exclude name="${optional.package}/WsdlToDotnetTest.java"
  1463. unless="dotnetapps.found"/>
  1464. <exclude name="${optional.package}/DotnetTest.java"
  1465. unless="dotnetapps.found"/>
  1466. <!-- These tests only passes if testcases and Ant classes have
  1467. been loaded by the same classloader - will throw
  1468. IllegalAccessExceptions otherwise. -->
  1469. <exclude name="${ant.package}/DirectoryScannerTest.java"
  1470. unless="tests.and.ant.share.classloader"/>
  1471. <exclude name="${taskdefs.package}/SQLExecTest.java"
  1472. unless="tests.and.ant.share.classloader"/>
  1473. <exclude name="${taskdefs.package}/cvslib/ChangeLogWriterTest.java"
  1474. unless="tests.and.ant.share.classloader"/>
  1475. <exclude name="${optional.package}/sos/SOSTest.java"
  1476. unless="tests.and.ant.share.classloader"/>
  1477. <exclude name="${optional.package}/vss/MSVSSTest.java"
  1478. unless="tests.and.ant.share.classloader"/>
  1479. <exclude name="${optional.package}/TraXLiaisonTest.java"
  1480. unless="tests.and.ant.share.classloader"/>
  1481. <exclude name="${optional.package}/metamata/MAuditParserTest.java"
  1482. unless="tests.and.ant.share.classloader"/>
  1483. <exclude name="${taskdefs.package}/ProcessDestroyerTest.java"
  1484. unless="tests.and.ant.share.classloader"/>
  1485. <exclude name="${taskdefs.package}/ProtectedJarMethodsTest.java"
  1486. unless="tests.and.ant.share.classloader"/>
  1487. <!-- can only run if cvs is installed on your machine
  1488. enable by setting the property have.cvs
  1489. -->
  1490. <exclude name="${taskdefs.package}/AbstractCvsTaskTest.java"
  1491. unless="have.cvs"/>
  1492. <!-- needs a local ftp server and the entry of a user/password combination -->
  1493. <exclude name="${optional.package}/net/FTPTest.java"/>
  1494. <!-- test needs special setup -->
  1495. <exclude name="${optional.package}/ssh/ScpTest.java"/>
  1496. <!-- test fails if build/classes and ant.jar are using the same
  1497. classloader -->
  1498. <exclude name="${ant.package}/util/ClasspathUtilsTest.java"
  1499. if="tests.and.ant.share.classloader"/>
  1500. </fileset>
  1501. </batchtest>
  1502. </junit>
  1503. <fail if="tests.failed">At least one test has failed.</fail>
  1504. </target>
  1505. <target name="run-single-test" if="testcase" depends="compile-tests,run-single-test-only"
  1506. description="--> runs the single unit test defined in the testcase property"/>
  1507. <target name="run-single-test-only" if="testcase"
  1508. description="--> runs the single unit test defined in the testcase property">
  1509. <junit printsummary="${junit.summary}"
  1510. haltonfailure="${test.haltonfailure}"
  1511. fork="${junit.fork}"
  1512. filtertrace="${junit.filtertrace}">
  1513. <!-- <jvmarg value="-classic"/> -->
  1514. <sysproperty key="ant.home" value="${ant.home}"/>
  1515. <sysproperty key="build.tests" file="${build.tests}"/>
  1516. <sysproperty key="build.tests.value" value="${build.tests.value}"/>
  1517. <sysproperty key="offline" value="${offline}"/>
  1518. <sysproperty key="tests-classpath.value"
  1519. value="${tests-classpath.value}"/>
  1520. <sysproperty key="root" file="${basedir}"/>
  1521. <sysproperty key="build.compiler" value="${build.compiler}"/>
  1522. <classpath refid="tests-classpath"/>
  1523. <formatter type="plain" usefile="false"/>
  1524. <test name="${testcase}"/>
  1525. </junit>
  1526. </target>
  1527. <target name="interactive-tests" description="--> runs interactive tests"
  1528. depends="compile-tests"
  1529. if="jdk1.3+">
  1530. <java classpathref="tests-classpath"
  1531. classname="org.apache.tools.ant.taskdefs.TestProcess"
  1532. fork="true"/>
  1533. </target>
  1534. <!--
  1535. ===================================================================
  1536. Main target - runs dist-lite by default
  1537. ===================================================================
  1538. -->
  1539. <target name="main"
  1540. description="--> creates a minimum distribution in ./dist"
  1541. depends="dist-lite"/>
  1542. </project>