]> git.pld-linux.org Git - packages/axis.git/blob - axis-build.xml
- now it builds with system libraries.
[packages/axis.git] / axis-build.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE project [
3         <!ENTITY paths  SYSTEM "file:./xmls/path_refs.xml">
4         <!ENTITY taskdefs SYSTEM "file:./xmls/taskdefs.xml">
5         <!ENTITY targets SYSTEM "file:./xmls/targets.xml">
6 ]>
7
8 <project name="axis" default="compile" basedir=".">
9 <!-- =================================================================== -->
10 <description>
11    Build file for Axis
12
13 Notes:
14    This is a build file for use with the Jakarta Ant build tool.
15    For more information on using the build refer to building-axis.html under docs
16    
17
18 Prerequisites:
19    jakarta-ant        from http://jakarta.apache.org/ant/
20    wsdl4j             from http://www-124.ibm.com/developerworks/projects/wsdl4j/
21    commons-logging    from http://jakarta.apache.org/commons/logging.html
22    commons-discovery  from http://jakarta.apache.org/commons/discovery.html
23    log4j              from http://jakarta.apache.org/log4j
24    activation         from http://java.sun.com/products/javabeans/glasgow/jaf.html
25    mailapi            from http://java.sun.com/products/javamail/
26
27
28 Optional components:
29    servlet            from http://jakarta.apache.org/tomcat/
30    regexp             from http://jakarta.apache.org/regexp/
31    junit              from http://www.junit.org/
32    jimi               from http://java.sun.com/products/jimi/
33    xml-security       from http://xml.apache.org/security/
34    jsse               from http://java.sun.com/products/jsse/
35    commons-httpclient from http://jakarta.apache.org/commons/httpclient/
36    httpunit           from http://sourceforge.net/projects/httpunit/
37    jms                from http://java.sun.com/products/jms/
38    castor             from http://castor.exolab.org/
39    xmlbeans           from http://xmlbeans.apache.org/
40    
41 j2ee.jar contains the mailapi, activation and servlet libraries   
42
43 Build Instructions:
44    To build, run
45
46      ant "target"
47
48    on the directory where this file is located with the target you want.
49
50 Most useful targets:
51
52  - compile  : creates the "axis.jar" package in "./build/lib"
53  - javadocs : creates the javadocs in "./build/javadocs"
54  - dist     : creates the complete binary distribution
55  - srcdist  : creates the complete src distribution
56  - functional-tests : attempts to build Ant task and then run
57               client-server functional test
58  - war      : create the web application as a WAR file
59  - clean    : clean up files and directories
60
61
62 Custom post-compilation work:
63
64    If you desire to do some extra work as a part of the build after the
65    axis.jar is assembled, simply create an ant buildfile called
66    "post-compile.xml" in this directory.  The build will automatically
67    notice this and run it at the appropriate time.  This is handy for
68    updating the jar file in a running server, for instance.
69
70 Authors:
71   Sam Ruby  rubys@us.ibm.com
72   Matthew J. Duftler duftler@us.ibm.com
73   Glen Daniels gdaniels@macromedia.com
74
75 Copyright:
76   Copyright (c) 2001-2002 Apache Software Foundation.
77 </description>
78 <!-- ==================================================================== -->
79
80 <!-- Include the Generic XML files -->
81
82 <!-- This is an xml entity included in Apache Axis build files-->
83
84 <property environment="env"/>
85 <!-- workaround for those IDEs that dont set ant.home as per the ant script -->
86 <property name="ant.home" value="env.ANT_HOME" />
87
88 <!-- set axis home up -->
89 <property name="axis.home" location="."/>
90
91 <!-- debug flag for ant javac, values are "on" and "off" -->
92 <property name="debug" value="on" />
93 <property name="nowarn" value="off" />
94
95 <property name="axis.version" value="1.4" />
96 <!-- This should be the version # above with dots replaced by underscores -->
97 <property name="axis.dirname" value="1_4" />
98
99 <property name="name" value="axis" />
100 <property name="Name" value="Axis" />
101 <property name="year" value="2005" />
102 <property name="jaxrpc" value="jaxrpc" />
103 <property name="saaj" value="saaj" />
104
105 <!-- what gets pulled in to the binaries: everything -->
106 <property name="debuglevel" value="lines,vars,source" />
107 <property name="deprecation" value="true" />
108 <property name="source" value="1.3" />
109 <property name="target" value="1.3" />
110
111 <!-- directories -->
112 <property name="src.dir" location="${axis.home}/src"/>
113 <property name="docs.dir" location="${axis.home}/docs"/>
114 <property name="samples.dir" location="${axis.home}/samples"/>
115 <property name="test.dir" location="${axis.home}/test"/>
116
117 <!-- we resolve the lib dir twice, to ensure that any
118   paths from Gump are absolute -->
119 <property name="axis.lib.dir" location="${axis.home}/lib"/>
120 <property name="lib.dir" location="${axis.lib.dir}"/>
121
122 <property name="packages" value="org.*,javax.*" />
123 <property name="jaxrpc" value="jaxrpc" />
124
125
126 <property name="build.file" value="build.xml" />
127 <!-- directories for output -->
128
129 <property name="build.dir" location="${axis.home}/build"/>
130 <property name="build.dest" location="${build.dir}/classes"/>
131 <property name="build.lib" location="${build.dir}/lib"/>
132 <property name="build.samples" location="${build.dir}/classes/samples"/>
133 <property name="build.javadocs" location="${build.dir}/javadocs"/>
134 <property name="build.webapp" location="${build.dir}/webapps/axis"/>
135 <property name="axis.war.filename" value="axis.war"/>
136 <property name="axis.war" location="${build.dir}/${axis.war.filename}"/>
137
138 <property name="webapp" location="${axis.home}/webapps/axis" />
139 <property name="dist.dir" location="${axis.home}/axis-${axis.dirname}" />
140
141 <property name="test.setup.dir" location="${test.dir}/setup" />
142 <property name="test.build.dir" location="${build.dir}/test/" />
143 <property name="test.reports.dir" location="${test.build.dir}/reports" />
144 <!-- axis convention is to build into the same hierarchy as the main source -->
145 <property name="test.classes.dir" location="${build.dest}"/>
146 <property name="test.data.dir" location="${test.build.dir}/data"/>
147 <property name="test.output.printsummary" value="withOutAndErr"/>
148
149 <property name="test.functional.remote" value="no" />
150 <property name="test.functional.local" value="yes" />
151 <property name="test.functional.both" value="no" />
152 <property name="test.functional.usefile" value="true" />
153 <property name="test.functional.reportdir" location="${axis.home}/test-reports" />
154 <property name="test.functional.SimpleAxisPort" value="8080" />
155 <property name="test.functional.ServicePort" value="8080"/>
156 <property name="test.functional.TCPListenerPort" value="8088" />
157 <property name="test.functional.serverurl"
158   value="http://localhost:${test.functional.TCPListenerPort}" />
159 <property name="test.functional.webapp.url"
160   value="http://localhost:${test.functional.TCPListenerPort}/axis" />
161 <property name="test.functional.TCPListener.url"
162   value="tcp://localhost:${test.functional.TCPListenerPort}" />
163
164 <property name="test.functional.fail" value="yes" />
165
166 <property name="javax.xml.parsers.DocumentBuilderFactory" value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
167 <property name="javax.xml.parsers.SAXParserFactory" value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
168
169 <!-- Place Holder for proxy settings -->
170 <property name="http.proxyHost" value=""/>
171 <property name="http.proxyPort" value=""/>
172 <property name="http.nonProxyHosts" value="localhost"/>
173 <property name="http.proxyUser" value=""/>
174 <property name="http.proxyPassword" value=""/>
175 <property name="socks.proxyHost" value=""/>
176 <property name="socks.proxyPort" value="1080"/>
177
178 <property name="javac.fork" value="no"/>
179 <property name="foreach.fork" value="no"/>
180 <property name="ant.inheritAll" value="false"/>
181 <property name="ant.inheritRefs" value="false"/>
182
183 <!-- to test against .NET, we need a local IIS instance-->
184 <property name="iis.base" location="c:\inetpub\wwwroot" />
185 <property name="iis.hostname" value="127.0.0.1"/>
186 <property name="iis.port" value="80"/>
187
188 <property name="exclude.log4j.configuration" value="true"/>
189
190
191   <path id="classpath">
192     <pathelement location="${activation.jar}"/>
193     <pathelement location="${commons-logging.jar}"/>
194     <pathelement location="${commons-discovery.jar}"/>
195     <pathelement location="${commons-httpclient.jar}"/>
196     <pathelement location="${commons-net.jar}"/>
197     <pathelement location="${log4j-core.jar}"/>
198     <pathelement location="${xercesImpl.jar}"/>
199     <pathelement location="${xmlParserAPIs.jar}"/>
200     <pathelement location="${xalan.jar}"/>
201     <pathelement location="${xml-apis.jar}"/>
202     <pathelement location="${xerces.jar}"/>
203     <pathelement location="${regexp.jar}"/>
204     <pathelement location="${xmlunit.jar}"/>
205     <pathelement location="${jsse.jar}"/>
206     <pathelement location="${jimi.jar}"/>
207     <pathelement location="${activation.jar}"/>
208     <pathelement location="${mailapi.jar}"/>
209     <pathelement location="${wsdl4j.jar}"/>
210     <pathelement location="${tools.jar}"/>
211     <pathelement location="${xmlbeans.jar}"/>
212     <pathelement location="${junit.jar}"/>
213     <pathelement location="${servlet.jar}"/>
214     <!--
215     <pathelement path="${java.class.path}"/>
216     -->
217     <pathelement location="${build.dest}" />
218     <pathelement location="${build.dir}/tools" />
219     <pathelement location="${build.lib}/axis-ant.jar" />
220     <pathelement location="${build.lib}/axis-schema.jar" />
221 <!--
222     <pathelement location="${build.dir}/work" />
223 -->
224   </path>
225
226   <path id="boot.classpath">
227     <pathelement location="${xml-apis.jar}"/>
228     <pathelement path="${sun.boot.class.path}"/>
229   </path>
230
231
232 <!-- taskdefs that are know PRIOR to compilation -->
233
234
235    <!-- ===================================================================
236          This is basically the <ant /> task, except that it forks
237          and the verbosity setting is not propagated down
238         =================================================================== -->
239    <target name="my-forking-ant">
240      <echo message="Forking a JVM for target ${target} in file ${file}"/>
241      <java classname="org.apache.tools.ant.Main" fork="yes" failonerror="true" dir="${dir}">
242        <!-- See if this helps with Gump test failures -->
243        <sysproperty key="build.clonevm" value="true"/>
244
245        <!-- Pass the parser settings -->
246        <jvmarg value="-Djavax.xml.parsers.DocumentBuilderFactory=${javax.xml.parsers.DocumentBuilderFactory}"/>
247        <jvmarg value="-Djavax.xml.parsers.SAXParserFactory=${javax.xml.parsers.SAXParserFactory}"/>
248        <jvmarg value="-Xbootclasspath:${sun.boot.class.path}"/>
249        <jvmarg value="-Djikes.class.path=${jikes.class.path}"/>
250
251        <!-- Pass through the proxy parameters -->
252        <jvmarg value="-Dhttp.proxyHost=${http.proxyHost}"/>
253        <jvmarg value="-Dhttp.proxyPort=${http.proxyPort}"/>
254        <jvmarg value="-Dhttp.nonProxyHosts=${http.nonProxyHosts}"/>
255        <jvmarg value="-Dhttp.proxyUser=${http.proxyUser}"/>
256        <jvmarg value="-Dhttp.proxyPassword=${http.proxyPassword}"/>
257        <classpath refid="classpath"/>
258        <arg line="-buildfile ${file} ${target}"/>
259      </java>
260    </target>
261
262
263   <!-- ===================================================================
264     This is an accessory function to echo out fileNames
265        =================================================================== -->
266   <target name="echo-file">
267     <basename property="fileName" file="${file}"/>
268     <dirname property="dirName" file="${file}"/>
269     <echo message="Dir: ${dirName} File: ${fileName}"/>
270   </target>
271
272   <!-- ===================================================================
273         This is an accessory function to compile some given component
274        =================================================================== -->
275   <target name="component-compile">
276     <echo message="${file}"/>
277     <basename property="fileName" file="${file}"/>
278     <dirname property="dirName" file="${file}"/>
279     <ant inheritAll="false" dir="${dirName}" antfile="${fileName}" target="compile"/>
280   </target>
281
282   <!-- ===================================================================
283         This is an accessory function to exec JUST the testcase of a
284     component.
285        =================================================================== -->
286   <target name="batch-component-test">
287     <antcall target="echo-file"/>
288     <basename property="fileName" file="${file}"/>
289     <dirname property="dirName" file="${file}"/>
290     <ant inheritAll="false" dir="${dirName}" antfile="${fileName}" target="component-junit-functional"/>
291   </target>
292
293   <!-- ===================================================================
294         This is an accessory function to execs the full component test
295        =================================================================== -->
296   <target name="batch-component-run">
297     <antcall target="echo-file"/>
298     <basename property="fileName" file="${file}"/>
299     <dirname property="dirName" file="${file}"/>
300     <ant inheritAll="false" dir="${dirName}" antfile="${fileName}" target="run"/>
301   </target>
302
303   <!-- =================================================================== -->
304   <!-- Determine what dependencies are present                             -->
305   <!-- =================================================================== -->
306
307   <target name="setenv" unless="setenv.already.executed" depends="axis-clover-setup, axis-xmlbeans-setup">
308     <property name="setenv.already.executed" value="true"/>
309
310     <condition property="ant.good">
311       <and>
312         <contains string="${ant.version}" substring="Apache Ant version"/>
313       </and>
314     </condition>
315
316     <mkdir dir="${build.dir}"/>
317     <mkdir dir="${build.dest}"/>
318     <mkdir dir="${build.lib}"/>
319     <mkdir dir="${build.dir}/work"/>
320
321     <available property="servlet.present"
322       classname="javax.servlet.Servlet"
323       classpathref="classpath"/>
324
325     <available property="regexp.present"
326       classname="org.apache.oro.text.regex.Pattern"
327       classpathref="classpath"/>
328
329     <available property="junit.present"
330       classname="junit.framework.TestCase"
331       classpathref="classpath"/>
332
333     <available property="wsdl4j.present"
334       classname="javax.wsdl.Definition"
335       classpathref="classpath"/>
336
337     <available property="commons-logging.present"
338       classname="org.apache.commons.logging.Log"
339       classpathref="classpath"/>
340
341     <available property="commons-discovery.present"
342       classname="org.apache.commons.discovery.tools.DiscoverSingleton"
343       classpathref="classpath"/>
344
345     <available property="commons-httpclient.present"
346       classname="org.apache.commons.httpclient.HttpConnection"
347       classpathref="classpath"/>
348
349     <available property="commons-net.present"
350       classname="org.apache.commons.net.smtp.SMTPClient"
351       classpathref="classpath"/>
352
353     <available property="log4j.present"
354       classname="org.apache.log4j.Category"
355       classpathref="classpath"/>
356
357     <available property="activation.present"
358       classname="javax.activation.DataHandler"
359       classpathref="classpath"/>
360
361     <available property="security.present"
362       classname="org.apache.xml.security.Init"
363       classpathref="classpath"/>
364
365     <available property="mailapi.present"
366       classname="javax.mail.internet.MimeMessage"
367       classpathref="classpath"/>
368
369     <available property="httpunit.present"
370       classname="com.meterware.httpunit.GetMethodWebRequest"
371       classpathref="classpath"/>
372
373     <available property="jsse.present"
374       classname="javax.net.ssl.SSLSocketFactory"
375       classpathref="classpath"/>
376
377     <condition property="jetty.present" >
378       <and>
379         <available classname="javax.servlet.Servlet" classpathref="classpath" />
380         <available classname="org.mortbay.http.HttpServer" classpathref="classpath" />
381       </and>
382     </condition>
383
384     <condition property="jdk14.jsse.present" >
385       <and>
386         <available classname="javax.net.ssl.X509TrustManager" classpathref="classpath" />
387         <available classname="javax.net.SocketFactory" classpathref="classpath" />
388         <available classname="javax.net.ssl.SSLContext" classpathref="classpath" />
389         <available classname="javax.net.ssl.SSLSocketFactory" classpathref="classpath" />
390       </and>
391     </condition>
392
393     <condition property="sun.jsse.present" >
394       <and>
395         <available classname="com.sun.net.ssl.X509TrustManager" classpathref="classpath" />
396         <available classname="javax.net.SocketFactory" classpathref="classpath" />
397         <available classname="com.sun.net.ssl.SSLContext" classpathref="classpath" />
398         <available classname="javax.net.ssl.SSLSocketFactory" classpathref="classpath" />
399       </and>
400     </condition>
401
402     <condition property="ibm.jsse.present" >
403       <and>
404         <available classname="com.ibm.net.ssl.X509TrustManager" classpathref="classpath" />
405         <available classname="javax.net.SocketFactory" classpathref="classpath" />
406         <available classname="com.ibm.net.ssl.SSLContext" classpathref="classpath" />
407         <available classname="javax.net.ssl.SSLSocketFactory" classpathref="classpath" />
408         <available classname="com.ibm.crypto.provider.IBMJCE" classpathref="classpath" />
409       </and>
410     </condition>
411
412     <condition property="attachments.present" >
413       <and>
414         <available classname="javax.activation.DataHandler" classpathref="classpath" />
415         <available classname="javax.mail.internet.MimeMessage" classpathref="classpath" />
416       </and>
417     </condition>
418
419     <condition property="sun.codec.present" >
420       <available classname="sun.awt.image.codec.JPEGImageEncoderImpl" classpathref="classpath" />
421     </condition>
422
423     <condition property="jimi.present" >
424       <available classname="com.sun.jimi.core.Jimi" classpathref="classpath" />
425     </condition>
426
427     <condition property="merlinio.present" >
428       <available classname="javax.imageio.ImageIO" classpathref="classpath" />
429     </condition>
430
431     <condition property="axis-ant.present" >
432       <available classname="org.apache.axis.tools.ant.foreach.ForeachTask">
433         <classpath>
434           <pathelement location="${build.lib}/axis-ant.jar"/>
435         </classpath>
436       </available>
437     </condition>
438
439     <condition property="jimiAndAttachments.present">
440       <and>
441         <available classname="javax.activation.DataHandler" classpathref="classpath" />
442         <available classname="javax.mail.internet.MimeMessage" classpathref="classpath" />
443         <available classname="com.sun.jimi.core.Jimi" classpathref="classpath" />
444       </and>
445     </condition>
446
447     <condition property="jms.present" >
448       <available classname="javax.jms.Message" classpathref="classpath" />
449     </condition>
450
451     <condition property="jmsAndSonicMQ.present" >
452       <and>
453         <available classname="javax.jms.Message" classpathref="classpath" />
454         <available classname="progress.message.jclient.Message" classpathref="classpath" />
455       </and>
456     </condition>
457
458     <available property="post-compile.present" file="post-compile.xml" />
459
460     <property environment="env"/>
461     <condition property="debug" value="on">
462     <and>
463       <equals arg1="on" arg2="${env.debug}"/>
464     </and>
465     </condition>
466
467     <condition property="castor.present" >
468       <available classname="org.exolab.castor.xml.MarshalException" classpathref="classpath" />
469     </condition>
470
471     <condition property="xmlbeans.present" >
472       <and>
473         <available classname="org.apache.xmlbeans.XmlObject" classpathref="classpath" />
474         <available classname="javax.xml.stream.XMLStreamReader" classpathref="classpath" />
475       </and>
476     </condition>
477
478     <condition property="bsf.present" >
479       <available classname="org.apache.bsf.BSFManager" classpathref="classpath" />
480     </condition>
481
482     <condition property="combridge.present" >
483       <available classname="org.apache.axis.components.bridge.COMBridge" classpathref="classpath" />
484     </condition>
485
486     <!-- look for WSDL support on the platform -->
487     <condition property="wsdl.found">
488       <or>
489         <available file="wsdl"     filepath="${env.PATH}"/>
490         <available file="wsdl.exe" filepath="${env.PATH}"/>
491         <available file="wsdl.exe" filepath="${env.Path}"/>
492       </or>
493     </condition>
494     <echo level="verbose">wsdl.found=${wsdl.found}</echo>
495     <condition property="csc.found">
496       <or>
497         <available file="csc"     filepath="${env.PATH}"/>
498         <available file="csc.exe" filepath="${env.PATH}"/>
499         <available file="csc.exe" filepath="${env.Path}"/>
500       </or>
501     </condition>
502     <echo level="verbose">csc.found=${csc.found}</echo>
503     <condition property="dotnetapps.found">
504       <and>
505         <isset property="csc.found"/>
506         <isset property="wsdl.found"/>
507       </and>
508     </condition>
509     <echo level="verbose">dotnetapps.found=${dotnetapps.found}</echo>
510     <!-- look for IIS -->
511     <condition property="iis.found">
512       <and>
513         <os family="windows" />
514         <available file="${iis.base}" type="dir" />
515       </and>
516     </condition>
517     <echo level="verbose">iis.found=${iis.found}</echo>
518     <echo level="verbose">iis.base=${iis.base}</echo>
519
520     <!-- look for xalan -->
521     <available property="xalan2.present"
522                classname="org.apache.xalan.transformer.TransformerImpl" />
523 <!--   apply the current proxy settings to the current JVM.
524   This gives in-VM code network access through any firewall
525  -->    
526     <echo level="verbose" message="-- Applying Network Settings ---"/>
527     <!-- we cannot set proxyuser and proxypassword as these are only ant1.6 -->
528 <!--     <setproxy 
529       proxyhost="${http.proxyHost}"
530       proxyport="${http.proxyPort}"
531       socksProxyHost="${socks.proxyHost}"
532       socksProxyPort="${socks.proxyPort}"
533       />              
534  -->
535      <!-- these are conditions used for patternset
536           configuration of which sets of tests to run.
537           Ignore them until the functional tests use patternsets -->
538     <!-- set the flag for testing jsp pages -->
539     <condition property="test.functional.httpunit.jsp">
540       <isset property="testserver.is.appserver"/>
541     </condition>
542     <!-- set the flag for testing the admin servlet --> 
543     <condition property="test.functional.httpunit.adminservlet">
544       <isset property="testserver.is.appserver"/>
545     </condition>
546     <!-- set the online flag to true if offline is not set -->
547      <condition property="test.functional.online">
548       <not><isset property="offline"/></not>
549     </condition>       
550
551   </target>
552
553   <!-- print out the current enviroment.
554       Also, probe for javadocs being out of date and set javadoc.notrequired
555       to true if they are not needed -->
556   <target name="printEnv" depends="setenv,check-javadoc-needed" >
557
558     <echo message="-----------------------------------------------------------------"/>
559     <echo message="       Build environment for ${Name} ${axis.version} [${year}]   "/>
560     <echo message="-----------------------------------------------------------------"/>
561     <echo message="Building with ${ant.version}"/>
562     <echo message="using build file ${ant.file}"/>
563     <echo message="Java ${java.version} located at ${java.home} "/>
564     <echo message="-----------------------------------------------------------------"/>
565
566     <echo message="--- Flags (Note: If the {property name} is displayed, "/>
567     <echo message="           then the component is not present)" />
568     <echo message=""/>
569
570     <echo message="basedir = ${basedir}"/>
571     <echo message="axis.home = ${axis.home}"/>
572     <echo message="build.dir = ${build.dir}"/>
573     <echo message="build.dest = ${build.dest}"/>
574     <echo message="lib.dir = ${lib.dir}"/>
575     <echo message=""/>
576     <echo message="=== Required Libraries (for building code) ===" />
577     <echo message="activation.present=${activation.present}" />
578     <echo message="commons-discovery.present=${commons-discovery.present}" />
579     <echo message="commons-logging.present=${commons-logging.present}" />
580     <echo message="wsdl4j.present=${wsdl4j.present}" />
581     <echo message=""/>
582     <echo message="--- Optional Libraries (for building code) ---" />
583     <echo message="attachments.present=${attachments.present}" />
584     <echo message="bsf.present=${bsf.present}" />
585     <echo message="castor.present=${castor.present}" />
586     <echo message="commons-httpclient.present=${commons-httpclient.present}" />
587     <echo message="commons-net.present=${commons-net.present}" />
588     <echo message="ibm.jsse.present=${ibm.jsse.present}" />
589     <echo message="jimi.present=${jimi.present}" />
590     <echo message="jms.present=${jms.present}" />
591     <echo message="jetty.present=${jetty.present}" />
592     <echo message="jdk14.jsse.present=${jdk14.jsse.present}" />
593     <echo message="mailapi.present=${mailapi.present}" />
594     <echo message="regexp.present=${regexp.present}" />
595     <echo message="security.present=${security.present}" />
596     <echo message="servlet.present=${servlet.present}" />
597     <echo message="sun.jsse.present=${sun.jsse.present}" />
598     <echo message="xmlbeans.present=${xmlbeans.present}" />
599     <echo message=""/>
600     <echo message="=== Required Libraries (for building code) ===" />
601     <echo message="activation.jar=${activation.jar}" />
602     <echo message="commons-discovery.jar=${commons-discovery.jar}" />
603     <echo message="commons-logging.jar=${commons-logging.jar}" />
604     <echo message="wsdl4j.jar=${wsdl4j.jar}" />
605     <echo message=""/>
606     <echo message="--- Optional Libraries (for building code) ---" />
607     <echo message="attachments.jar=${attachments.jar}" />
608     <echo message="bsf.jar=${bsf.jar}" />
609     <echo message="castor.jar=${castor.jar}" />
610     <echo message="commons-httpclient.jar=${commons-httpclient.jar}" />
611     <echo message="commons-net.jar=${commons-net.jar}" />
612     <echo message="ibm.jsse.jar=${ibm.jsse.jar}" />
613     <echo message="jimi.jar=${jimi.jar}" />
614     <echo message="jms.jar=${jms.jar}" />
615     <echo message="jetty.jar=${jetty.jar}" />
616     <echo message="jdk14.jsse.jar=${jdk14.jsse.jar}" />
617     <echo message="mailapi.jar=${mailapi.jar}" />
618     <echo message="regexp.jar=${regexp.jar}" />
619     <echo message="security.jar=${security.jar}" />
620     <echo message="servlet.jar=${servlet.jar}" />
621     <echo message="sun.jsse.jar=${sun.jsse.jar}" />
622     <echo message="xmlbeans.jar=${xmlbeans.jar}" />
623     <echo message=""/>
624     <echo message="--- Miscellaneous (for running tests) ---" />
625     <echo message="axis-ant.present=${axis-ant.present}" />
626     <echo message="clover.present=${clover.present}" />
627     <echo message="httpunit.present=${httpunit.present}" />
628     <echo message="junit.present=${junit.present}" />
629     <echo message="log4j.present=${log4j.present}" />
630     <echo message=""/>
631     <echo message="--- Property values ---" />
632     <echo message="debug=${debug}" />
633     <echo message="nowarn=${nowarn}" />
634     <echo message="source=${source}" />
635     <echo message="target=${target}" />
636     <echo message="deprecation=${deprecation}" />
637     <echo message="build.compiler=${build.compiler}" />
638     <echo message="javac.fork=${javac.fork}" />
639     <!-- Set environment variable axis_nojavadocs=true  to never generate javadocs. Case sensative! -->
640     <echo message="axis_nojavadocs=${env.axis_nojavadocs}"/>
641     <echo message="javax.xml.parsers.DocumentBuilderFactory=${javax.xml.parsers.DocumentBuilderFactory}"/>
642     <echo message="javax.xml.parsers.SAXParserFactory=${javax.xml.parsers.SAXParserFactory}"/>
643     <echo message="sun.boot.class.path=${sun.boot.class.path}"/>
644     <echo message="jikes.class.path=${jikes.class.path}"/>
645
646     <echo message="" />
647     <echo message="-- Network Settings ---"/>
648     <echo message="" />
649     <echo message="http.proxyHost = ${http.proxyHost}" />
650     <echo message="http.proxyPort = ${http.proxyPort}" />
651     <echo message="http.nonProxyHosts = ${http.nonProxyHosts}" />
652     <echo message="http.proxyUser = ${http.proxyUser}" />
653     <echo message="http.proxyPassword = ${http.proxyPassword}" />
654     <echo message="" />
655
656     <echo message="-- Test Environment for AXIS ---"/>
657     <echo message="" />
658     <echo message="test.functional.remote = ${test.functional.remote}" />
659     <echo message="test.functional.local = ${test.functional.local}" />
660     <echo message="test.functional.both = ${test.functional.both}" />
661     <echo message="test.functional.reportdir = ${test.functional.reportdir}" />
662     <echo message="test.functional.SimpleAxisPort = ${test.functional.SimpleAxisPort}" />
663     <echo message="test.functional.TCPListenerPort = ${test.functional.TCPListenerPort}" />
664     <echo message="test.functional.fail = ${test.functional.fail}" />
665     <echo message="" />
666
667     <pathconvert targetos="windows" property="classpath.as.string" refid="classpath"/>
668     <echo message="classpath: ${classpath.as.string}"/>
669     <echo message="" />
670
671  </target>
672
673  
674   <!-- see if javadocs are needed by looking for the env.axis_nojavadocs flag -->
675   
676   <target name="check-javadoc-needed"  depends="setenv" >
677
678     <uptodate property="javadoc.notoutofdate"
679               targetfile="${build.javadocs}/index.html">
680       <srcfiles dir="${src.dir}" includes="**/*.java" />
681     </uptodate>
682
683     <!-- for ant1.5+, we can use <isset> here -->
684     <condition property="axis_nojavadocs" value="true">
685       <equals arg1="true" arg2="${env.axis_nojavadocs}"/>
686     </condition>
687     <condition property="axis_nojavadocs" value="false">
688       <equals arg1="${axis_nojavadocs}" arg2="$${axis_nojavadocs}"/>
689     </condition>
690
691     <condition property="javadoc.notrequired" value="true">
692     <or>
693       <equals arg1="${javadoc.notoutofdate}" arg2="true"/>
694       <equals arg1="true" arg2="${axis_nojavadocs}"/>
695     </or>
696     </condition>
697
698
699   </target>
700
701
702   <!-- =================================================================== -->
703   <!-- Launches the functional test TCP server -->
704   <!-- =================================================================== -->
705   <target name="start-functional-test-tcp-server" if="junit.present">
706     <echo message="Starting test tcp server."/>
707     <java classname="samples.transport.tcp.TCPListener" fork="yes" dir="${axis.home}/build">
708       <arg line="-p ${test.functional.TCPListenerPort}" /> <!-- arbitrary port -->
709       <classpath refid="classpath" />
710     </java>
711   </target>
712
713   <!-- =================================================================== -->
714   <!-- Launches the functional test HTTP server -->
715   <!-- =================================================================== -->
716   <target name="start-functional-test-http-server" if="junit.present">
717     <echo message="Starting test http server."/>
718     <java classname="org.apache.axis.transport.http.SimpleAxisServer" fork="yes" dir="${axis.home}/build">
719         <!-- Uncomment this to use Jikes instead of Javac for compiling JWS Files
720         <jvmarg value="-Daxis.Compiler=org.apache.axis.components.compiler.Jikes"/>
721         -->
722         <jvmarg value="-Daxis.wsdlgen.intfnamespace=http://localhost:${test.functional.ServicePort}"/>
723         <jvmarg value="-Daxis.wsdlgen.serv.loc.url=http://localhost:${test.functional.ServicePort}"/>
724         <arg line="-p ${test.functional.SimpleAxisPort}" />  <!-- arbitrary port -->
725       <classpath refid="classpath" />
726     </java>
727
728   </target>
729
730   <!-- =================================================================== -->
731   <!-- Launches the functional test HTTP server when testing digital signature -->
732   <!-- =================================================================== -->
733   <target name="start-functional-test-http-server-secure" if="junit.present" depends="start-signature-signing-and-verification">
734     <echo message="Starting test http server."/>
735     <java classname="org.apache.axis.transport.http.SimpleAxisServer" fork="yes" dir="${axis.home}/build">
736         <!-- Uncomment this to use Jikes instead of Javac for compiling JWS Files
737         <jvmarg value="-Daxis.Compiler=org.apache.axis.components.compiler.Jikes"/>
738         -->
739         <jvmarg value="-Daxis.wsdlgen.intfnamespace=http://localhost:${test.functional.ServicePort}"/>
740         <jvmarg value="-Daxis.wsdlgen.serv.loc.url=http://localhost:${test.functional.ServicePort}"/>
741         <arg line="-p ${test.functional.SimpleAxisPort}" />  <!-- arbitrary port -->
742       <classpath refid="classpath" />
743     </java>
744
745   </target>
746
747   <!-- =================================================================== -->
748   <!-- Stops the functional test HTTP server -->
749   <!-- =================================================================== -->
750   <target name="stop-functional-test-http-server" if="junit.present">
751     <echo message="Stopping test http server."/>
752     <java classname="org.apache.axis.client.AdminClient" fork="yes">
753       <classpath refid="classpath" />
754       <arg line="quit"/>
755     </java>
756   </target>
757
758   <!-- =================================================================== -->
759   <!-- Stops the functional test HTTP server when testing digital signature -->
760   <!-- =================================================================== -->
761   <target name="stop-functional-test-http-server-secure" if="junit.present" depends="stop-signature-signing-and-verification">
762     <echo message="Stopping test http server."/>
763     <java classname="org.apache.axis.client.AdminClient" fork="yes">
764       <classpath refid="classpath" />
765       <arg line="quit"/>
766     </java>
767   </target>
768
769   <!-- =================================================================== -->
770   <!-- Start Signature Signing and Verification -->
771   <!-- =================================================================== -->
772   <target name="start-signature-signing-and-verification" if="security.present">
773     <!-- Enable transparent Signing of SOAP Messages sent
774         from the client and Server-side Signature Verification.
775     -->
776     <java classname="org.apache.axis.client.AdminClient" fork="yes">
777       <classpath refid="classpath" />
778       <arg line="${axis.home}/samples/security/serversecuritydeploy.wsdd"/>
779     </java>
780     <java classname="org.apache.axis.utils.Admin" fork="yes">
781       <classpath refid="classpath" />
782       <arg value="client"/>
783       <arg value="${axis.home}/samples/security/clientsecuritydeploy.wsdd"/>
784     </java>
785   </target>
786
787   <!-- =================================================================== -->
788   <!-- Stop Signature Signing and Verification -->
789   <!-- =================================================================== -->
790   <target name="stop-signature-signing-and-verification" if="security.present">
791     <!-- Disable transparent Signing of SOAP Messages sent
792         from the client and Server-side Signature Verification.
793     -->
794     <java classname="org.apache.axis.client.AdminClient" fork="yes">
795       <classpath refid="classpath" />
796       <arg line="samples/security/serversecurityundeploy.wsdd"/>
797     </java>
798     <java classname="org.apache.axis.utils.Admin" fork="yes">
799       <classpath refid="classpath" />
800       <arg value="client"/>
801       <arg value="samples/security/clientsecurityundeploy.wsdd"/>
802     </java>
803
804   </target>
805
806   <!-- =================================================================== -->
807   <!-- Prepares the JUnit functional test -->
808   <!-- =================================================================== -->
809   <target name="component-junit-functional-prepare" if="junit.present">
810
811     <!-- first, put the JWS where the functional test can see it -->
812     <mkdir dir="${axis.home}/build/jws" />
813     <copy file="${axis.home}/samples/stock/StockQuoteService.jws" todir="${axis.home}/build/jws" />
814     <copy file="${axis.home}/test/functional/AltStockQuoteService.jws" todir="${axis.home}/build/jws" />
815     <copy file="${axis.home}/test/functional/GlobalTypeTest.jws" todir="${axis.home}/build/jws"/>
816     <copy file="${axis.home}/webapps/axis/EchoHeaders.jws" todir="${axis.home}/build/jws" />
817
818           <path id="deploy.xml.files">
819                 <fileset dir="${build.dir}">
820                   <include name="work/${componentName}/**/deploy.wsdd"/>
821                   <include name="${extraServices}/deploy.wsdd" />
822                 </fileset>
823           </path>
824
825           <path id="undeploy.xml.files">
826                 <fileset dir="${build.dir}">
827                   <include name="work/${componentName}/**/undeploy.wsdd"/>
828                   <include name="${extraServices}/undeploy.wsdd" />
829                 </fileset>
830           </path>
831
832           <property name="deploy.xml.property" refid="deploy.xml.files"/>
833           <property name="undeploy.xml.property" refid="undeploy.xml.files"/>
834   </target>
835
836   <target name="component-test-run" if="junit.present" depends="start-signature-signing-and-verification">
837     <echo message="Execing ${componentName} Test"/>
838     <antcall target="component-junit-functional"/>
839   </target>
840
841   <!-- Runs the AdminClient to deploy/undeploy.   Set up the admin.file.exists property such that it is set -->
842   <!-- if there is a deploy.xml file, and the admin.file property to contain the actual file reference.     -->
843   <target name="adminClient" if="admin.file.exists">
844     <java classname="org.apache.axis.client.AdminClient" fork="yes">
845       <classpath refid="classpath" />
846       <arg line="${admin.file}"/>
847     </java>
848   </target>
849
850   <target name="component-junit-functional" if="junit.present" depends="component-junit-functional-prepare">
851    <!-- Don't bother running AdminClient unless there's something to do -->
852    <condition property="admin.file.exists">
853        <not><equals arg1="${deploy.xml.property}" arg2=""/></not>
854    </condition>
855    <antcall target="adminClient">
856       <param name="admin.file" value="${deploy.xml.property}"/>
857    </antcall>
858
859    <available file="${axis.home}/junit-exclude-tests.txt" property="junit-exclude-tests.present"/>
860    <junit dir="${axis.home}" printsummary="yes" haltonfailure="${test.functional.fail}" fork="yes">
861       <classpath refid="classpath" />
862       <formatter type="xml" usefile="${test.functional.usefile}"/>
863       <batchtest todir="${test.functional.reportdir}">
864         <fileset dir="${build.dest}">
865            <include name="${extraTestCases}/*TestCase.class" />
866            <include name="${extraTestCases}/**/*TestCase.class" />
867            <include name="${componentName}/*TestCase.class" />
868            <include name="${componentName}/**/*TestCase.class" />
869            <include name="${componentName}/**/PackageTests.class" />
870            <!-- <include name="${componentName}/**/test/*TestSuite.class"/> -->
871            <excludesfile name="${axis.home}/junit-exclude-tests.txt" if="junit-exclude-tests.present"/> 
872         </fileset>
873       </batchtest>
874    </junit>
875
876    <!-- Don't bother running AdminClient unless there's something to do -->
877    <condition property="admin.file.exists">
878        <not><equals arg1="${undeploy.xml.property}" arg2=""/></not>
879    </condition>
880    <antcall target="adminClient">
881       <param name="admin.file" value="${undeploy.xml.property}"/>
882    </antcall>
883
884   </target>
885
886   <target name="execute-Component" depends="setenv" >
887     <mkdir dir="${test.functional.reportdir}" />
888     <runaxisfunctionaltests
889       url="http://localhost:${test.functional.TCPListenerPort}"
890       httpServerTarget="start-functional-test-http-server"
891       testTarget="component-test-run"
892       httpStopTarget="stop-functional-test-http-server" />
893   </target>
894
895   <target name="execute-Component-noServer" depends="setenv">
896     <mkdir dir="${test.functional.reportdir}" />
897     <runaxisfunctionaltests testTarget="component-test-run"/>
898   </target>
899
900   <target name="execute-Component-with-tcp"  depends="transport-layer" >
901     <mkdir dir="${test.functional.reportdir}" />
902     <runaxisfunctionaltests
903       url="http://localhost:${test.functional.TCPListenerPort}"
904       tcpServerTarget="start-functional-test-tcp-server"
905       httpServerTarget="start-functional-test-http-server"
906       testTarget="component-test-run"
907       httpStopTarget="stop-functional-test-http-server" />
908   </target>
909
910   <target name="transport-layer" depends="setenv" >
911     <ant inheritAll="true" dir="${axis.home}/samples/transport" 
912       antfile="build.xml" target="compile" />
913   </target>
914
915   <target name="clover-report" depends="setenv">
916      <clover-report>
917         <current outfile="${axis.home}/build/clover-report" title="Axis Clover Report" span="60m">
918            <format type="html"/> 
919         </current>       
920      </clover-report>
921   </target>
922
923   <target name="axis-clover-setup" depends="axis-clover-setenv" if="clover.present">
924      <echo message="Registering clover tasks" />
925      <taskdef resource="clovertasks"/>
926      <clover-setup initString="${axis.home}/build/clover/axis_coverage.db"
927                    tmpdir="${axis.home}/build/clover"
928                    flushpolicy="interval"
929                    flushinterval="1000">
930        <files>
931         <include name="**/org/apache/axis/**/*.java"/>
932        </files>
933      </clover-setup>
934   </target>
935
936   <target name="axis-clover-setenv">
937      <condition property="clover.present" >
938        <available classname="com.cortexeb.tools.clover.tasks.CloverTask" classpathref="classpath" />
939      </condition>
940   </target>
941
942   <target name="axis-xmlbeans-setup" depends="axis-xmlbeans-setenv" if="generate.schema.jar">
943     <mkdir dir="${build.lib}"/>
944      <echo message="Registering xmlbeans tasks"/>
945      <taskdef name="xmlbeanbuild" 
946               classname="org.apache.xmlbeans.impl.tool.XMLBean" 
947               classpathref="classpath"/>
948          <xmlbeanbuild
949               schema="${axis.home}/xsd"
950               classgendir="${build.dir}/schema/"
951               failonerror="true"
952               classpathref="classpath"/>
953          <jar jarfile="${build.lib}/axis-schema.jar" basedir="${build.dir}/schema/"/>
954   </target>
955
956   <target name="axis-xmlbeans-setenv">
957      <condition property="generate.schema.jar">
958        <and>
959          <available classname="org.apache.xmlbeans.impl.tool.XMLBean" classpathref="classpath" />
960          <not>
961                     <available file="${build.lib}/axis-schema.jar"/>
962          </not>
963        </and>
964      </condition>
965   </target>
966
967   <!-- =================================================================== -->
968   <!-- Compiles the source directory                                       -->
969   <!-- =================================================================== -->
970   <target name="compile" depends="printEnv" unless="compile.built"
971     description="compile the source and create the jar files">
972     <depend srcdir="${src.dir}" destdir="${build.dest}"
973             cache="${build.dir}/dependencycache" closure="no">
974     </depend>  
975     <javac srcdir="${src.dir}" destdir="${build.dest}"  nowarn="${nowarn}" debug="${debug}"
976       deprecation="${deprecation}" 
977       source="${source}"
978       target="${target}"
979       classpathref="classpath">
980       <!-- <compilerarg value="-fbootstrap-classes"/> -->
981       <exclude name="**/old/**/*" />
982       <exclude name="**/bak/**"/>
983       <exclude name="**/org/apache/axis/components/net/JDK14*.java" unless="jdk14.jsse.present"/>
984       <exclude name="**/org/apache/axis/components/net/Sun*.java" unless="sun.jsse.present"/>
985       <exclude name="**/org/apache/axis/components/net/IBM*.java" unless="ibm.jsse.present"/>
986       <exclude name="**/org/apache/axis/components/net/JSSE*.java" unless="jsse.present"/>
987
988       <exclude name="**/org/apache/axis/components/image/JDK13IO.java" unless="sun.codec.present"/>
989       <exclude name="**/org/apache/axis/components/image/JimiIO.java" unless="jimi.present"/>
990       <exclude name="**/org/apache/axis/components/image/MerlinIO.java" unless="merlinio.present"/>
991       <exclude name="**/org/apache/axis/attachments/AttachmentsImpl.java" unless="attachments.present"/>
992       <exclude name="**/org/apache/axis/attachments/AttachmentPart.java" unless="attachments.present"/>
993       <exclude name="**/org/apache/axis/attachments/AttachmentUtils.java" unless="attachments.present"/>
994       <exclude name="**/org/apache/axis/attachments/MimeUtils.java" unless="attachments.present"/>
995       <exclude name="**/org/apache/axis/attachments/ManagedMemoryDataSource.java" unless="attachments.present"/>
996       <exclude name="**/org/apache/axis/attachments/MultiPartRelatedInputStream.java" unless="attachments.present"/>
997       <exclude name="**/org/apache/axis/attachments/BoundaryDelimitedStream.java" unless="attachments.present"/>
998       <exclude name="**/org/apache/axis/attachments/ImageDataSource.java" unless="jimiAndAttachments.present"/>
999       <exclude name="**/org/apache/axis/attachments/MimeMultipartDataSource.java" unless="attachments.present"/>
1000       <exclude name="**/org/apache/axis/attachments/PlainTextDataSource.java" unless="attachments.present"/>
1001       <exclude name="**/org/apache/axis/configuration/EngineConfigurationFactoryServlet.java" unless="servlet.present"/>
1002       <exclude name="**/org/apache/axis/configuration/ServletEngineConfigurationFactory.java" unless="servlet.present"/>
1003       <exclude name="**/org/apache/axis/encoding/ser/JAFDataHandlerSerializer.java" unless="attachments.present"/>
1004       <exclude name="**/org/apache/axis/encoding/ser/JAFDataHandlerDeserializerFactory.java" unless="attachments.present"/>
1005       <exclude name="**/org/apache/axis/encoding/ser/JAFDataHandlerSerializerFactory.java" unless="attachments.present"/>
1006       <exclude name="**/org/apache/axis/encoding/ser/JAFDataHandlerDeserializer.java" unless="attachments.present"/>
1007       <exclude name="**/org/apache/axis/handlers/MD5AttachHandler.java" unless="attachments.present"/>
1008       <exclude name="**/org/apache/axis/handlers/SOAPMonitorHandler.java" unless="servlet.present"/>
1009       <exclude name="**/org/apache/axis/monitor/SOAPMonitorService.java" unless="servlet.present"/>
1010       <exclude name="**/org/apache/axis/providers/ComProvider.java" unless="combridge.present"/>
1011       <exclude name="**/org/apache/axis/transport/http/AbstractQueryStringHandler.java" unless="servlet.present"/>
1012       <exclude name="**/org/apache/axis/transport/http/AdminServlet.java" unless="servlet.present"/>
1013       <exclude name="**/org/apache/axis/transport/http/AutoRegisterServlet.java" unless="servlet.present"/>
1014       <exclude name="**/org/apache/axis/transport/http/AxisHttpSession.java" unless="servlet.present"/>
1015       <exclude name="**/org/apache/axis/transport/http/AxisServlet.java" unless="servlet.present"/>
1016       <exclude name="**/org/apache/axis/transport/http/AxisServletBase.java" unless="servlet.present"/>
1017       <exclude name="**/org/apache/axis/transport/http/AxisHTTPSessionListener.java" unless="servlet.present"/>
1018       <exclude name="**/org/apache/axis/transport/http/JettyAxisServer.java" unless="jetty.present"/>
1019       <exclude name="**/org/apache/axis/transport/http/FilterPrintWriter.java" unless="servlet.present"/>
1020       <exclude name="**/org/apache/axis/transport/http/ServletEndpointContextImpl.java" unless="servlet.present"/>
1021       <exclude name="**/org/apache/axis/transport/http/QSWSDLHandler.java" unless="servlet.present"/>
1022       <exclude name="**/org/apache/axis/transport/http/QSMethodHandler.java" unless="servlet.present"/>
1023       <exclude name="**/org/apache/axis/transport/http/QSListHandler.java" unless="servlet.present"/>
1024       <exclude name="**/org/apache/axis/transport/configuration/EngineConfigurationFactoryServlet.java" unless="servlet.present"/>
1025       <exclude name="**/org/apache/axis/transport/http/CommonsHTTPSender.java" unless="commons-httpclient.present"/>
1026       <exclude name="**/org/apache/axis/components/net/CommonsHTTPClientProperties.java" unless="commons-httpclient.present"/>
1027       <exclude name="**/org/apache/axis/components/net/CommonsHTTPClientPropertiesFactory.java" unless="commons-httpclient.present"/>
1028       <exclude name="**/org/apache/axis/components/net/DefaultCommonsHTTPClientProperties.java" unless="commons-httpclient.present"/>
1029       <exclude name="**/org/apache/axis/transport/mail/*.java" unless="commons-httpclient.present"/>
1030       <exclude name="**/org/apache/axis/transport/jms/*" unless="jms.present"/>
1031       <exclude name="**/org/apache/axis/components/jms/BeanVendorAdapter.java" unless="jms.present"/>
1032       <exclude name="**/org/apache/axis/components/jms/JMSVendorAdapter.java" unless="jms.present"/>
1033       <exclude name="**/org/apache/axis/components/jms/JMSVendorAdapterFactory.java" unless="jms.present"/>
1034       <exclude name="**/org/apache/axis/components/jms/JNDIVendorAdapter.java" unless="jms.present"/>
1035       <exclude name="**/org/apache/axis/components/jms/SonicMQVendorAdapter.java" unless="jmsAndSonicMQ.present"/>
1036       <exclude name="**/org/apache/axis/components/script/BSF.java" unless="bsf.present"/>
1037       <exclude name="**/org/apache/axis/server/JNDIAxisServerFactory.java" unless="servlet.present"/>
1038       <exclude name="**/org/apache/axis/security/servlet/*" unless="servlet.present"/>
1039       <exclude name="**/javax/xml/soap/*.java" unless="attachments.present"/>
1040       <exclude name="**/javax/xml/rpc/handler/soap/*.java" unless="attachments.present"/>
1041       <exclude name="**/javax/xml/rpc/server/Servlet*.java" unless="servlet.present"/>
1042       <exclude name="**/*TestSuite.java" unless="junit.present"/>
1043       <exclude name="**/org/apache/axis/encoding/ser/castor/*.java" unless="castor.present"/>
1044       <exclude name="**/org/apache/axis/encoding/ser/xbeans/*.java" unless="xmlbeans.present"/>
1045       <exclude name="**/org/apache/axis/test/AxisTestBase.java" unless="junit.present"/>
1046       <exclude name="**/org/apache/axis/transport/mail/*.java" unless="commons-net.present"/>
1047       <bootclasspath refid="boot.classpath"/>
1048     </javac>
1049     <copy file="${src.dir}/org/apache/axis/server/server-config.wsdd"
1050           toDir="${build.dest}/org/apache/axis/server"/>
1051     <copy file="${src.dir}/org/apache/axis/client/client-config.wsdd"
1052           toDir="${build.dest}/org/apache/axis/client"/>
1053     <copy file="${src.dir}/log4j.properties"
1054           toDir="${build.dest}"/>
1055     <copy file="${src.dir}/simplelog.properties"
1056           toDir="${build.dest}"/>
1057     <copy toDir="${build.dest}/org/apache/axis/i18n">
1058         <fileset dir="${src.dir}/org/apache/axis/i18n" includes="resource*.properties"/>
1059     </copy>
1060     <copy toDir="${build.dest}/org/apache/axis/utils">
1061         <fileset dir="${src.dir}/org/apache/axis/utils" includes="tcpmon*.properties"/>
1062     </copy>
1063
1064     <tstamp>
1065       <format property="build.time" pattern="MMM dd, yyyy (hh:mm:ss z)" locale="en"/>
1066     </tstamp>
1067     <replace dir="${build.dest}/org/apache/axis/i18n">
1068       <include name="resource*.properties"/>
1069       <replacefilter token="#today#" value="${build.time}"/>
1070       <replacefilter token="#axisVersion#" value="${axis.version}"/>
1071     </replace> 
1072
1073     <tstamp/>
1074     <jar jarfile="${build.lib}/${name}.jar" basedir="${build.dest}" >
1075       <include name="org/**" />
1076       <include name="log4j.properties" unless="exclude.log4j.configuration"/>
1077       <include name="simplelog.properties"/>
1078       <manifest>
1079         <section name="org/apache/axis">
1080           <attribute name="Implementation-Title" value="Apache Axis"/>
1081           <attribute name="Implementation-Version" value="${axis.version} ${TSTAMP} ${TODAY}"/> 
1082           <attribute name="Implementation-Vendor" value="Apache Web Services"/>
1083         </section>
1084       </manifest>
1085     </jar>
1086     <jar jarfile="${build.lib}/${jaxrpc}.jar" basedir="${build.dest}" >
1087       <include name="javax/**"/>
1088       <exclude name="javax/xml/soap/**"/>
1089       <manifest>
1090         <section name="javax/xml/rpc">
1091           <attribute name="Specification-Title" value="JAX-RPC"/>
1092           <attribute name="Specification-Version" value="1.1"/>
1093           <attribute name="Specification-Vendor" value="JCP"/>
1094         </section>
1095       </manifest>
1096     </jar>
1097     <jar jarfile="${build.lib}/${saaj}.jar" basedir="${build.dest}" >
1098       <include name="javax/xml/soap/**"/>
1099       <manifest>
1100         <section name="javax/xml/soap">
1101           <attribute name="Specification-Title" value="SAAJ"/>
1102           <attribute name="Specification-Version" value="1.2"/>
1103           <attribute name="Specification-Vendor" value="JCP"/>
1104         </section>
1105       </manifest>
1106     </jar>
1107     <copy file="${wsdl4j.jar}" toDir="${build.lib}"/>
1108     <copy file="${commons-logging.jar}" toDir="${build.lib}"/>
1109     <copy file="${commons-discovery.jar}" toDir="${build.lib}"/>
1110     <copy file="${log4j-core.jar}" toDir="${build.lib}"/>
1111     <copy file="${src.dir}/log4j.properties"
1112           toDir="${build.lib}"/>
1113
1114      <!--  Build the new org.apache.axis.tools.ant stuff -->
1115      <mkdir dir="${axis.home}/tools/lib" />
1116      <ant inheritAll="${ant.inheritAll}" inheritRefs="${ant.inheritRefs}" dir="${axis.home}/tools" antfile="build.xml" />
1117      <ant inheritAll="${ant.inheritAll}" inheritRefs="${ant.inheritRefs}" dir="${axis.home}/tools" antfile="build.xml" target="test"/>
1118
1119      <!-- Now call any custom post-compilation people want to do -->
1120      <antcall target="post-compile"/>
1121
1122      <property name="compile.built" value="yes"/>
1123      <echo message="Compile property set ${compile.built}"/>
1124   </target>
1125
1126   <!-- =================================================================== -->
1127   <!-- Custom post-compilation step                                        -->
1128   <!-- =================================================================== -->
1129   <target name="post-compile" if="post-compile.present">
1130    <ant dir="${axis.home}" antfile="post-compile.xml"/>
1131   </target>
1132
1133   <!-- =================================================================== -->
1134   <!-- Compiles the samples                                                -->
1135   <!-- =================================================================== -->
1136   <target name="samples" depends="compile" unless="samples.built"
1137     description="build the samples">
1138       <ant inheritAll="${ant.inheritAll}" inheritRefs="${ant.inheritRefs}" dir="${axis.home}" antfile="buildSamples.xml" target="compile"/>
1139     <!--
1140      <antcall target="my-forking-ant">
1141        <param name="dir" value="${axis.home}"/>
1142        <param name="file" value="buildSamples.xml"/>
1143        <param name="target" value="compile"/>
1144      </antcall>
1145     -->
1146       <property name="samples.built" value="yes"/>
1147       <echo message="Samples property set ${samples.built}"/>
1148   </target>
1149
1150   <!-- =================================================================== -->
1151   <!-- Compiles the JUnit testcases -->
1152   <!-- =================================================================== -->
1153
1154   <path id="test-classpath">
1155     <pathelement location="${build.dest}" />
1156     <path refid="classpath"/>
1157   </path>
1158
1159   <target name="buildTest" depends="compile" if="junit.present" unless="tests.built">
1160     <echo message="junit package found ..."/>
1161      <antcall target="buildJunit"/>
1162      <antcall target="buildFunctional"/>
1163     <property name="tests.built" value="yes"/>
1164     <echo message="Tests property set ${tests.built}"/>
1165   </target>
1166
1167   <target name="buildJunit" depends="compile" if="junit.present">
1168     <echo message="junit package found ..."/>
1169      <antcall target="my-forking-ant">
1170        <param name="dir" value="${axis.home}"/>
1171        <param name="file" value="buildTest.xml"/>
1172        <param name="target" value="compileJunit"/>
1173      </antcall>
1174   </target>
1175   <target name="buildFunctional" depends="compile" if="junit.present">
1176     <echo message="junit package found ..."/>
1177      <antcall target="my-forking-ant">
1178        <param name="dir" value="${axis.home}"/>
1179        <param name="file" value="buildTest.xml"/>
1180        <param name="target" value="compileFunctional"/>
1181      </antcall>
1182   </target>
1183
1184   <!-- =================================================================== -->
1185   <!-- Compiles applets                                                    -->
1186   <!-- =================================================================== -->
1187
1188   <target name="applets" depends="compile">
1189     <mkdir dir="${build.webapp}/WEB-INF/classes/"/>
1190     <javac srcdir="${axis.home}/webapps/axis"
1191       destdir="${build.webapp}/WEB-INF/classes/"
1192       nowarn="${nowarn}"
1193       debug="${debug}"
1194       source="${source}"
1195       deprecation="${deprecation}"
1196       classpathref="classpath">
1197       <include name="*.java"/>
1198     </javac>
1199   </target>
1200
1201   <!-- =================================================================== -->
1202   <!-- Runs the JUnit package testcases -->
1203   <!-- =================================================================== -->
1204   <target name="junit" depends="buildJunit" if="junit.present"
1205       description="run the junit tests">
1206     <mkdir dir="${test.functional.reportdir}" />
1207     <ant inheritAll="${ant.inheritAll}" inheritRefs="${ant.inheritRefs}" dir="${axis.home}" antfile="buildTest.xml" target="junit">
1208       <property name="junit.present" value="${junit.present}"/>
1209     </ant>
1210   </target>
1211
1212   <target name="runComponentTests" depends="compile, buildTest">
1213      <ant inheritAll="${ant.inheritAll}" inheritRefs="${ant.inheritRefs}" dir="${axis.home}" antfile="buildTest.xml" target="componentTest"/>
1214   </target>
1215
1216   <!-- =================================================================== -->
1217   <!-- Functional tests, with server                                       -->
1218   <!-- =================================================================== -->
1219   <target name="functional-tests" depends="buildFunctional" description="functional tests">
1220     <ant inheritAll="${ant.inheritAll}" inheritRefs="${ant.inheritRefs}" dir="${axis.home}" antfile="buildTest.xml" target="functional-tests"/>
1221   </target>
1222
1223   <target name="functional-tests-secure" depends="buildFunctional" description="secure functional tests">
1224     <ant inheritAll="${ant.inheritAll}" inheritRefs="${ant.inheritRefs}" dir="${axis.home}" antfile="buildTest.xml" target="functional-tests-secure">
1225       <property name="junit.present" value="${junit.present}"/>
1226     </ant>
1227   </target>
1228
1229   <!-- All tests -->
1230   <target name="all-tests" depends="junit, functional-tests">
1231     <tstamp>
1232         <format property="tests-end-time" pattern="HH:mm:ss 'on' yyyy-MM-dd" locale="en"/>
1233     </tstamp>
1234     <echo>target all-tests of ${ant.project.name} finished at ${tests-end-time}</echo>
1235   </target>
1236
1237   <!-- =================================================================== -->
1238   <!-- Creates the API documentation                                       -->
1239   <!-- =================================================================== -->
1240   <target name="javadocs" depends="printEnv" unless="javadoc.notrequired"
1241       description="create javadocs">
1242
1243     <mkdir dir="${build.javadocs}"/>
1244     <javadoc packagenames="${packages}"
1245              sourcepath="${src.dir}"
1246              classpathref="classpath"
1247              destdir="${build.javadocs}"
1248              author="true"
1249              version="true"
1250              use="true"
1251              windowtitle="${Name} API"
1252              doctitle="${Name}"
1253              bottom="Copyright &#169; ${year} Apache Web Services Project. All Rights Reserved."
1254     />
1255   </target>
1256
1257   <!-- =================================================================== -->
1258   <!-- Jars up the the API documentation                                   -->
1259   <!-- =================================================================== -->
1260   <target name="api-jar" depends="javadocs"
1261           description="create API docs jar">
1262
1263     <jar jarfile="${build.lib}/${name}-api.jar" basedir="${build.javadocs}" />
1264     
1265   </target>
1266
1267   <!-- =================================================================== -->
1268   <!-- Jars up the the source code                                         -->
1269   <!-- =================================================================== -->
1270   <target name="src-jar"
1271           description="create source code jar">
1272
1273     <jar jarfile="${build.lib}/${name}-src.jar" basedir="${src.dir}" />
1274     
1275   </target>
1276
1277   <!-- =================================================================== -->
1278   <!-- Build/Test EVERYTHING from scratch!                                 -->
1279   <!-- =================================================================== -->
1280   <target name="all" depends="junit, functional-tests, dist"
1281       description="do everything: distribution build and functional tests"
1282     />
1283
1284   <!-- =================================================================== -->
1285   <!-- Creates a war file for testing                                      -->
1286   <!-- =================================================================== -->
1287   <target name="war" depends="compile, samples, applets"
1288       description="Create the web application" >
1289     <mkdir dir="${build.webapp}"/>
1290     <copy todir="${build.webapp}">
1291       <fileset dir="${webapp}"/>
1292     </copy>
1293     <copy todir="${build.webapp}/WEB-INF/lib">
1294       <fileset dir="${lib.dir}">
1295         <include name="*.jar"/>
1296         <exclude name="*servlet*.jar"/>
1297       </fileset>
1298       <fileset dir="${build.lib}">
1299         <include name="*.jar"/>
1300       </fileset>
1301     </copy>
1302     <copy todir="${build.webapp}/samples">
1303       <fileset dir="./samples"/>
1304     </copy>
1305     <copy todir="${build.webapp}/WEB-INF/classes/samples">
1306       <fileset dir="${build.samples}"/>
1307     </copy>
1308     <copy todir="${build.webapp}/WEB-INF">
1309       <fileset dir="${samples.dir}/stock">
1310         <include name="*.lst"/>
1311       </fileset>
1312     </copy>
1313     <delete>
1314       <fileset dir="${build.webapp}" includes="**/.svn"/>
1315     </delete>
1316     <jar jarfile="${build.dir}/${name}.war" basedir="${build.webapp}"/>
1317   </target>
1318
1319   <!-- =================================================================== -->
1320   <!-- Creates the binary distribution                                     -->
1321   <!-- =================================================================== -->
1322   <target name="javadocsdist" depends="check-javadoc-needed, javadocs" unless="javadoc.notrequired">
1323     <mkdir dir="${dist.dir}/docs/apiDocs"/>
1324     <copy todir="${dist.dir}/docs/apiDocs">
1325       <fileset dir="${build.javadocs}"/>
1326     </copy>
1327   </target>
1328
1329   <target name="dist" depends="compile, samples, applets, javadocsdist"
1330     description="create the full binary distribution">
1331     <mkdir dir="${dist.dir}"/>
1332     <mkdir dir="${dist.dir}/lib"/>
1333     <mkdir dir="${dist.dir}/samples"/>
1334     <mkdir dir="${dist.dir}/webapps/axis"/>
1335     <mkdir dir="${dist.dir}/xmls"/>
1336     <mkdir dir="${dist.dir}/docs"/>
1337
1338     <copy todir="${dist.dir}/lib">
1339       <fileset dir="${build.lib}"/>
1340     </copy>
1341     <copy todir="${dist.dir}/samples">
1342       <fileset dir="${build.samples}"/>
1343       <fileset dir="./samples"/>
1344     </copy>
1345     <copy todir="${dist.dir}/docs">
1346       <fileset dir="${docs.dir}"/>
1347     </copy>
1348     <copy todir="${dist.dir}/webapps/axis">
1349       <fileset dir="${webapp}"/>
1350     </copy>
1351     <copy todir="${dist.dir}/webapps/axis/WEB-INF">
1352       <fileset dir="${samples.dir}/stock">
1353         <include name="*.lst"/>
1354       </fileset>
1355     </copy>
1356     <copy todir="${dist.dir}/webapps/axis/WEB-INF/lib">
1357       <fileset dir="${build.lib}">
1358         <include name="*.jar"/>
1359       </fileset>
1360     </copy>
1361     <copy todir="${dist.dir}/webapps/axis/WEB-INF/classes/samples">
1362       <fileset dir="${build.samples}"/>
1363     </copy>
1364     <copy todir="${dist.dir}/webapps/axis/">
1365       <fileset dir="${build.webapp}"/>
1366     </copy>
1367     <copy file="LICENSE" tofile="${dist.dir}/LICENSE"/>
1368     <copy file="README" tofile="${dist.dir}/README"/>
1369     <copy file="NOTICE" tofile="${dist.dir}/NOTICE"/>
1370     <copy file="release-notes.html" tofile="${dist.dir}/release-notes.html"/>
1371     <copy todir="${dist.dir}/xmls">
1372       <fileset dir="xmls"/>
1373     </copy>
1374     <zip destfile="${build.dir}/${name}-bin-${axis.dirname}.zip">
1375       <zipfileset prefix="${name}-${axis.dirname}" dir="${dist.dir}"/>
1376     </zip>
1377     <tar destfile="${build.dir}/${name}-bin-${axis.dirname}.tar.gz"
1378          longfile="gnu" compression="gzip">
1379       <tarfileset prefix="${name}-${axis.dirname}" dir="${dist.dir}"/>
1380     </tar>
1381   </target>
1382
1383   <!-- =================================================================== -->
1384   <!-- Creates the source distribution                                     -->
1385   <!-- =================================================================== -->
1386   <target name="srcdist" depends="javadocsdist"
1387       description="Create the source distribution">
1388     <copy todir="${dist.dir}">
1389       <fileset dir=".">
1390         <include name="*.xml"/>
1391         <include name="*.html"/>
1392         <include name="LICENSE"/>
1393         <include name="README"/>
1394         <include name="NOTICE"/>
1395         <include name="docs/**"/>
1396         <include name="lib/**"/>
1397         <include name="samples/**"/>
1398         <include name="src/**"/>
1399         <include name="test/**"/>
1400         <include name="tools/**"/>
1401         <include name="webapps/**"/>
1402         <include name="xmls/**"/>
1403
1404         <exclude name="**/.svn/**"/>
1405       </fileset>
1406     </copy>
1407     <copy file="LICENSE" tofile="${dist.dir}/LICENSE"/>
1408     <zip destfile="${build.dir}/${name}-src-${axis.dirname}.zip">
1409         <zipfileset prefix="${name}-${axis.dirname}" dir="${dist.dir}"/>
1410     </zip>
1411     <tar destfile="${build.dir}/${name}-src-${axis.dirname}.tar.gz"
1412          longfile="gnu" compression="gzip">
1413         <tarfileset prefix="${name}-${axis.dirname}" dir="${dist.dir}"/>
1414     </tar>
1415   </target>
1416
1417   <!-- =================================================================== -->
1418   <!-- Interop 3                                                           -->
1419   <!-- =================================================================== -->
1420   <target name="interop3" depends=""
1421       description="compile the round3 interop tests">
1422     <ant dir="test/wsdl/interop3/emptysa"/>
1423     <ant dir="test/wsdl/interop3/import1"/>
1424     <ant dir="test/wsdl/interop3/import2"/>
1425     <ant dir="test/wsdl/interop3/import3"/>
1426     <ant dir="test/wsdl/interop3/compound1"/>
1427     <ant dir="test/wsdl/interop3/compound2"/>
1428     <ant dir="test/wsdl/interop3/docLit"/>
1429     <ant dir="test/wsdl/interop3/docLitParam"/>
1430     <ant dir="test/wsdl/interop3/rpcEnc"/>
1431   </target>
1432
1433   <!-- =================================================================== -->
1434   <!-- Cleans everything                                                   -->
1435   <!-- =================================================================== -->
1436   <target name="clean"
1437       description="clean up, build, dist and much of the axis servlet">
1438     <delete dir="${build.dir}"/>
1439     <delete dir="${dist.dir}"/>
1440     <delete dir="${axis.home}/tools/lib"/>
1441     <delete file="client-config.wsdd"/>
1442     <delete file="server-config.wsdd"/>
1443     <delete file="webapps/axis/WEB-INF/server-config.wsdd"/>
1444     <delete>
1445       <fileset dir="webapps/axis" includes="**/*.class" />
1446     </delete>
1447     <delete dir="test-reports"/>
1448     <delete file="TEST-test.functional.FunctionalTests.txt"/>
1449     <delete file="GetQuote.wsdl"/>
1450     <property name="axis-ant.present" value="false"/>
1451   </target>
1452   
1453   <!-- =================================================================== -->
1454   <!-- Check the style of the Axis source                                 -->
1455   <!-- =================================================================== -->
1456   <target name="checkstyle" 
1457     description="Check the style of the Axis source" >
1458     <ant inheritAll="${ant.inheritAll}" inheritRefs="${ant.inheritRefs}" dir="${axis.home}" target="checkstyle"
1459       antfile="xmls/checkstyle.xml"
1460       >
1461       <property name="checkstyle.project"
1462         value="axis" />
1463       <property name="checkstyle.src.dir"
1464         location="${axis.home}/src" />
1465     </ant>
1466     </target>
1467
1468   <target name="happyclient" depends="compile">
1469       <java classname="org.apache.axis.client.HappyClient"
1470           fork="true"
1471           failonerror="true">
1472           <classpath>
1473             <fileset dir="${build.lib}">
1474                <include name="*.jar"/>
1475             </fileset>
1476           </classpath>
1477       </java>
1478   </target>
1479
1480   <target name="report">
1481      <antcall target="my-forking-ant">
1482        <param name="dir" value="${axis.home}"/>
1483        <param name="file" value="buildTest.xml"/>
1484        <param name="target" value="create-test-report"/>
1485      </antcall>
1486   </target>
1487 </project>
This page took 0.164775 seconds and 3 git commands to generate.