Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / interop-tests / AnyTypeCode / build.xml
blob5decc6c3315883eecff354e977a7d8fd91892011
1 <!--  -->
2 <project name="TAO-JacORB AnyTypeCode interop test" default="compile" basedir=".">
4     <property environment="env"/>
5     <property name="src.dir"        value="jacorb"/>
6     <property name="build.dir"      value="build"/>
7     <property name="classes.dir"    value="${build.dir}/classes"/>
9     <property name="idl.dir"        value="idl" />
10     <property name="gen.dir"        value="${build.dir}/generated" />
11     <property name="resources.dir"  value="resources" />
12     <property name="jacorb.dir"     value="${env.JACORB_HOME}" />
14     <property name="tmp.dir"        value="${build.dir}/tmp" />
16     <!-- this property can be overridden on the command line to pass in additional args  -->
17     <!-- to the started java processes e.g. -Djaco.args=-Djacorb.log.default.verbosity=4 -->
18     <property name="jaco.args"      value="-Dignored=value" />
20     <path id="jacorb.classpath" >
21         <pathelement location="${jacorb.dir}/classes" />
22         <fileset dir="${jacorb.dir}/lib">
23             <include name="*.jar" />
24         </fileset>
25     </path>
27     <path id="demo.classpath" >
28         <pathelement location="${classes.dir}" />
29         <pathelement location="${resources.dir}" />
30         <pathelement location="../common/build/classes" />
31     </path>
33     <presetdef name="jaco">
34         <java fork="true" >
35             <jvmarg value="-Xbootclasspath/p:${jacorb.dir}/classes" />
36             <jvmarg value="-Djava.endorsed.dirs=${jacorb.dir}/lib" />
37             <jvmarg value="-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB" />
38             <jvmarg value="-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton" />
39             <jvmarg value="${jaco.args}" />
41             <classpath refid="demo.classpath" />
42         </java>
43     </presetdef>
45     <target name="idl.taskdef">
46         <taskdef name="jacidl" classname="org.jacorb.idl.JacIDL" classpathref="jacorb.classpath"/>
47     </target>
49     <target name="idl" depends="idl.taskdef">
50         <mkdir dir="${idl.dir}"/>
51         <jacidl srcdir="${idl.dir}" destdir="${gen.dir}" includes="*.idl" helpercompat="jacorb"
52            includepath="${jacorb.dir}/idl/omg" />
53     </target>
55     <target name="compile" depends="idl" >
56         <mkdir dir="${classes.dir}"/>
58         <javac destdir="${classes.dir}" debug="true" includeantruntime="false">
59             <src path="${src.dir}" />
60             <src path="${gen.dir}" />
61             <classpath refid="jacorb.classpath" />
62         </javac>
63     </target>
65     <macrodef name="run-demo" description="executes server and client process concurrently" >
66         <element name="run-server" description="tasks that are used to start the serverprocess" />
67         <element name="run-client" description="tasks that are used to start the clientprocess" />
69         <sequential>
70             <mkdir dir="${tmp.dir}" />
71             <tempfile property="killfile.file" destdir="${tmp.dir}" prefix="kill" />
72             <tempfile property="ior.file" destdir="${tmp.dir}" prefix="server" suffix=".ior" />
74             <parallel>
75                 <sequential>
76                     <run-server />
77                 </sequential>
79                 <sequential>
80                     <waitfor maxwait="30" maxwaitunit="second">
81                         <available file="${ior.file}"/>
82                     </waitfor>
84                     <run-client />
86                     <touch file="${killfile.file}" />
87                 </sequential>
89             </parallel>
90         </sequential>
91     </macrodef>
93     <macrodef name="run-default-server" >
94         <attribute name="classname" />
96         <sequential>
97             <jaco classname="@{classname}" >
98                 <arg value="${ior.file}" />
99                 <arg value="${killfile.file}" />
100             </jaco>
101         </sequential>
102     </macrodef>
104     <macrodef name="run-default-client">
105         <attribute name="classname" />
107         <sequential>
108             <jaco classname="@{classname}" >
109                 <arg value="${ior.file}" />
110             </jaco>
111         </sequential>
112     </macrodef>
115     <target name="clean">
116          <delete dir="${build.dir}"/>
117     </target>
119     <target name="demo" depends="compile" >
120         <run-demo>
121             <run-server>
122                 <run-default-server classname="demo.Server" />
123             </run-server>
125             <run-client>
126                 <run-default-client classname="demo.Client" />
127             </run-client>
128         </run-demo>
129     </target>
130 </project>