JWS-47 override custom/preset analize methods so the input can be validated appropria...
[jabaws.git] / wsbuild.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 \r
3 <project default="build-server" name="compbio-ws" basedir=".">\r
4 \r
5         <!-- java -->\r
6         <property name="classes" location="${basedir}/WEB-INF/classes" />\r
7         <property name="lib.path" location="${basedir}/WEB-INF/lib" />\r
8 \r
9         <path id="classes.path">\r
10                 <pathelement location="${classes}" />\r
11         </path>\r
12 \r
13         <!-- add libraries -->\r
14         <path id="project.classpath">\r
15                 <fileset dir="${lib.path}">\r
16                         <include name="*.jar" />\r
17                 </fileset>\r
18         </path>\r
19 \r
20         <property name="wsdl.dir" location="${basedir}/webservices/compbio/ws/server/resource" />\r
21         <property name="clustal.wsdl" location="${wsdl.dir}/ClustalWS.wsdl" />\r
22         <property name="muscle.wsdl" location="${wsdl.dir}/MuscleWS.wsdl" />\r
23         <property name="tcoffee.wsdl" location="${wsdl.dir}/TcoffeeWS.wsdl" />\r
24         <property name="mafft.wsdl" location="${wsdl.dir}/MafftWS.wsdl" />\r
25         <property name="aacon.wsdl" location="${wsdl.dir}/AAConWS.wsdl" />\r
26         <property name="disembl.wsdl" location="${wsdl.dir}/DisemblWS.wsdl" />\r
27         <property name="globplot.wsdl" location="${wsdl.dir}/GlobPlotWS.wsdl" />\r
28         <property name="iupred.wsdl" location="${wsdl.dir}/IUPredWS.wsdl" />\r
29         <property name="jronn.wsdl" location="${wsdl.dir}/JronnWS.wsdl" />\r
30         <property name="registry.wsdl" location="${wsdl.dir}/RegistryWS.wsdl" />\r
31         \r
32 \r
33         <taskdef name="wsgen" onerror="report" classname="com.sun.tools.ws.ant.WsGen">\r
34                 <classpath refid="project.classpath" />\r
35         </taskdef>\r
36 \r
37         <target name="build-server">\r
38                 <!-- TODO this runs file from Eclipse, but with Ant only this need to depends on clean and build! -->\r
39                         <property name="server.artifacts.dir" location="${basedir}/webservices/compbio/ws/server/jaxws/" />\r
40 \r
41                         <mkdir dir="${server.artifacts.dir}" />\r
42                         <mkdir dir="${wsdl.dir}" />\r
43                         <delete quiet="false" verbose="true" failonerror="false">\r
44                                 <fileset dir="${server.artifacts.dir}">\r
45                                         <include name="*.java" />\r
46                                 </fileset>\r
47                                 <fileset dir="${wsdl.dir}">\r
48                                 </fileset>\r
49                         </delete>\r
50                         <!-- destdir - Where to put generated classes -->\r
51                         <!-- sourcedestdir -  Where to put generated source files -->\r
52                         <!-- resourcedestdir - Where to put generated source files -->\r
53 \r
54                 <wsgen sei="compbio.ws.server.AAConWS" \r
55                                         sourcedestdir="${basedir}/webservices" \r
56                                         destdir="${classes}" \r
57                                         resourcedestdir="${wsdl.dir}" \r
58                                         keep="true" genwsdl="true" \r
59                                         extension="false" \r
60                                         xendorsed="true"                        \r
61                                         verbose="true">\r
62                                         <classpath refid="classes.path" />\r
63                                         <classpath refid="project.classpath" />\r
64                 </wsgen>\r
65 \r
66                 <wsgen sei="compbio.ws.server.ClustalWS" \r
67                                         sourcedestdir="${basedir}/webservices" \r
68                                         destdir="${classes}" \r
69                                         resourcedestdir="${wsdl.dir}" \r
70                                         keep="true" genwsdl="true" \r
71                                         extension="false" \r
72                                         xendorsed="true"\r
73                                         verbose="true">\r
74                                         <classpath refid="classes.path" />\r
75                                         <classpath refid="project.classpath" />\r
76                 </wsgen>\r
77                 <wsgen sei="compbio.ws.server.MuscleWS" \r
78                                                 sourcedestdir="${basedir}/webservices" \r
79                                                 destdir="${classes}" \r
80                                                 resourcedestdir="${wsdl.dir}" \r
81                                                 keep="true" genwsdl="true" \r
82                                                 extension="false"\r
83                                                 xendorsed="true"\r
84                                                 verbose="true">\r
85                                                 <classpath refid="classes.path" />\r
86                                                 <classpath refid="project.classpath" />\r
87                         </wsgen>\r
88                 <wsgen sei="compbio.ws.server.MafftWS" \r
89                                                 sourcedestdir="${basedir}/webservices" \r
90                                                 destdir="${classes}" \r
91                                                 resourcedestdir="${wsdl.dir}" \r
92                                                 keep="true" genwsdl="true" \r
93                                                 extension="false"\r
94                                                 xendorsed="true"\r
95                                                 verbose="true">\r
96                                                 <classpath refid="classes.path" />\r
97                                                 <classpath refid="project.classpath" />\r
98                         </wsgen>\r
99                 <wsgen sei="compbio.ws.server.TcoffeeWS" \r
100                                                 sourcedestdir="${basedir}/webservices" \r
101                                                 destdir="${classes}" \r
102                                                 resourcedestdir="${wsdl.dir}" \r
103                                                 keep="true" genwsdl="true" \r
104                                                 extension="false" \r
105                                                 xendorsed="true"                        \r
106                                                 verbose="true">\r
107                                                 <classpath refid="classes.path" />\r
108                                                 <classpath refid="project.classpath" />\r
109                 </wsgen>\r
110                 \r
111                 <wsgen sei="compbio.ws.server.DisemblWS" \r
112                                                 sourcedestdir="${basedir}/webservices" \r
113                                                 destdir="${classes}" \r
114                                                 resourcedestdir="${wsdl.dir}" \r
115                                                 keep="true" genwsdl="true" \r
116                                                 extension="false" \r
117                                                 xendorsed="true"                        \r
118                                                 verbose="true">\r
119                                                 <classpath refid="classes.path" />\r
120                                                 <classpath refid="project.classpath" />\r
121                 </wsgen>\r
122                 <wsgen sei="compbio.ws.server.GlobPlotWS" \r
123                                                 sourcedestdir="${basedir}/webservices" \r
124                                                 destdir="${classes}" \r
125                                                 resourcedestdir="${wsdl.dir}" \r
126                                                 keep="true" genwsdl="true" \r
127                                                 extension="false" \r
128                                                 xendorsed="true"                        \r
129                                                 verbose="true">\r
130                                                 <classpath refid="classes.path" />\r
131                                                 <classpath refid="project.classpath" />\r
132                 </wsgen>\r
133                 <wsgen sei="compbio.ws.server.JronnWS" \r
134                                                 sourcedestdir="${basedir}/webservices" \r
135                                                 destdir="${classes}" \r
136                                                 resourcedestdir="${wsdl.dir}" \r
137                                                 keep="true" genwsdl="true" \r
138                                                 extension="false" \r
139                                                 xendorsed="true"                        \r
140                                                 verbose="true">\r
141                                                 <classpath refid="classes.path" />\r
142                                                 <classpath refid="project.classpath" />\r
143                 </wsgen>\r
144                 <wsgen sei="compbio.ws.server.IUPredWS" \r
145                                                                 sourcedestdir="${basedir}/webservices" \r
146                                                                 destdir="${classes}" \r
147                                                                 resourcedestdir="${wsdl.dir}" \r
148                                                                 keep="true" genwsdl="true" \r
149                                                                 extension="false" \r
150                                                                 xendorsed="true"                        \r
151                                                                 verbose="true">\r
152                                                                 <classpath refid="classes.path" />\r
153                                                                 <classpath refid="project.classpath" />\r
154                 </wsgen>\r
155                 <wsgen sei="compbio.ws.server.RegistryWS" \r
156                                                 sourcedestdir="${basedir}/webservices" \r
157                                                 destdir="${classes}" \r
158                                                 resourcedestdir="${wsdl.dir}" \r
159                                                 keep="true" genwsdl="true" \r
160                                                 extension="false" \r
161                                                 xendorsed="true"                        \r
162                                                 verbose="true">\r
163                                                 <classpath refid="classes.path" />\r
164                                                 <classpath refid="project.classpath" />\r
165                 </wsgen>\r
166         </target>\r
167 \r
168 \r
169         <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">\r
170                 <classpath refid="project.classpath" />\r
171         </taskdef>\r
172 \r
173         <target name="build-clients">\r
174                         <property name="client.artifacts.dir" location="${basedir}/webservices/compbio/ws/client/stub" />\r
175 \r
176                         <mkdir dir="${client.artifacts.dir}" />\r
177                         <delete quiet="false" verbose="true" failonerror="true">\r
178                                 <fileset dir="${client.artifacts.dir}">\r
179                                         <include name="*.java" />\r
180                                 </fileset>\r
181                         </delete>\r
182                         <wsimport wsdl="${clustal.wsdl}" \r
183                                 sourcedestdir="${basedir}/webservices/" \r
184                                 keep="true" extension="false" \r
185                                 verbose="true" xnocompile="true" \r
186                                 package="compbio.ws.client.stub" \r
187                                 quiet="false">\r
188                         </wsimport>\r
189                         <wsimport wsdl="${muscle.wsdl}" \r
190                                 sourcedestdir="${basedir}/webservices/" \r
191                                 keep="true" extension="false" \r
192                                 verbose="true" xnocompile="true" \r
193                                 package="compbio.ws.client.stub" \r
194                                 quiet="false">\r
195                         </wsimport>\r
196                         <wsimport wsdl="${mafft.wsdl}" \r
197                                 sourcedestdir="${basedir}/webservices/" \r
198                                 keep="true" extension="false" \r
199                                 verbose="true" xnocompile="true" \r
200                                 package="compbio.ws.client.stub" \r
201                                 quiet="false">\r
202                         </wsimport>\r
203                         <wsimport wsdl="${tcoffee.wsdl}" \r
204                                 sourcedestdir="${basedir}/webservices/" \r
205                                 keep="true" extension="false" \r
206                                 verbose="true" xnocompile="true" \r
207                                 package="compbio.ws.client.stub" \r
208                                 quiet="false">\r
209                         </wsimport>\r
210                         <wsimport wsdl="${iupred.wsdl}" \r
211                                                 sourcedestdir="${basedir}/webservices/" \r
212                                                 keep="true" extension="false" \r
213                                                 verbose="true" xnocompile="true" \r
214                                                 package="compbio.ws.client.stub" \r
215                                                 quiet="false">\r
216                         </wsimport>\r
217                     <wsimport wsdl="${registry.wsdl}" \r
218                                                 sourcedestdir="${basedir}/webservices/" \r
219                                                 keep="true" extension="false" \r
220                                                 verbose="true" xnocompile="true" \r
221                                                 package="compbio.ws.client.stub" \r
222                                                 quiet="false">\r
223                         </wsimport>\r
224                         <!--            <xjcarg value="-cp" />\r
225                                                 <xjcarg pathref="project.classpath" />\r
226                                                 <xjcarg value="-Xcommons-lang" /> -->\r
227                                 \r
228                 </target>\r
229 \r
230         \r
231         <!-- \r
232         \r
233         <target name="Build artifacts from schema" description="Test task to generate JaxB commons annotated data classes DOES NOT REALLY WORK">\r
234                 <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">\r
235                         <classpath refid="project.classpath" />\r
236                 </taskdef>\r
237                 <mkdir dir="${basedir}/src/test" />\r
238                 <xjc schema="${wsdl.dir}/SyncMsaWS_schema1.xsd" destdir="${basedir}/src/test">\r
239                         <arg value="-Xcommons-lang" />\r
240                 \r
241                         <produces dir="${basedir}/src/test" />\r
242                         <classpath refid="classes.path" />\r
243                         <classpath>\r
244                                         <fileset dir="${basedir}/lib">\r
245                                                  //JAXB2 Basics library \r
246                                                 <include name="jaxb2-basics-*.jar"/>\r
247                                                  // JAXB2 Basics library dependencies \r
248                                                 <include name="jaxb2-basics-runtime-*.jar"/>\r
249                                                 <include name="jaxb2-basics-tools-*.jar"/>\r
250                                                 <include name="commons-beanutils-*.jar"/>\r
251                                                 <include name="commons-lang-*.jar"/>\r
252                                                 <include name="commons-logging-*.jar"/>\r
253                                         </fileset>\r
254                                 </classpath>\r
255                 </xjc>\r
256         </target>\r
257 \r
258                                         -Xequals\r
259                                         -XhashCode\r
260                                         -Xcopyable\r
261                                         -Xmergeable\r
262         \r
263         \r
264         \r
265         \r
266         <target name="build-Clustal-client-from-live-server">\r
267 \r
268                 <wsimport wsdl="http://localhost:7979/ClustalWS?wsdl" \r
269                         sourcedestdir="${basedir}/webservices/" \r
270                         keep="true" \r
271                         extension="false" \r
272                         verbose="true" \r
273                         xnocompile="true" \r
274                         package="compbio.ws.client.stub" \r
275                         quiet="false">\r
276                 </wsimport>\r
277         </target>\r
278 \r
279         <target name="build-Muscle-client-from-live-server">\r
280                 <wsimport wsdl="http://localhost:7979/MuscleWS?wsdl" \r
281                                         sourcedestdir="${basedir}/webservices/" \r
282                                         keep="true" \r
283                                         extension="false" \r
284                                         verbose="true" \r
285                                         xnocompile="true" \r
286                                         package="compbio.ws.client.stub" \r
287                                         quiet="false">\r
288                 </wsimport>\r
289         </target>\r
290 \r
291 \r
292         <target name="build-client-jar" description="Pack WS client into a single jar THIS IS EXAMPLE ONLY!">\r
293                 <echo>Jar file: wsclient</echo>\r
294                 <delete file="${basedir}/resources/wsclient.jar">\r
295                 </delete>\r
296                 <jar jarfile="${basedir}/resources/wsclient.jar">\r
297                         <fileset dir="${basedir}/WebContent/WEB-INF/classes/" includes="org/pimslims/ws/client/**/*.class" />\r
298                         <fileset dir="${classes}" includes="org/pimslims/sec/*,org/pimslims/lab/Util.class" />\r
299                         <zipfileset excludes="META-INF/*.SF" src="D:/workspace/current-pims-web/WebContent/WEB-INF/lib/webservices-rt.jar" />\r
300                         <manifest>\r
301                                 <attribute name="Built-By" value="${user.name}" />\r
302                                 <attribute name="Main-Class" value="org.pimslims.ws.client.FileUploadClient" />\r
303                                 <attribute name="Class-Path" value="." />\r
304                                 <attribute name="Implementation-Title" value="PIMS File Upload Web Service Client" />\r
305                                 <attribute name="Implementation-Vendor" value="The PIMS team" />\r
306                                 <attribute name="Implementation-URL" value="http://www.pims-lims.org" />\r
307                         </manifest>\r
308                 </jar>\r
309         </target>\r
310 \r
311 \r
312         <target name="run-client-jar" description="THIS IS EXAMPLE ONLY">\r
313                 <java jar="${basedir}/resources/wsclient.jar" fork="true" failonerror="true" maxmemory="256m">\r
314                         <arg value="C:/Documents and Settings/pvt43/Desktop/Leeds Sequencing/Copy of Files to up load" />\r
315                 </java>\r
316         </target>\r
317 \r
318         <target name="run-client-class" description="THIS IS EXAMPLE ONLY">\r
319                 <java classname="org.pimslims.ws.client.FileUploadClient" fork="true" failonerror="true" maxmemory="256m">\r
320                         <classpath refid="project.classpath" />\r
321                         <classpath refid="instrument.classpath" />\r
322                 </java>\r
323         </target>\r
324 -->\r
325 </project>\r
326 \r