1090 |
27 May 09 |
nicklas |
1 |
<?xml version="1.0" encoding="UTF-8"?> |
1090 |
27 May 09 |
nicklas |
2 |
<project |
1090 |
27 May 09 |
nicklas |
3 |
name="GenePattern" |
1090 |
27 May 09 |
nicklas |
4 |
default="jar" |
1090 |
27 May 09 |
nicklas |
5 |
basedir="."> |
1090 |
27 May 09 |
nicklas |
6 |
|
1090 |
27 May 09 |
nicklas |
<!--create this file if you need to override values from properties below --> |
1090 |
27 May 09 |
nicklas |
8 |
<property file="build.properties" /> |
1090 |
27 May 09 |
nicklas |
9 |
|
1090 |
27 May 09 |
nicklas |
<!-- variables used --> |
1090 |
27 May 09 |
nicklas |
11 |
<property name="name" value="gp-integration" /> |
1090 |
27 May 09 |
nicklas |
12 |
<property name="version" value="1.0pre" /> |
1090 |
27 May 09 |
nicklas |
13 |
<property name="src" location="src" description="Location of source files" /> |
1090 |
27 May 09 |
nicklas |
14 |
<property name="build" location="build" description="Location of compiled files" /> |
1090 |
27 May 09 |
nicklas |
15 |
<property name="jar.name" value="${name}.jar" |
1090 |
27 May 09 |
nicklas |
16 |
description="Name of JAR file with the extensions." /> |
1090 |
27 May 09 |
nicklas |
17 |
<property name="tar.prefix" value="${name}-${version}" |
1090 |
27 May 09 |
nicklas |
18 |
description="Prefix of .tar.gz file for download." /> |
1090 |
27 May 09 |
nicklas |
19 |
<property name="tar.name" value="${tar.prefix}.tar.gz" |
1090 |
27 May 09 |
nicklas |
20 |
description="Full name of .tar.gz file for download." /> |
1090 |
27 May 09 |
nicklas |
21 |
<property name="javac.arg" value="-Xlint:unchecked" /> |
1090 |
27 May 09 |
nicklas |
22 |
<property name="javac.source" value="1.5" /> |
1090 |
27 May 09 |
nicklas |
23 |
<property name="javac.target" value="1.5" /> |
1090 |
27 May 09 |
nicklas |
24 |
<property name="javac.encoding" value="UTF-8" /> |
1117 |
10 Jun 09 |
nicklas |
25 |
<property name="depend.jars" value="http://base2.thep.lu.se/base/jars/2.13.0" /> |
1103 |
29 May 09 |
nicklas |
26 |
<property name="genepattern.jars" value="http://genepattern.broad.mit.edu/gp/downloads" /> |
1090 |
27 May 09 |
nicklas |
27 |
|
1090 |
27 May 09 |
nicklas |
<!-- set up classpath for compiling --> |
1090 |
27 May 09 |
nicklas |
29 |
<path id="classpath"> |
1090 |
27 May 09 |
nicklas |
30 |
<fileset dir="lib"> |
1090 |
27 May 09 |
nicklas |
31 |
<include name="**/*.jar" /> |
1090 |
27 May 09 |
nicklas |
32 |
</fileset> |
1090 |
27 May 09 |
nicklas |
33 |
</path> |
1090 |
27 May 09 |
nicklas |
34 |
|
1090 |
27 May 09 |
nicklas |
35 |
<target name="init"> |
1090 |
27 May 09 |
nicklas |
36 |
<mkdir dir="${build}" /> |
1090 |
27 May 09 |
nicklas |
37 |
</target> |
1090 |
27 May 09 |
nicklas |
38 |
|
1090 |
27 May 09 |
nicklas |
39 |
<target name="clean"> |
1090 |
27 May 09 |
nicklas |
40 |
<delete failonerror="false" includeemptydirs="true"> |
1090 |
27 May 09 |
nicklas |
41 |
<fileset dir="${build}" defaultexcludes="no" /> |
1090 |
27 May 09 |
nicklas |
42 |
<fileset file="${jar.name}" /> |
1090 |
27 May 09 |
nicklas |
43 |
<fileset file="${tar.name}" /> |
1090 |
27 May 09 |
nicklas |
44 |
</delete> |
1090 |
27 May 09 |
nicklas |
45 |
</target> |
1090 |
27 May 09 |
nicklas |
46 |
|
1090 |
27 May 09 |
nicklas |
47 |
<target |
1090 |
27 May 09 |
nicklas |
48 |
name="package" |
1090 |
27 May 09 |
nicklas |
49 |
depends="clean,jar" |
1090 |
27 May 09 |
nicklas |
50 |
description="Clean and create binary distribution package" |
1090 |
27 May 09 |
nicklas |
51 |
> |
1090 |
27 May 09 |
nicklas |
52 |
<tar |
1090 |
27 May 09 |
nicklas |
53 |
destfile="${tar.name}" |
1090 |
27 May 09 |
nicklas |
54 |
longfile="gnu" |
1090 |
27 May 09 |
nicklas |
55 |
compression="gzip" |
1090 |
27 May 09 |
nicklas |
56 |
> |
1090 |
27 May 09 |
nicklas |
57 |
<tarfileset |
1090 |
27 May 09 |
nicklas |
58 |
dir="." |
1090 |
27 May 09 |
nicklas |
59 |
prefix="${tar.prefix}" |
1090 |
27 May 09 |
nicklas |
60 |
preserveLeadingSlashes="true" |
1138 |
24 Jun 09 |
nicklas |
61 |
includes="${jar.name},download.xml,README,LICENSE*,lib/genepattern/*" |
1104 |
29 May 09 |
nicklas |
62 |
excludes="lib/genepattern/GenePattern.jar,lib/genepattern/gp-modules.jar" |
1090 |
27 May 09 |
nicklas |
63 |
> |
1090 |
27 May 09 |
nicklas |
64 |
</tarfileset> |
1090 |
27 May 09 |
nicklas |
65 |
</tar> |
1090 |
27 May 09 |
nicklas |
66 |
</target> |
1090 |
27 May 09 |
nicklas |
67 |
|
1090 |
27 May 09 |
nicklas |
68 |
<target |
1090 |
27 May 09 |
nicklas |
69 |
name="jar" |
1090 |
27 May 09 |
nicklas |
70 |
depends="build" |
1090 |
27 May 09 |
nicklas |
71 |
description="Creates the extension JAR file" |
1090 |
27 May 09 |
nicklas |
72 |
> |
1090 |
27 May 09 |
nicklas |
73 |
<copy todir="${build}"> |
1090 |
27 May 09 |
nicklas |
74 |
<fileset dir="." includes="META-INF/*" /> |
1090 |
27 May 09 |
nicklas |
75 |
</copy> |
1091 |
27 May 09 |
nicklas |
76 |
<replace token="%%plugins.jar%%" value="${jar.name}" file="${build}/META-INF/base-plugins.xml" /> |
1090 |
27 May 09 |
nicklas |
77 |
<jar |
1090 |
27 May 09 |
nicklas |
78 |
jarfile="${jar.name}" |
1104 |
29 May 09 |
nicklas |
79 |
manifest="${build}/META-INF/MANIFEST.MF" |
1090 |
27 May 09 |
nicklas |
80 |
> |
1090 |
27 May 09 |
nicklas |
81 |
<fileset dir="${build}" /> |
1138 |
24 Jun 09 |
nicklas |
82 |
<fileset dir="." includes="resources/**" |
1138 |
24 Jun 09 |
nicklas |
83 |
excludes="resources/visualizer/runVisualizer.jar"/> |
1090 |
27 May 09 |
nicklas |
84 |
</jar> |
1090 |
27 May 09 |
nicklas |
85 |
</target> |
1090 |
27 May 09 |
nicklas |
86 |
|
1090 |
27 May 09 |
nicklas |
87 |
<target |
1090 |
27 May 09 |
nicklas |
88 |
name="build" |
1090 |
27 May 09 |
nicklas |
89 |
depends="init,checkjar" |
1090 |
27 May 09 |
nicklas |
90 |
description="Compiles the plugin and put in jar" |
1090 |
27 May 09 |
nicklas |
91 |
> |
1090 |
27 May 09 |
nicklas |
92 |
<mkdir dir="${build}" /> |
1090 |
27 May 09 |
nicklas |
93 |
<javac |
1090 |
27 May 09 |
nicklas |
94 |
encoding="${javac.encoding}" |
1090 |
27 May 09 |
nicklas |
95 |
srcdir="${src}" |
1090 |
27 May 09 |
nicklas |
96 |
destdir="${build}" |
1090 |
27 May 09 |
nicklas |
97 |
debug="true" |
1090 |
27 May 09 |
nicklas |
98 |
classpathref="classpath" |
1090 |
27 May 09 |
nicklas |
99 |
source="${javac.source}" |
1090 |
27 May 09 |
nicklas |
100 |
target="${javac.target}" |
1090 |
27 May 09 |
nicklas |
101 |
> |
1090 |
27 May 09 |
nicklas |
102 |
<compilerarg value="${javac.arg}" /> |
1090 |
27 May 09 |
nicklas |
103 |
</javac> |
1090 |
27 May 09 |
nicklas |
104 |
</target> |
1090 |
27 May 09 |
nicklas |
105 |
|
1090 |
27 May 09 |
nicklas |
106 |
<target |
1090 |
27 May 09 |
nicklas |
107 |
name="checkjar" |
1090 |
27 May 09 |
nicklas |
108 |
description="Checks that the BASE2Core.jar, BASE2Webclient.jar, BASE2CorePlugins.jar and BASE2WSClient.jar exists." |
1090 |
27 May 09 |
nicklas |
109 |
> |
1090 |
27 May 09 |
nicklas |
110 |
<available classname="net.sf.basedb.util.export.spotdata.AbstractBioAssaySetExporter" |
1090 |
27 May 09 |
nicklas |
111 |
classpathref="classpath" property="base2core" /> |
1090 |
27 May 09 |
nicklas |
112 |
<available classname="net.sf.basedb.plugins.util.Parameters" |
1090 |
27 May 09 |
nicklas |
113 |
classpathref="classpath" property="base2plugins" /> |
1090 |
27 May 09 |
nicklas |
114 |
<available classname="net.sf.basedb.clients.web.extensions.toolbar.FixedButtonFactory" |
1090 |
27 May 09 |
nicklas |
115 |
classpathref="classpath" property="base2web" /> |
1090 |
27 May 09 |
nicklas |
116 |
<available classname="net.sf.basedb.info.BioAssaySetInfo" |
1090 |
27 May 09 |
nicklas |
117 |
classpathref="classpath" property="base2webservice" /> |
1103 |
29 May 09 |
nicklas |
118 |
<available classname="org.genepattern.client.GPClient" |
1103 |
29 May 09 |
nicklas |
119 |
classpathref="classpath" property="genepattern.lib" /> |
1090 |
27 May 09 |
nicklas |
120 |
<fail unless="base2core" message="Can't find BASE2Core.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> |
1090 |
27 May 09 |
nicklas |
121 |
<fail unless="base2plugins" message="Can't find BASE2CorePlugins.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> |
1090 |
27 May 09 |
nicklas |
122 |
<fail unless="base2web" message="Can't find BASE2Webclient.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> |
1090 |
27 May 09 |
nicklas |
123 |
<fail unless="base2webservice" message="Can't find BASE2WSClient.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> |
1103 |
29 May 09 |
nicklas |
124 |
<fail unless="genepattern.lib" message="Can't find GenePattern.jar in ./lib/genepattern. Try 'ant download-lib' to download the missing file." /> |
1103 |
29 May 09 |
nicklas |
125 |
<echo>Found all required BASE and GenePattern JAR files.</echo> |
1090 |
27 May 09 |
nicklas |
126 |
</target> |
1090 |
27 May 09 |
nicklas |
127 |
|
1090 |
27 May 09 |
nicklas |
128 |
<target |
1090 |
27 May 09 |
nicklas |
129 |
name="download-lib" |
1103 |
29 May 09 |
nicklas |
130 |
description="Download BASE and GenePattern JAR files" |
1090 |
27 May 09 |
nicklas |
131 |
> |
1090 |
27 May 09 |
nicklas |
132 |
<echo> |
1090 |
27 May 09 |
nicklas |
133 |
------------------------------------------------------- |
1090 |
27 May 09 |
nicklas |
134 |
NOTE! You may specifiy a different download location by |
1103 |
29 May 09 |
nicklas |
135 |
creating the file './build.properties' and setting |
1103 |
29 May 09 |
nicklas |
136 |
'depend.jars' and 'genepattern.jars' to the URLs to |
1103 |
29 May 09 |
nicklas |
137 |
download from. |
1090 |
27 May 09 |
nicklas |
138 |
------------------------------------------------------- |
1090 |
27 May 09 |
nicklas |
139 |
</echo> |
1090 |
27 May 09 |
nicklas |
140 |
<download-lib file="BASE2Core.jar" /> |
1090 |
27 May 09 |
nicklas |
141 |
<download-lib file="BASE2CorePlugins.jar" /> |
1090 |
27 May 09 |
nicklas |
142 |
<download-lib file="BASE2Webclient.jar" /> |
1090 |
27 May 09 |
nicklas |
143 |
<download-lib file="BASE2WSClient.jar" /> |
1103 |
29 May 09 |
nicklas |
<!-- We only need some files from the GenePattern.zip file --> |
1138 |
24 Jun 09 |
nicklas |
145 |
<download-lib file="runVisualizer.jar" todir="./resources/visualizer" from="${genepattern.jars}" /> |
1103 |
29 May 09 |
nicklas |
146 |
<download-lib file="GenePattern.zip" todir="${build}" from="${genepattern.jars}" /> |
1103 |
29 May 09 |
nicklas |
147 |
<unzip dest="lib/genepattern" src="${build}/GenePattern.zip"> |
1103 |
29 May 09 |
nicklas |
148 |
<patternset> |
1103 |
29 May 09 |
nicklas |
149 |
<include name="GenePattern.jar" /> |
1103 |
29 May 09 |
nicklas |
150 |
<include name="lib/gp-modules.jar" /> |
1103 |
29 May 09 |
nicklas |
151 |
</patternset> |
1103 |
29 May 09 |
nicklas |
152 |
<mapper type="flatten"/> |
1103 |
29 May 09 |
nicklas |
153 |
</unzip> |
1138 |
24 Jun 09 |
nicklas |
154 |
<delete file="${build}/GenePattern.zip" /> |
1090 |
27 May 09 |
nicklas |
155 |
</target> |
1090 |
27 May 09 |
nicklas |
156 |
|
1090 |
27 May 09 |
nicklas |
157 |
<macrodef name="download-lib" description="Download BASE core JAR files"> |
1090 |
27 May 09 |
nicklas |
158 |
<attribute name="file" /> |
1103 |
29 May 09 |
nicklas |
159 |
<attribute name="todir" default="lib/compile"/> |
1103 |
29 May 09 |
nicklas |
160 |
<attribute name="from" default="${depend.jars}" /> |
1090 |
27 May 09 |
nicklas |
161 |
<sequential> |
1139 |
24 Jun 09 |
nicklas |
162 |
<mkdir dir="@{todir}" /> |
1090 |
27 May 09 |
nicklas |
163 |
<get |
1103 |
29 May 09 |
nicklas |
164 |
dest="@{todir}/@{file}" |
1103 |
29 May 09 |
nicklas |
165 |
src="@{from}/@{file}" |
1090 |
27 May 09 |
nicklas |
166 |
usetimestamp="true" |
1090 |
27 May 09 |
nicklas |
167 |
verbose="true" |
1090 |
27 May 09 |
nicklas |
168 |
ignoreerrors="true" |
1090 |
27 May 09 |
nicklas |
169 |
/> |
1090 |
27 May 09 |
nicklas |
170 |
</sequential> |
1090 |
27 May 09 |
nicklas |
171 |
</macrodef> |
1090 |
27 May 09 |
nicklas |
172 |
</project> |