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