2 <project name="TAO-JacORB AnyTypeCode interop test" default="compile" basedir=".">
4 <property environment="env"/>
5 <property name="src.dir" value="java"/>
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" />
27 <path id="demo.classpath" >
28 <pathelement location="${classes.dir}" />
29 <pathelement location="${resources.dir}" />
30 <pathelement location="../common/build/classes" />
33 <presetdef name="jaco">
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" />
45 <target name="idl.taskdef">
46 <taskdef name="jacidl" classname="org.jacorb.idl.JacIDL" classpathref="jacorb.classpath"/>
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" />
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" />
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" />
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" />
80 <waitfor maxwait="30" maxwaitunit="second">
81 <available file="${ior.file}"/>
86 <touch file="${killfile.file}" />
93 <macrodef name="run-default-server" >
94 <attribute name="classname" />
97 <jaco classname="@{classname}" >
98 <arg value="${ior.file}" />
99 <arg value="${killfile.file}" />
104 <macrodef name="run-default-client">
105 <attribute name="classname" />
108 <jaco classname="@{classname}" >
109 <arg value="${ior.file}" />
115 <target name="clean">
116 <delete dir="${build.dir}"/>
119 <target name="demo" depends="compile" >
122 <run-default-server classname="demo.Server" />
126 <run-default-client classname="demo.Client" />