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

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