extensions/net.sf.basedb.genepattern/trunk/download.xml

Code
Comments
Other
Rev Date Author Line
1138 24 Jun 09 nicklas 1 <?xml version="1.0" encoding="UTF-8"?>
1138 24 Jun 09 nicklas 2 <project 
1138 24 Jun 09 nicklas 3   name="Download GenePattern files" 
1138 24 Jun 09 nicklas 4   default="download" 
1138 24 Jun 09 nicklas 5   basedir=".">
1138 24 Jun 09 nicklas 6
1138 24 Jun 09 nicklas 7   <property name="genepattern.url" 
1138 24 Jun 09 nicklas 8     value="http://genepattern.broad.mit.edu/gp" />
1138 24 Jun 09 nicklas 9   <property name="lib" value="lib/genepattern" />
1138 24 Jun 09 nicklas 10   <property name="resources" value="resources" />
1138 24 Jun 09 nicklas 11   
1138 24 Jun 09 nicklas 12   <target 
1138 24 Jun 09 nicklas 13     name="download"
1138 24 Jun 09 nicklas 14     description="Download GenePattern files"
1138 24 Jun 09 nicklas 15     >
1138 24 Jun 09 nicklas 16     <echo>
1138 24 Jun 09 nicklas 17 -------------------------------------------------------    
1138 24 Jun 09 nicklas 18 Downloading from ${genepattern.url}
1138 24 Jun 09 nicklas 19 NOTE! You may specifiy a different download location by 
1138 24 Jun 09 nicklas 20 starting this script with (on one line):
1138 24 Jun 09 nicklas 21
1138 24 Jun 09 nicklas 22  ant -f download.xml
1138 24 Jun 09 nicklas 23    -Dgenepattern.url=http://your.genepattern.server/gp 
1138 24 Jun 09 nicklas 24 -------------------------------------------------------
1138 24 Jun 09 nicklas 25     </echo>
1138 24 Jun 09 nicklas 26     <!-- Download runVisualizer.jar and add it as a resource to gp-integration.jar -->
1138 24 Jun 09 nicklas 27     <mkdir dir="${resources}/visualizer" />
1138 24 Jun 09 nicklas 28     <download-lib 
1138 24 Jun 09 nicklas 29       file="runVisualizer.jar" 
1138 24 Jun 09 nicklas 30       todir="${resources}/visualizer" 
1138 24 Jun 09 nicklas 31       from="${genepattern.url}/downloads" 
1138 24 Jun 09 nicklas 32     />
1138 24 Jun 09 nicklas 33     <jar 
1138 24 Jun 09 nicklas 34       destfile="gp-integration.jar"
1138 24 Jun 09 nicklas 35       update="yes"
1138 24 Jun 09 nicklas 36       basedir="."
1138 24 Jun 09 nicklas 37       duplicate="preserve"
1138 24 Jun 09 nicklas 38       includes="${resources}/**"
1138 24 Jun 09 nicklas 39     />
1138 24 Jun 09 nicklas 40     <!--Download GenePattern.zip and extract some files to the lib/genepattern directory -->
1138 24 Jun 09 nicklas 41     <download-lib 
1138 24 Jun 09 nicklas 42       file="GenePattern.zip" 
1138 24 Jun 09 nicklas 43       todir="." 
1138 24 Jun 09 nicklas 44       from="${genepattern.url}/downloads" 
1138 24 Jun 09 nicklas 45     />
1138 24 Jun 09 nicklas 46     <unzip dest="${lib}" src="./GenePattern.zip">
1138 24 Jun 09 nicklas 47       <patternset>
1138 24 Jun 09 nicklas 48         <include name="GenePattern.jar" />
1138 24 Jun 09 nicklas 49         <include name="lib/gp-modules.jar" />
1138 24 Jun 09 nicklas 50       </patternset>
1138 24 Jun 09 nicklas 51       <mapper type="flatten"/>
1138 24 Jun 09 nicklas 52     </unzip>
1138 24 Jun 09 nicklas 53   </target>
1138 24 Jun 09 nicklas 54   
1138 24 Jun 09 nicklas 55   <macrodef name="download-lib" description="Download external files">
1138 24 Jun 09 nicklas 56     <attribute name="file" />
1138 24 Jun 09 nicklas 57     <attribute name="todir" />
1138 24 Jun 09 nicklas 58     <attribute name="from" />
1138 24 Jun 09 nicklas 59     <sequential>
1138 24 Jun 09 nicklas 60       <get 
1138 24 Jun 09 nicklas 61         dest="@{todir}/@{file}" 
1138 24 Jun 09 nicklas 62         src="@{from}/@{file}" 
1138 24 Jun 09 nicklas 63         usetimestamp="true" 
1138 24 Jun 09 nicklas 64         verbose="true"
1138 24 Jun 09 nicklas 65         ignoreerrors="true"
1138 24 Jun 09 nicklas 66       />
1138 24 Jun 09 nicklas 67     </sequential>
1138 24 Jun 09 nicklas 68   </macrodef>
1138 24 Jun 09 nicklas 69 </project>