build-example.xml 1.88 KB
Newer Older
1 2 3 4
<!--
	This build file is intended to be included
	from a build.xml file in each example directory.
-->
5
<project name="example">
6
	<property name="build.sysclasspath" value="ignore" />
7
	<dirname property="examples.basedir" file="${ant.file.example}" />
8

9
	<property name="jvmarg.verify" value="-verify" />
10
	<property file="${examples.basedir}/build-override.properties" />
11 12 13
	<property file="${examples.basedir}/build.properties" />

	<path id="inst.classpath">
14 15 16
		<pathelement location="${disl.server.path}" />
		<pathelement location="${shvm.server.path}" />
		<pathelement location="${shvm.dispatch.path}" />
17 18 19
	</path>


20
	<target name="build-app" description="Compiles and packages the application.">
21 22
		<mkdir dir="${build.app}" />
		<javac srcdir="${src.app}" destdir="${build.app}" debug="true" includeAntRuntime="false" />
23 24

		<jar destfile="${app.path}" basedir="${build.app}">
25 26 27 28 29 30
			<manifest>
				<attribute name="Main-Class" value="Main" />
			</manifest>
		</jar>
	</target>

31
	<target name="build-inst" description="Compiles and packages the instrumentation.">
32 33 34 35 36
		<mkdir dir="${build.inst}" />
		<javac srcdir="${src.inst}" destdir="${build.inst}" debug="true" includeAntRuntime="false">
			<classpath refid="inst.classpath" />
		</javac>

37
		<jar destfile="${inst.path}" basedir="${build.inst}" excludes="MANIFEST.MF" manifest="${src.inst}/MANIFEST.MF" />
38 39 40
	</target>


41
	<target name="build" depends="build-app,build-inst" />
42 43 44


	<target name="run" depends="build">
45 46 47
		<exec executable="${disl.launcher.path}">
			<arg value="-d" />
			<arg value="${disl.home}" />
48 49 50 51
			<arg value="-cse" />
			<!-- <arg value="-c_out=client.out" /> -->
			<!-- <arg value="-e_out=evaluation.out" /> -->
			<arg value="--" />
52
			<arg value="${inst.path}" />
53
			<arg value="${jvmarg.verify}" />
54
			<arg value="-jar" />
55 56
			<arg value="${app.path}" />
		</exec>
57 58 59 60
	</target>


	<target name="clean">
61
		<delete dir="${build.dir}" />
62 63
	</target>
</project>