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.

fetch.xml 5.7 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <?xml version="1.0"?>
  2. <!--
  3. =======================================================================
  4. Build file to fetch optiona libraries for Apache Ant
  5. Copyright (c) 2005 The Apache Software Foundation. All rights
  6. reserved.
  7. =======================================================================
  8. -->
  9. <project name="fetch" default="all" basedir=".">
  10. <description>
  11. This build file downloads JAR files that optional Ant tasks use,
  12. and installs them in a location that is accessible the next time Ant runs.
  13. You can choose three locations, by going -Ddest=LOCATION on the command line
  14. -Ddest=user user lib dir ${user.home}/.ant/lib
  15. -Ddest=system ant lib dir ${ant.home}/lib --Default--
  16. -Ddest=optional optional dir ${ant.home}/lib/optional (for Ant developers)
  17. You may also need to set proxy settings. This can be done on the command line,
  18. or in ${user.home}/.ant/proxy.properties
  19. proxy.host hostname of proxy
  20. proxy.port port (default 80)
  21. proxy.user user (default="")
  22. proxy.pass pass (default="" )
  23. Note that this project does not download any scripting language implementations.
  24. </description>
  25. <!-- Give user a chance to override without editing this file
  26. (and without typing -D each time it compiles it) -->
  27. <property file=".ant.properties"/>
  28. <property file="${user.home}/.ant.properties"/>
  29. <property name="lib.dir" location="lib" />
  30. <property name="optional.dir" location="${lib.dir}/optional" />
  31. <property name="userlib.dir" location="${user.home}/.ant/lib" />
  32. <!-- load in our properties table -->
  33. <property file="${lib.dir}/libraries.properties"/>
  34. <!-- configure an HTTP proxy -->
  35. <property file="${user.home}/.ant/proxy.properties" />
  36. <target name="setproxy" unless="setproxy.disabled" >
  37. <property name="proxy.host" value="" />
  38. <property name="proxy.port" value="80" />
  39. <property name="proxy.user" value="" />
  40. <property name="proxy.pass" value="" />
  41. <echo level="verbose">
  42. proxy: ${proxy.host}:${proxy.port} [${proxy.user}/${proxy.pass}]
  43. </echo>
  44. <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
  45. proxyuser="${proxy.user}" proxypassword="${proxy.pass}" />
  46. </target>
  47. <target name="pick-dest">
  48. <condition property="dest.dir"
  49. value="${lib.dir}">
  50. <or>
  51. <equals arg1="${dest}" arg2="system" />
  52. <not><isset property="dest"/></not>
  53. </or>
  54. </condition>
  55. <condition property="dest.dir"
  56. value="${optional.dir}">
  57. <equals arg1="${dest}" arg2="optional" />
  58. </condition>
  59. <condition property="dest.dir"
  60. value="${userlib.dir}">
  61. <equals arg1="${dest}" arg2="user" />
  62. </condition>
  63. <fail>
  64. Unknown destination : ${dest}
  65. <condition>
  66. <not><isset property="dest.dir" /></not>
  67. </condition>
  68. </fail>
  69. <echo>Downloading to ${dest.dir}</echo>
  70. </target>
  71. <!-- any init stuff -->
  72. <target name="init" depends="setproxy,pick-dest" >
  73. <macrodef name="f">
  74. <attribute name="project" />
  75. <sequential>
  76. <fail>
  77. Unknown project @{project}
  78. <condition>
  79. <not>
  80. <isset property="@{project}.version"/>
  81. </not>
  82. </condition>
  83. </fail>
  84. <libraries destDir="${dest.dir}" flatten="true" >
  85. <library project="@{project}" version="${@{project}.version}" />
  86. </libraries>
  87. </sequential>
  88. </macrodef>
  89. <macrodef name="f2">
  90. <attribute name="project" />
  91. <attribute name="archive" />
  92. <sequential>
  93. <fail>
  94. Unknown file @{archive}/
  95. <condition>
  96. <not>
  97. <isset property="@{archive}.version"/>
  98. </not>
  99. </condition>
  100. </fail>
  101. <libraries destDir="${dest.dir}" flatten="true" >
  102. <library project="@{project}"
  103. archive="archive"
  104. version="${@{archive}.version}" />
  105. </libraries>
  106. </sequential>
  107. </macrodef>
  108. </target>
  109. <target name="diag" depends="init">
  110. <echoproperties />
  111. </target>
  112. <target name="logging"
  113. description="load logging libraries"
  114. depends="init">
  115. <f project="log4j" />
  116. <f project="commons-logging" />
  117. </target>
  118. <target name="junit"
  119. description="load junit libraries"
  120. depends="init">
  121. <f project="junit" />
  122. </target>
  123. <target name="xml"
  124. description="load full XML libraries (xalan, resolver)"
  125. depends="init">
  126. <f project="xalan" />
  127. <f project="xml-resolver" />
  128. </target>
  129. <target name="networking"
  130. description="load networking libraries (commons-net; jsch)"
  131. depends="init">
  132. <f project="commons-net" />
  133. <f project="jsch" />
  134. </target>
  135. <target name="regexp"
  136. description="load regexp libraries"
  137. depends="init">
  138. <f project="regexp" />
  139. <f project="oro" />
  140. </target>
  141. <target name="antlr"
  142. description="load antlr libraries"
  143. depends="init">
  144. <f project="antlr" />
  145. </target>
  146. <target name="bcel"
  147. description="load bcel libraries"
  148. depends="init">
  149. <f project="bcel" />
  150. </target>
  151. <target name="jdepend"
  152. description="load jdepend libraries"
  153. depends="init">
  154. <f project="jdepend" />
  155. </target>
  156. <target name="bsf"
  157. description="load bsf libraries"
  158. depends="init">
  159. <f project="bsf" />
  160. </target>
  161. <target name="debugging"
  162. description="internal ant debugging"
  163. depends="init">
  164. <f project="which" />
  165. </target>
  166. <target name="all"
  167. description="load all the libraries"
  168. depends="logging,junit,xml,networking,regexp,antlr,bcel,jdepend,bsf,debugging" />
  169. </project>