Debian Codegraph @

xmls/targets.xml

raw
1 <!-- ===================================================================
2 This is basically the <ant /> task, except that it forks
3 and the verbosity setting is not propagated down
4 =================================================================== -->
5 <target name="my-forking-ant">
6 <echo message="Forking a JVM for target ${target} in file ${file}"/>
7 <java classname="org.apache.tools.ant.Main" fork="yes" failonerror="true" dir="${dir}">
8 <!-- See if this helps with Gump test failures -->
9 <sysproperty key="build.clonevm" value="true"/>
10
11 <!-- Pass the parser settings -->
12 <jvmarg value="-Djavax.xml.parsers.DocumentBuilderFactory=${javax.xml.parsers.DocumentBuilderFactory}"/>
13 <jvmarg value="-Djavax.xml.parsers.SAXParserFactory=${javax.xml.parsers.SAXParserFactory}"/>
14 <jvmarg value="-Xbootclasspath:${sun.boot.class.path}"/>
15 <jvmarg value="-Djikes.class.path=${jikes.class.path}"/>
16
17 <!-- Pass through the proxy parameters -->
18 <jvmarg value="-Dhttp.proxyHost=${http.proxyHost}"/>
19 <jvmarg value="-Dhttp.proxyPort=${http.proxyPort}"/>
20 <jvmarg value="-Dhttp.nonProxyHosts=${http.nonProxyHosts}"/>
21 <jvmarg value="-Dhttp.proxyUser=${http.proxyUser}"/>
22 <jvmarg value="-Dhttp.proxyPassword=${http.proxyPassword}"/>
23 <classpath refid="classpath"/>
24 <arg line="-buildfile ${file} ${target}"/>
25 </java>
26 </target>
27
28
29 <!-- ===================================================================
30 This is an accessory function to echo out fileNames
31 =================================================================== -->
32 <target name="echo-file">
33 <basename property="fileName" file="${file}"/>
34 <dirname property="dirName" file="${file}"/>
35 <echo message="Dir: ${dirName} File: ${fileName}"/>
36 </target>
37
38 <!-- ===================================================================
39 This is an accessory function to compile some given component
40 =================================================================== -->
41 <target name="component-compile">
42 <echo message="${file}"/>
43 <basename property="fileName" file="${file}"/>
44 <dirname property="dirName" file="${file}"/>
45 <ant inheritAll="false" dir="${dirName}" antfile="${fileName}" target="compile"/>
46 </target>
47
48 <!-- ===================================================================
49 This is an accessory function to exec JUST the testcase of a
50 component.
51 =================================================================== -->
52 <target name="batch-component-test">
53 <antcall target="echo-file"/>
54 <basename property="fileName" file="${file}"/>
55 <dirname property="dirName" file="${file}"/>
56 <ant inheritAll="false" dir="${dirName}" antfile="${fileName}" target="component-junit-functional"/>
57 </target>
58
59 <!-- ===================================================================
60 This is an accessory function to execs the full component test
61 =================================================================== -->
62 <target name="batch-component-run">
63 <antcall target="echo-file"/>
64 <basename property="fileName" file="${file}"/>
65 <dirname property="dirName" file="${file}"/>
66 <ant inheritAll="false" dir="${dirName}" antfile="${fileName}" target="run"/>
67 </target>
68
69 <!-- =================================================================== -->
70 <!-- Determine what dependencies are present -->
71 <!-- =================================================================== -->
72
73 <target name="setenv" unless="setenv.already.executed" depends="axis-clover-setup, axis-xmlbeans-setup">
74 <property name="setenv.already.executed" value="true"/>
75
76 <condition property="ant.good">
77 <and>
78 <contains string="${ant.version}" substring="Apache Ant version"/>
79 </and>
80 </condition>
81
82 <mkdir dir="${build.dir}"/>
83 <mkdir dir="${build.dest}"/>
84 <mkdir dir="${build.lib}"/>
85 <mkdir dir="${build.dir}/work"/>
86
87 <available property="servlet.present"
88 classname="javax.servlet.Servlet"
89 classpathref="classpath"/>
90
91 <available property="regexp.present"
92 classname="org.apache.oro.text.regex.Pattern"
93 classpathref="classpath"/>
94
95 <available property="junit.present"
96 classname="junit.framework.TestCase"
97 classpathref="classpath"/>
98
99 <available property="wsdl4j.present"
100 classname="javax.wsdl.Definition"
101 classpathref="classpath"/>
102
103 <available property="commons-logging.present"
104 classname="org.apache.commons.logging.Log"
105 classpathref="classpath"/>
106
107 <available property="commons-discovery.present"
108 classname="org.apache.commons.discovery.tools.DiscoverSingleton"
109 classpathref="classpath"/>
110
111 <available property="commons-httpclient.present"
112 classname="org.apache.commons.httpclient.HttpConnection"
113 classpathref="classpath"/>
114
115 <available property="commons-net.present"
116 classname="org.apache.commons.net.smtp.SMTPClient"
117 classpathref="classpath"/>
118
119 <available property="log4j.present"
120 classname="org.apache.log4j.Category"
121 classpathref="classpath"/>
122
123 <available property="activation.present"
124 classname="javax.activation.DataHandler"
125 classpathref="classpath"/>
126
127 <available property="security.present"
128 classname="org.apache.xml.security.Init"
129 classpathref="classpath"/>
130
131 <available property="mailapi.present"
132 classname="javax.mail.internet.MimeMessage"
133 classpathref="classpath"/>
134
135 <available property="httpunit.present"
136 classname="com.meterware.httpunit.GetMethodWebRequest"
137 classpathref="classpath"/>
138
139 <available property="jsse.present"
140 classname="javax.net.ssl.SSLSocketFactory"
141 classpathref="classpath"/>
142
143 <condition property="jetty.present" >
144 <and>
145 <available classname="javax.servlet.Servlet" classpathref="classpath" />
146 <available classname="org.mortbay.http.HttpServer" classpathref="classpath" />
147 </and>
148 </condition>
149
150 <condition property="jdk14.jsse.present" >
151 <and>
152 <available classname="javax.net.ssl.X509TrustManager" classpathref="classpath" />
153 <available classname="javax.net.SocketFactory" classpathref="classpath" />
154 <available classname="javax.net.ssl.SSLContext" classpathref="classpath" />
155 <available classname="javax.net.ssl.SSLSocketFactory" classpathref="classpath" />
156 </and>
157 </condition>
158
159 <condition property="sun.jsse.present" >
160 <and>
161 <available classname="com.sun.net.ssl.X509TrustManager" classpathref="classpath" />
162 <available classname="javax.net.SocketFactory" classpathref="classpath" />
163 <available classname="com.sun.net.ssl.SSLContext" classpathref="classpath" />
164 <available classname="javax.net.ssl.SSLSocketFactory" classpathref="classpath" />
165 </and>
166 </condition>
167
168 <condition property="ibm.jsse.present" >
169 <and>
170 <available classname="com.ibm.net.ssl.X509TrustManager" classpathref="classpath" />
171 <available classname="javax.net.SocketFactory" classpathref="classpath" />
172 <available classname="com.ibm.net.ssl.SSLContext" classpathref="classpath" />
173 <available classname="javax.net.ssl.SSLSocketFactory" classpathref="classpath" />
174 <available classname="com.ibm.crypto.provider.IBMJCE" classpathref="classpath" />
175 </and>
176 </condition>
177
178 <condition property="attachments.present" >
179 <and>
180 <available classname="javax.activation.DataHandler" classpathref="classpath" />
181 <available classname="javax.mail.internet.MimeMessage" classpathref="classpath" />
182 </and>
183 </condition>
184
185 <condition property="sun.codec.present" >
186 <available classname="sun.awt.image.codec.JPEGImageEncoderImpl" classpathref="classpath" />
187 </condition>
188
189 <condition property="jimi.present" >
190 <available classname="com.sun.jimi.core.Jimi" classpathref="classpath" />
191 </condition>
192
193 <condition property="merlinio.present" >
194 <available classname="javax.imageio.ImageIO" classpathref="classpath" />
195 </condition>
196
197 <condition property="axis-ant.present" >
198 <available classname="org.apache.axis.tools.ant.foreach.ForeachTask">
199 <classpath>
200 <pathelement location="${build.lib}/axis-ant.jar"/>
201 </classpath>
202 </available>
203 </condition>
204
205 <condition property="jimiAndAttachments.present">
206 <and>
207 <available classname="javax.activation.DataHandler" classpathref="classpath" />
208 <available classname="javax.mail.internet.MimeMessage" classpathref="classpath" />
209 <available classname="com.sun.jimi.core.Jimi" classpathref="classpath" />
210 </and>
211 </condition>
212
213 <condition property="jms.present" >
214 <available classname="javax.jms.Message" classpathref="classpath" />
215 </condition>
216
217 <condition property="jmsAndSonicMQ.present" >
218 <and>
219 <available classname="javax.jms.Message" classpathref="classpath" />
220 <available classname="progress.message.jclient.Message" classpathref="classpath" />
221 </and>
222 </condition>
223
224 <available property="post-compile.present" file="post-compile.xml" />
225
226 <property environment="env"/>
227 <condition property="debug" value="on">
228 <and>
229 <equals arg1="on" arg2="${env.debug}"/>
230 </and>
231 </condition>
232
233 <condition property="castor.present" >
234 <available classname="org.exolab.castor.xml.MarshalException" classpathref="classpath" />
235 </condition>
236
237 <condition property="xmlbeans.present" >
238 <and>
239 <available classname="org.apache.xmlbeans.XmlObject" classpathref="classpath" />
240 <available classname="javax.xml.stream.XMLStreamReader" classpathref="classpath" />
241 </and>
242 </condition>
243
244 <condition property="bsf.present" >
245 <available classname="org.apache.bsf.BSFManager" classpathref="classpath" />
246 </condition>
247
248 <condition property="combridge.present" >
249 <available classname="org.apache.axis.components.bridge.COMBridge" classpathref="classpath" />
250 </condition>
251
252 <!-- look for WSDL support on the platform -->
253 <condition property="wsdl.found">
254 <or>
255 <available file="wsdl" filepath="${env.PATH}"/>
256 <available file="wsdl.exe" filepath="${env.PATH}"/>
257 <available file="wsdl.exe" filepath="${env.Path}"/>
258 </or>
259 </condition>
260 <echo level="verbose">wsdl.found=${wsdl.found}</echo>
261 <condition property="csc.found">
262 <or>
263 <available file="csc" filepath="${env.PATH}"/>
264 <available file="csc.exe" filepath="${env.PATH}"/>
265 <available file="csc.exe" filepath="${env.Path}"/>
266 </or>
267 </condition>
268 <echo level="verbose">csc.found=${csc.found}</echo>
269 <condition property="dotnetapps.found">
270 <and>
271 <isset property="csc.found"/>
272 <isset property="wsdl.found"/>
273 </and>
274 </condition>
275 <echo level="verbose">dotnetapps.found=${dotnetapps.found}</echo>
276 <!-- look for IIS -->
277 <condition property="iis.found">
278 <and>
279 <os family="windows" />
280 <available file="${iis.base}" type="dir" />
281 </and>
282 </condition>
283 <echo level="verbose">iis.found=${iis.found}</echo>
284 <echo level="verbose">iis.base=${iis.base}</echo>
285
286 <!-- look for xalan -->
287 <available property="xalan2.present"
288 classname="org.apache.xalan.transformer.TransformerImpl" />
289 <!-- apply the current proxy settings to the current JVM.
290 This gives in-VM code network access through any firewall
291 -->
292 <echo level="verbose" message="-- Applying Network Settings ---"/>
293 <!-- we cannot set proxyuser and proxypassword as these are only ant1.6 -->
294 <!-- <setproxy
295 proxyhost="${http.proxyHost}"
296 proxyport="${http.proxyPort}"
297 socksProxyHost="${socks.proxyHost}"
298 socksProxyPort="${socks.proxyPort}"
299 />
300 -->
301 <!-- these are conditions used for patternset
302 configuration of which sets of tests to run.
303 Ignore them until the functional tests use patternsets -->
304 <!-- set the flag for testing jsp pages -->
305 <condition property="test.functional.httpunit.jsp">
306 <isset property="testserver.is.appserver"/>
307 </condition>
308 <!-- set the flag for testing the admin servlet -->
309 <condition property="test.functional.httpunit.adminservlet">
310 <isset property="testserver.is.appserver"/>
311 </condition>
312 <!-- set the online flag to true if offline is not set -->
313 <condition property="test.functional.online">
314 <not><isset property="offline"/></not>
315 </condition>
316
317 </target>
318
319 <!-- print out the current enviroment.
320 Also, probe for javadocs being out of date and set javadoc.notrequired
321 to true if they are not needed -->
322 <target name="printEnv" depends="setenv,check-javadoc-needed" >
323
324 <echo message="-----------------------------------------------------------------"/>
325 <echo message=" Build environment for ${Name} ${axis.version} [${year}] "/>
326 <echo message="-----------------------------------------------------------------"/>
327 <echo message="Building with ${ant.version}"/>
328 <echo message="using build file ${ant.file}"/>
329 <echo message="Java ${java.version} located at ${java.home} "/>
330 <echo message="-----------------------------------------------------------------"/>
331
332 <echo message="--- Flags (Note: If the {property name} is displayed, "/>
333 <echo message=" then the component is not present)" />
334 <echo message=""/>
335
336 <echo message="basedir = ${basedir}"/>
337 <echo message="axis.home = ${axis.home}"/>
338 <echo message="build.dir = ${build.dir}"/>
339 <echo message="build.dest = ${build.dest}"/>
340 <echo message="lib.dir = ${lib.dir}"/>
341 <echo message=""/>
342 <echo message="=== Required Libraries (for building code) ===" />
343 <echo message="activation.present=${activation.present}" />
344 <echo message="commons-discovery.present=${commons-discovery.present}" />
345 <echo message="commons-logging.present=${commons-logging.present}" />
346 <echo message="wsdl4j.present=${wsdl4j.present}" />
347 <echo message=""/>
348 <echo message="--- Optional Libraries (for building code) ---" />
349 <echo message="attachments.present=${attachments.present}" />
350 <echo message="bsf.present=${bsf.present}" />
351 <echo message="castor.present=${castor.present}" />
352 <echo message="commons-httpclient.present=${commons-httpclient.present}" />
353 <echo message="commons-net.present=${commons-net.present}" />
354 <echo message="ibm.jsse.present=${ibm.jsse.present}" />
355 <echo message="jimi.present=${jimi.present}" />
356 <echo message="jms.present=${jms.present}" />
357 <echo message="jetty.present=${jetty.present}" />
358 <echo message="jdk14.jsse.present=${jdk14.jsse.present}" />
359 <echo message="mailapi.present=${mailapi.present}" />
360 <echo message="regexp.present=${regexp.present}" />
361 <echo message="security.present=${security.present}" />
362 <echo message="servlet.present=${servlet.present}" />
363 <echo message="sun.jsse.present=${sun.jsse.present}" />
364 <echo message="xmlbeans.present=${xmlbeans.present}" />
365 <echo message=""/>
366 <echo message="--- Miscellaneous (for running tests) ---" />
367 <echo message="axis-ant.present=${axis-ant.present}" />
368 <echo message="clover.present=${clover.present}" />
369 <echo message="httpunit.present=${httpunit.present}" />
370 <echo message="junit.present=${junit.present}" />
371 <echo message="log4j.present=${log4j.present}" />
372 <echo message=""/>
373 <echo message="--- Property values ---" />
374 <echo message="debug=${debug}" />
375 <echo message="nowarn=${nowarn}" />
376 <echo message="source=${source}" />
377 <echo message="target=${target}" />
378 <echo message="deprecation=${deprecation}" />
379 <echo message="build.compiler=${build.compiler}" />
380 <echo message="javac.fork=${javac.fork}" />
381 <!-- Set environment variable axis_nojavadocs=true to never generate javadocs. Case sensative! -->
382 <echo message="axis_nojavadocs=${env.axis_nojavadocs}"/>
383 <echo message="javax.xml.parsers.DocumentBuilderFactory=${javax.xml.parsers.DocumentBuilderFactory}"/>
384 <echo message="javax.xml.parsers.SAXParserFactory=${javax.xml.parsers.SAXParserFactory}"/>
385 <echo message="sun.boot.class.path=${sun.boot.class.path}"/>
386 <echo message="jikes.class.path=${jikes.class.path}"/>
387
388 <echo message="" />
389 <echo message="-- Network Settings ---"/>
390 <echo message="" />
391 <echo message="http.proxyHost = ${http.proxyHost}" />
392 <echo message="http.proxyPort = ${http.proxyPort}" />
393 <echo message="http.nonProxyHosts = ${http.nonProxyHosts}" />
394 <echo message="http.proxyUser = ${http.proxyUser}" />
395 <echo message="http.proxyPassword = ${http.proxyPassword}" />
396 <echo message="" />
397
398 <echo message="-- Test Environment for AXIS ---"/>
399 <echo message="" />
400 <echo message="test.functional.remote = ${test.functional.remote}" />
401 <echo message="test.functional.local = ${test.functional.local}" />
402 <echo message="test.functional.both = ${test.functional.both}" />
403 <echo message="test.functional.reportdir = ${test.functional.reportdir}" />
404 <echo message="test.functional.SimpleAxisPort = ${test.functional.SimpleAxisPort}" />
405 <echo message="test.functional.TCPListenerPort = ${test.functional.TCPListenerPort}" />
406 <echo message="test.functional.fail = ${test.functional.fail}" />
407 <echo message="" />
408
409 <pathconvert targetos="windows" property="classpath.as.string" refid="classpath"/>
410 <echo message="classpath: ${classpath.as.string}"/>
411 <echo message="" />
412
413 </target>
414
415
416 <!-- see if javadocs are needed by looking for the env.axis_nojavadocs flag -->
417
418 <target name="check-javadoc-needed" depends="setenv" >
419
420 <uptodate property="javadoc.notoutofdate"
421 targetfile="${build.javadocs}/index.html">
422 <srcfiles dir="${src.dir}" includes="**/*.java" />
423 </uptodate>
424
425 <!-- for ant1.5+, we can use <isset> here -->
426 <condition property="axis_nojavadocs" value="true">
427 <equals arg1="true" arg2="${env.axis_nojavadocs}"/>
428 </condition>
429 <condition property="axis_nojavadocs" value="false">
430 <equals arg1="${axis_nojavadocs}" arg2="$${axis_nojavadocs}"/>
431 </condition>
432
433 <condition property="javadoc.notrequired" value="true">
434 <or>
435 <equals arg1="${javadoc.notoutofdate}" arg2="true"/>
436 <equals arg1="true" arg2="${axis_nojavadocs}"/>
437 </or>
438 </condition>
439
440
441 </target>
442
443
444 <!-- =================================================================== -->
445 <!-- Launches the functional test TCP server -->
446 <!-- =================================================================== -->
447 <target name="start-functional-test-tcp-server" if="junit.present">
448 <echo message="Starting test tcp server."/>
449 <java classname="samples.transport.tcp.TCPListener" fork="yes" dir="${axis.home}/build">
450 <arg line="-p ${test.functional.TCPListenerPort}" /> <!-- arbitrary port -->
451 <classpath refid="classpath" />
452 </java>
453 </target>
454
455 <!-- =================================================================== -->
456 <!-- Launches the functional test HTTP server -->
457 <!-- =================================================================== -->
458 <target name="start-functional-test-http-server" if="junit.present">
459 <echo message="Starting test http server."/>
460 <java classname="org.apache.axis.transport.http.SimpleAxisServer" fork="yes" dir="${axis.home}/build">
461 <!-- Uncomment this to use Jikes instead of Javac for compiling JWS Files
462 <jvmarg value="-Daxis.Compiler=org.apache.axis.components.compiler.Jikes"/>
463 -->
464 <jvmarg value="-Daxis.wsdlgen.intfnamespace=http://localhost:${test.functional.ServicePort}"/>
465 <jvmarg value="-Daxis.wsdlgen.serv.loc.url=http://localhost:${test.functional.ServicePort}"/>
466 <arg line="-p ${test.functional.SimpleAxisPort}" /> <!-- arbitrary port -->
467 <classpath refid="classpath" />
468 </java>
469
470 </target>
471
472 <!-- =================================================================== -->
473 <!-- Launches the functional test HTTP server when testing digital signature -->
474 <!-- =================================================================== -->
475 <target name="start-functional-test-http-server-secure" if="junit.present" depends="start-signature-signing-and-verification">
476 <echo message="Starting test http server."/>
477 <java classname="org.apache.axis.transport.http.SimpleAxisServer" fork="yes" dir="${axis.home}/build">
478 <!-- Uncomment this to use Jikes instead of Javac for compiling JWS Files
479 <jvmarg value="-Daxis.Compiler=org.apache.axis.components.compiler.Jikes"/>
480 -->
481 <jvmarg value="-Daxis.wsdlgen.intfnamespace=http://localhost:${test.functional.ServicePort}"/>
482 <jvmarg value="-Daxis.wsdlgen.serv.loc.url=http://localhost:${test.functional.ServicePort}"/>
483 <arg line="-p ${test.functional.SimpleAxisPort}" /> <!-- arbitrary port -->
484 <classpath refid="classpath" />
485 </java>
486
487 </target>
488
489 <!-- =================================================================== -->
490 <!-- Stops the functional test HTTP server -->
491 <!-- =================================================================== -->
492 <target name="stop-functional-test-http-server" if="junit.present">
493 <echo message="Stopping test http server."/>
494 <java classname="org.apache.axis.client.AdminClient" fork="yes">
495 <classpath refid="classpath" />
496 <arg line="quit"/>
497 </java>
498 </target>
499
500 <!-- =================================================================== -->
501 <!-- Stops the functional test HTTP server when testing digital signature -->
502 <!-- =================================================================== -->
503 <target name="stop-functional-test-http-server-secure" if="junit.present" depends="stop-signature-signing-and-verification">
504 <echo message="Stopping test http server."/>
505 <java classname="org.apache.axis.client.AdminClient" fork="yes">
506 <classpath refid="classpath" />
507 <arg line="quit"/>
508 </java>
509 </target>
510
511 <!-- =================================================================== -->
512 <!-- Start Signature Signing and Verification -->
513 <!-- =================================================================== -->
514 <target name="start-signature-signing-and-verification" if="security.present">
515 <!-- Enable transparent Signing of SOAP Messages sent
516 from the client and Server-side Signature Verification.
517 -->
518 <java classname="org.apache.axis.client.AdminClient" fork="yes">
519 <classpath refid="classpath" />
520 <arg line="${axis.home}/samples/security/serversecuritydeploy.wsdd"/>
521 </java>
522 <java classname="org.apache.axis.utils.Admin" fork="yes">
523 <classpath refid="classpath" />
524 <arg value="client"/>
525 <arg value="${axis.home}/samples/security/clientsecuritydeploy.wsdd"/>
526 </java>
527 </target>
528
529 <!-- =================================================================== -->
530 <!-- Stop Signature Signing and Verification -->
531 <!-- =================================================================== -->
532 <target name="stop-signature-signing-and-verification" if="security.present">
533 <!-- Disable transparent Signing of SOAP Messages sent
534 from the client and Server-side Signature Verification.
535 -->
536 <java classname="org.apache.axis.client.AdminClient" fork="yes">
537 <classpath refid="classpath" />
538 <arg line="samples/security/serversecurityundeploy.wsdd"/>
539 </java>
540 <java classname="org.apache.axis.utils.Admin" fork="yes">
541 <classpath refid="classpath" />
542 <arg value="client"/>
543 <arg value="samples/security/clientsecurityundeploy.wsdd"/>
544 </java>
545
546 </target>
547
548 <!-- =================================================================== -->
549 <!-- Prepares the JUnit functional test -->
550 <!-- =================================================================== -->
551 <target name="component-junit-functional-prepare" if="junit.present">
552
553 <!-- first, put the JWS where the functional test can see it -->
554 <mkdir dir="${axis.home}/build/jws" />
555 <copy file="${axis.home}/samples/stock/StockQuoteService.jws" todir="${axis.home}/build/jws" />
556 <copy file="${axis.home}/test/functional/AltStockQuoteService.jws" todir="${axis.home}/build/jws" />
557 <copy file="${axis.home}/test/functional/GlobalTypeTest.jws" todir="${axis.home}/build/jws"/>
558 <copy file="${axis.home}/webapps/axis/EchoHeaders.jws" todir="${axis.home}/build/jws" />
559
560 <path id="deploy.xml.files">
561 <fileset dir="${build.dir}">
562 <include name="work/${componentName}/**/deploy.wsdd"/>
563 <include name="${extraServices}/deploy.wsdd" />
564 </fileset>
565 </path>
566
567 <path id="undeploy.xml.files">
568 <fileset dir="${build.dir}">
569 <include name="work/${componentName}/**/undeploy.wsdd"/>
570 <include name="${extraServices}/undeploy.wsdd" />
571 </fileset>
572 </path>
573
574 <property name="deploy.xml.property" refid="deploy.xml.files"/>
575 <property name="undeploy.xml.property" refid="undeploy.xml.files"/>
576 </target>
577
578 <target name="component-test-run" if="junit.present" depends="start-signature-signing-and-verification">
579 <echo message="Execing ${componentName} Test"/>
580 <antcall target="component-junit-functional"/>
581 </target>
582
583 <!-- Runs the AdminClient to deploy/undeploy. Set up the admin.file.exists property such that it is set -->
584 <!-- if there is a deploy.xml file, and the admin.file property to contain the actual file reference. -->
585 <target name="adminClient" if="admin.file.exists">
586 <java classname="org.apache.axis.client.AdminClient" fork="yes">
587 <classpath refid="classpath" />
588 <arg line="${admin.file}"/>
589 </java>
590 </target>
591
592 <target name="component-junit-functional" if="junit.present" depends="component-junit-functional-prepare">
593 <!-- Don't bother running AdminClient unless there's something to do -->
594 <condition property="admin.file.exists">
595 <not><equals arg1="${deploy.xml.property}" arg2=""/></not>
596 </condition>
597 <antcall target="adminClient">
598 <param name="admin.file" value="${deploy.xml.property}"/>
599 </antcall>
600
601 <available file="${axis.home}/junit-exclude-tests.txt" property="junit-exclude-tests.present"/>
602 <junit dir="${axis.home}" printsummary="yes" haltonfailure="${test.functional.fail}" fork="yes">
603 <classpath refid="classpath" />
604 <formatter type="xml" usefile="${test.functional.usefile}"/>
605 <batchtest todir="${test.functional.reportdir}">
606 <fileset dir="${build.dest}">
607 <include name="${extraTestCases}/*TestCase.class" />
608 <include name="${extraTestCases}/**/*TestCase.class" />
609 <include name="${componentName}/*TestCase.class" />
610 <include name="${componentName}/**/*TestCase.class" />
611 <include name="${componentName}/**/PackageTests.class" />
612 <!-- <include name="${componentName}/**/test/*TestSuite.class"/> -->
613 <excludesfile name="${axis.home}/junit-exclude-tests.txt" if="junit-exclude-tests.present"/>
614 </fileset>
615 </batchtest>
616 </junit>
617
618 <!-- Don't bother running AdminClient unless there's something to do -->
619 <condition property="admin.file.exists">
620 <not><equals arg1="${undeploy.xml.property}" arg2=""/></not>
621 </condition>
622 <antcall target="adminClient">
623 <param name="admin.file" value="${undeploy.xml.property}"/>
624 </antcall>
625
626 </target>
627
628 <target name="execute-Component" depends="setenv" >
629 <mkdir dir="${test.functional.reportdir}" />
630 <runaxisfunctionaltests
631 url="http://localhost:${test.functional.TCPListenerPort}"
632 httpServerTarget="start-functional-test-http-server"
633 testTarget="component-test-run"
634 httpStopTarget="stop-functional-test-http-server" />
635 </target>
636
637 <target name="execute-Component-noServer" depends="setenv">
638 <mkdir dir="${test.functional.reportdir}" />
639 <runaxisfunctionaltests testTarget="component-test-run"/>
640 </target>
641
642 <target name="execute-Component-with-tcp" depends="transport-layer" >
643 <mkdir dir="${test.functional.reportdir}" />
644 <runaxisfunctionaltests
645 url="http://localhost:${test.functional.TCPListenerPort}"
646 tcpServerTarget="start-functional-test-tcp-server"
647 httpServerTarget="start-functional-test-http-server"
648 testTarget="component-test-run"
649 httpStopTarget="stop-functional-test-http-server" />
650 </target>
651
652 <target name="transport-layer" depends="setenv" >
653 <ant inheritAll="true" dir="${axis.home}/samples/transport"
654 antfile="build.xml" target="compile" />
655 </target>
656
657 <target name="clover-report" depends="setenv">
658 <clover-report>
659 <current outfile="${axis.home}/build/clover-report" title="Axis Clover Report" span="60m">
660 <format type="html"/>
661 </current>
662 </clover-report>
663 </target>
664
665 <target name="axis-clover-setup" depends="axis-clover-setenv" if="clover.present">
666 <echo message="Registering clover tasks" />
667 <taskdef resource="clovertasks"/>
668 <clover-setup initString="${axis.home}/build/clover/axis_coverage.db"
669 tmpdir="${axis.home}/build/clover"
670 flushpolicy="interval"
671 flushinterval="1000">
672 <files>
673 <include name="**/org/apache/axis/**/*.java"/>
674 </files>
675 </clover-setup>
676 </target>
677
678 <target name="axis-clover-setenv">
679 <condition property="clover.present" >
680 <available classname="com.cortexeb.tools.clover.tasks.CloverTask" classpathref="classpath" />
681 </condition>
682 </target>
683
684 <target name="axis-xmlbeans-setup" depends="axis-xmlbeans-setenv" if="generate.schema.jar">
685 <mkdir dir="${build.lib}"/>
686 <echo message="Registering xmlbeans tasks"/>
687 <taskdef name="xmlbeanbuild"
688 classname="org.apache.xmlbeans.impl.tool.XMLBean"
689 classpathref="classpath"/>
690 <xmlbeanbuild
691 schema="${axis.home}/xsd"
692 classgendir="${build.dir}/schema/"
693 failonerror="true"
694 classpathref="classpath"/>
695 <jar jarfile="${build.lib}/axis-schema.jar" basedir="${build.dir}/schema/"/>
696 </target>
697
698 <target name="axis-xmlbeans-setenv">
699 <condition property="generate.schema.jar">
700 <and>
701 <available classname="org.apache.xmlbeans.impl.tool.XMLBean" classpathref="classpath" />
702 <not>
703 <available file="${build.lib}/axis-schema.jar"/>
704 </not>
705 </and>
706 </condition>
707 </target>