651 |
11 Apr 08 |
nicklas |
1 |
<?xml version="1.0" encoding="UTF-8"?> |
651 |
11 Apr 08 |
nicklas |
2 |
<project |
651 |
11 Apr 08 |
nicklas |
3 |
name="ExampleWebServiceClient" |
651 |
11 Apr 08 |
nicklas |
4 |
default="build" |
651 |
11 Apr 08 |
nicklas |
5 |
basedir="."> |
651 |
11 Apr 08 |
nicklas |
6 |
|
1407 |
18 Oct 11 |
nicklas |
<!--create this file if you need to override values from properties below --> |
1407 |
18 Oct 11 |
nicklas |
8 |
<property file="build.properties" /> |
1407 |
18 Oct 11 |
nicklas |
9 |
|
651 |
11 Apr 08 |
nicklas |
<!-- settings for the BASE webservices server --> |
651 |
11 Apr 08 |
nicklas |
<!-- modify the values as needed --> |
651 |
11 Apr 08 |
nicklas |
12 |
<property name="services.url" value="http://localhost:8080/base2/services" /> |
651 |
11 Apr 08 |
nicklas |
13 |
<property name="services.login" value="root" /> |
651 |
11 Apr 08 |
nicklas |
14 |
<property name="services.password" value="root" /> |
651 |
11 Apr 08 |
nicklas |
<!-- set this to a valid directory to enable download of raw data from raw bioassays --> |
651 |
11 Apr 08 |
nicklas |
16 |
<property name="download.dir" value="" /> |
651 |
11 Apr 08 |
nicklas |
17 |
|
651 |
11 Apr 08 |
nicklas |
<!-- variables used --> |
651 |
11 Apr 08 |
nicklas |
19 |
<property name="name" value="example-webservices" /> |
1582 |
19 Mar 12 |
nicklas |
20 |
<property name="version" value="3.2-dev" /> |
651 |
11 Apr 08 |
nicklas |
21 |
<property name="src" location="src" description="Location of source files" /> |
651 |
11 Apr 08 |
nicklas |
22 |
<property name="build" location="build" description="Location of compiled files" /> |
651 |
11 Apr 08 |
nicklas |
23 |
<property name="dist" location="dist" description="Directory where distribution should be created" /> |
651 |
11 Apr 08 |
nicklas |
24 |
<property name="jar.name" value="${name}.jar" description="Name of JAR file with the compiled code." /> |
651 |
11 Apr 08 |
nicklas |
25 |
<property name="tar.prefix" value="${name}-${version}" description="Prefix of .tar.gz file for download." /> |
651 |
11 Apr 08 |
nicklas |
26 |
<property name="tar.name" value="${tar.prefix}.tar.gz" description="Full name of .tar.gz file for download." /> |
651 |
11 Apr 08 |
nicklas |
27 |
<property name="javac.arg" value="-Xlint:unchecked" /> |
1279 |
24 Nov 10 |
nicklas |
28 |
<property name="javac.source" value="1.6" /> |
1279 |
24 Nov 10 |
nicklas |
29 |
<property name="javac.target" value="1.6" /> |
1033 |
07 Apr 09 |
nicklas |
30 |
<property name="javac.encoding" value="UTF-8" /> |
1407 |
18 Oct 11 |
nicklas |
31 |
<property name="depend.base-version" |
1459 |
11 Nov 11 |
nicklas |
32 |
value="3.1.0" |
1407 |
18 Oct 11 |
nicklas |
33 |
description="The BASE version that this project depends on." |
1407 |
18 Oct 11 |
nicklas |
34 |
/> |
1296 |
24 Feb 11 |
nicklas |
35 |
<property name="depend.jars" |
1407 |
18 Oct 11 |
nicklas |
36 |
value="http://base2.thep.lu.se/base/jars/${depend.base-version}" |
1407 |
18 Oct 11 |
nicklas |
37 |
description="The location of the BASE core JARs that this project depends on." |
1296 |
24 Feb 11 |
nicklas |
38 |
/> |
651 |
11 Apr 08 |
nicklas |
39 |
|
651 |
11 Apr 08 |
nicklas |
<!-- set up classpath for compiling --> |
651 |
11 Apr 08 |
nicklas |
41 |
<path id="classpath"> |
651 |
11 Apr 08 |
nicklas |
42 |
<fileset dir="lib"> |
651 |
11 Apr 08 |
nicklas |
43 |
<include name="**/*.jar" /> |
651 |
11 Apr 08 |
nicklas |
44 |
</fileset> |
651 |
11 Apr 08 |
nicklas |
45 |
</path> |
651 |
11 Apr 08 |
nicklas |
46 |
|
651 |
11 Apr 08 |
nicklas |
47 |
<target name="init"> |
651 |
11 Apr 08 |
nicklas |
48 |
<mkdir dir="${build}" /> |
651 |
11 Apr 08 |
nicklas |
49 |
<mkdir dir="${dist}" /> |
651 |
11 Apr 08 |
nicklas |
50 |
</target> |
651 |
11 Apr 08 |
nicklas |
51 |
|
651 |
11 Apr 08 |
nicklas |
52 |
<target name="clean"> |
651 |
11 Apr 08 |
nicklas |
53 |
<delete failonerror="false" includeemptydirs="true"> |
651 |
11 Apr 08 |
nicklas |
54 |
<fileset dir="${build}" defaultexcludes="no" /> |
651 |
11 Apr 08 |
nicklas |
55 |
<fileset dir="${dist}" defaultexcludes="no" /> |
651 |
11 Apr 08 |
nicklas |
56 |
<fileset file="${jar.name}" /> |
651 |
11 Apr 08 |
nicklas |
57 |
<fileset file="${tar.name}" /> |
651 |
11 Apr 08 |
nicklas |
58 |
</delete> |
651 |
11 Apr 08 |
nicklas |
59 |
</target> |
651 |
11 Apr 08 |
nicklas |
60 |
|
651 |
11 Apr 08 |
nicklas |
61 |
<target |
651 |
11 Apr 08 |
nicklas |
62 |
name="dist" |
651 |
11 Apr 08 |
nicklas |
63 |
depends="clean,build" |
651 |
11 Apr 08 |
nicklas |
64 |
> |
651 |
11 Apr 08 |
nicklas |
65 |
<copy todir="${dist}"> |
651 |
11 Apr 08 |
nicklas |
66 |
<fileset dir="." includes="README,LICENSE,RELEASE,build.xml" /> |
651 |
11 Apr 08 |
nicklas |
67 |
<fileset dir="." includes="src/**" /> |
651 |
11 Apr 08 |
nicklas |
68 |
<fileset dir="." includes="lib/**" /> |
651 |
11 Apr 08 |
nicklas |
69 |
<fileset file="${jar.name}" /> |
651 |
11 Apr 08 |
nicklas |
70 |
</copy> |
651 |
11 Apr 08 |
nicklas |
71 |
</target> |
651 |
11 Apr 08 |
nicklas |
72 |
|
651 |
11 Apr 08 |
nicklas |
73 |
<target |
651 |
11 Apr 08 |
nicklas |
74 |
name="package" |
651 |
11 Apr 08 |
nicklas |
75 |
depends="dist" |
651 |
11 Apr 08 |
nicklas |
76 |
description="Create binary distribution package" |
651 |
11 Apr 08 |
nicklas |
77 |
> |
651 |
11 Apr 08 |
nicklas |
78 |
<tar |
651 |
11 Apr 08 |
nicklas |
79 |
destfile="${tar.name}" |
651 |
11 Apr 08 |
nicklas |
80 |
longfile="gnu" |
651 |
11 Apr 08 |
nicklas |
81 |
compression="gzip" |
651 |
11 Apr 08 |
nicklas |
82 |
> |
651 |
11 Apr 08 |
nicklas |
83 |
<tarfileset |
651 |
11 Apr 08 |
nicklas |
84 |
dir="${dist}" |
651 |
11 Apr 08 |
nicklas |
85 |
mode="755" |
651 |
11 Apr 08 |
nicklas |
86 |
prefix="${tar.prefix}" |
651 |
11 Apr 08 |
nicklas |
87 |
preserveLeadingSlashes="true" |
651 |
11 Apr 08 |
nicklas |
88 |
> |
651 |
11 Apr 08 |
nicklas |
89 |
<include name="**/*.sh" /> |
651 |
11 Apr 08 |
nicklas |
90 |
</tarfileset> |
651 |
11 Apr 08 |
nicklas |
91 |
<tarfileset |
651 |
11 Apr 08 |
nicklas |
92 |
dir="${dist}" |
651 |
11 Apr 08 |
nicklas |
93 |
prefix="${tar.prefix}" |
651 |
11 Apr 08 |
nicklas |
94 |
preserveLeadingSlashes="true" |
651 |
11 Apr 08 |
nicklas |
95 |
> |
651 |
11 Apr 08 |
nicklas |
96 |
<exclude name="**/*.sh" /> |
651 |
11 Apr 08 |
nicklas |
97 |
</tarfileset> |
651 |
11 Apr 08 |
nicklas |
98 |
</tar> |
651 |
11 Apr 08 |
nicklas |
99 |
</target> |
651 |
11 Apr 08 |
nicklas |
100 |
|
651 |
11 Apr 08 |
nicklas |
101 |
<target |
651 |
11 Apr 08 |
nicklas |
102 |
name="test" |
651 |
11 Apr 08 |
nicklas |
103 |
description="Test the client by logging in to BASE and listing projects and experiments" |
651 |
11 Apr 08 |
nicklas |
104 |
depends="build" |
651 |
11 Apr 08 |
nicklas |
105 |
> |
651 |
11 Apr 08 |
nicklas |
106 |
<java |
651 |
11 Apr 08 |
nicklas |
107 |
classname="net.sf.basedb.ws.example.Main" |
651 |
11 Apr 08 |
nicklas |
108 |
> |
651 |
11 Apr 08 |
nicklas |
109 |
<arg value="${services.url}" /> |
651 |
11 Apr 08 |
nicklas |
110 |
<arg value="${services.login}" /> |
651 |
11 Apr 08 |
nicklas |
111 |
<arg value="${services.password}" /> |
651 |
11 Apr 08 |
nicklas |
112 |
<arg value="${download.dir}" /> |
651 |
11 Apr 08 |
nicklas |
113 |
<classpath> |
651 |
11 Apr 08 |
nicklas |
114 |
<path refid="classpath" /> |
651 |
11 Apr 08 |
nicklas |
115 |
<path location="${build}" /> |
651 |
11 Apr 08 |
nicklas |
116 |
</classpath> |
651 |
11 Apr 08 |
nicklas |
117 |
</java> |
651 |
11 Apr 08 |
nicklas |
118 |
</target> |
651 |
11 Apr 08 |
nicklas |
119 |
|
651 |
11 Apr 08 |
nicklas |
120 |
<target |
651 |
11 Apr 08 |
nicklas |
121 |
name="build" |
1296 |
24 Feb 11 |
nicklas |
122 |
depends="init,checkjar" |
651 |
11 Apr 08 |
nicklas |
123 |
description="Compiles the plugin and put in jar" |
651 |
11 Apr 08 |
nicklas |
124 |
> |
651 |
11 Apr 08 |
nicklas |
125 |
<mkdir dir="${build}" /> |
651 |
11 Apr 08 |
nicklas |
126 |
<javac |
651 |
11 Apr 08 |
nicklas |
127 |
encoding="${javac.encoding}" |
651 |
11 Apr 08 |
nicklas |
128 |
srcdir="${src}" |
651 |
11 Apr 08 |
nicklas |
129 |
destdir="${build}" |
651 |
11 Apr 08 |
nicklas |
130 |
debug="true" |
651 |
11 Apr 08 |
nicklas |
131 |
classpathref="classpath" |
651 |
11 Apr 08 |
nicklas |
132 |
source="${javac.source}" |
651 |
11 Apr 08 |
nicklas |
133 |
target="${javac.target}" |
1279 |
24 Nov 10 |
nicklas |
134 |
includeantruntime="false" |
651 |
11 Apr 08 |
nicklas |
135 |
> |
651 |
11 Apr 08 |
nicklas |
136 |
<compilerarg value="${javac.arg}" /> |
651 |
11 Apr 08 |
nicklas |
137 |
</javac> |
651 |
11 Apr 08 |
nicklas |
138 |
<jar |
651 |
11 Apr 08 |
nicklas |
139 |
jarfile="${jar.name}" |
651 |
11 Apr 08 |
nicklas |
140 |
basedir="${build}" |
651 |
11 Apr 08 |
nicklas |
141 |
> |
651 |
11 Apr 08 |
nicklas |
142 |
</jar> |
651 |
11 Apr 08 |
nicklas |
143 |
</target> |
1296 |
24 Feb 11 |
nicklas |
144 |
|
1296 |
24 Feb 11 |
nicklas |
145 |
<target |
1296 |
24 Feb 11 |
nicklas |
146 |
name="checkjar" |
1407 |
18 Oct 11 |
nicklas |
147 |
description="Checks that the BASE JAR files exists." |
1296 |
24 Feb 11 |
nicklas |
148 |
> |
1296 |
24 Feb 11 |
nicklas |
149 |
<available classname="net.sf.basedb.ws.client.SessionClient" |
1407 |
18 Oct 11 |
nicklas |
150 |
classpathref="classpath" property="base-wsclient" /> |
1407 |
18 Oct 11 |
nicklas |
151 |
<fail unless="base-wsclient" message="Can't find base-webservices-client-${depend.base-version}.jar in ./lib. Try 'ant download-lib' to download the missing file." /> |
1407 |
18 Oct 11 |
nicklas |
152 |
<echo>Found base-webservices-client-${depend.base-version}.jar</echo> |
1296 |
24 Feb 11 |
nicklas |
153 |
</target> |
1296 |
24 Feb 11 |
nicklas |
154 |
|
1296 |
24 Feb 11 |
nicklas |
155 |
<target |
1296 |
24 Feb 11 |
nicklas |
156 |
name="download-lib" |
1407 |
18 Oct 11 |
nicklas |
157 |
description="Download BASE JAR Files" |
1296 |
24 Feb 11 |
nicklas |
158 |
> |
1296 |
24 Feb 11 |
nicklas |
159 |
<echo> |
1296 |
24 Feb 11 |
nicklas |
160 |
------------------------------------------------------- |
1296 |
24 Feb 11 |
nicklas |
161 |
NOTE! You may specifiy a different download location by |
1296 |
24 Feb 11 |
nicklas |
162 |
creating the file './build.properties' and |
1296 |
24 Feb 11 |
nicklas |
163 |
setting 'depend.jars' to the URL to download from. |
1296 |
24 Feb 11 |
nicklas |
164 |
------------------------------------------------------- |
1296 |
24 Feb 11 |
nicklas |
165 |
</echo> |
1407 |
18 Oct 11 |
nicklas |
166 |
<download-lib file="base-webservices-client-${depend.base-version}.jar" /> |
1296 |
24 Feb 11 |
nicklas |
167 |
</target> |
1296 |
24 Feb 11 |
nicklas |
168 |
|
1407 |
18 Oct 11 |
nicklas |
169 |
<macrodef name="download-lib" description="Download BASE JAR files"> |
1296 |
24 Feb 11 |
nicklas |
170 |
<attribute name="file" /> |
1296 |
24 Feb 11 |
nicklas |
171 |
<sequential> |
1296 |
24 Feb 11 |
nicklas |
172 |
<get |
1296 |
24 Feb 11 |
nicklas |
173 |
dest="lib/@{file}" |
1296 |
24 Feb 11 |
nicklas |
174 |
src="${depend.jars}/@{file}" |
1296 |
24 Feb 11 |
nicklas |
175 |
usetimestamp="true" |
1296 |
24 Feb 11 |
nicklas |
176 |
verbose="true" |
1296 |
24 Feb 11 |
nicklas |
177 |
ignoreerrors="true" |
1296 |
24 Feb 11 |
nicklas |
178 |
/> |
1296 |
24 Feb 11 |
nicklas |
179 |
</sequential> |
1296 |
24 Feb 11 |
nicklas |
180 |
</macrodef> |
651 |
11 Apr 08 |
nicklas |
181 |
</project> |