javadb/build.xml
author Markus Brökers <mbroeker@largo.homelinux.org>
Sun, 29 Aug 2010 16:36:19 +0200
changeset 145 63a5269fb113
parent 135 f837cf975e95
permissions -rw-r--r--
removed code without effect time_t represents the number of seconds since the birth of unix. to deal with microseconds and friends, use a) gettimeofday b) struct timeval

<?xml version="1.0"?>
<project name="App" basedir="." default="debug">
	<property name="project" value="App" />
	<property name="package.name" value="org.homelinux.largo" />
	<property name="package.dir" value="org/homelinux/largo" />
	<property name="jar.file" value="bin/app.jar" />
	<property name="app.host" value="-Dorg.omg.CORBA.ORBInitialHost=largo.homelinux.org" />
	<property file="targets/${os.name}.properties" />

	<path id="classpath">
		<pathelement location="${app.server}/lib/javaee.jar" />
		<pathelement location="${app.server}/lib/appserv-rt.jar" />
		<pathelement location="${app.server}/lib/appserv-admin.jar" />
		<pathelement location="${app.server}/lib/install/applications/jmsra/imqjmsra.jar" />
		<pathelement location="${app.server}/javadb/lib/derbyrun.jar" />
		<pathelement location="." />
	</path>

	<!-- Targets -->
	<target name="clean">
		<echo message="deleting all class- and jar-files in ${package.dir} tree" />
		<delete>
			<fileset dir="${package.dir}" includes="**/*.class" />
			<fileset dir="." includes="**/*.*~" defaultexcludes="no" />
			<fileset dir="." includes="**/*.log" />
		</delete>
		<delete  dir="clubstatistik" />
	</target>

	<target name="init" >
		<echo message="creating initial database" />
		<exec executable="${native.shell}">
			<env key="DERBY_HOME" value="${app.server}/javadb/" />
			<arg line="${native.switch} ${app.server}/javadb/bin/ij sql/euroleague.sql" />
		</exec>
		<mkdir dir="clubstatistik" />
	</target>

	<target name="compile">
		<echo message="compiling ${package.dir} tree." />
		<javac source="1.5" target="1.5" srcdir="${package.dir}"
			sourcepath="${basedir}" debug="on">
			<classpath refid="classpath" />
		</javac>
	</target>

	<target name="debug" depends="compile">
		<echo message="Use ant init to create an initial database." />
		<java classname="${package.name}.app.App"
			failonerror="true" fork="yes">
			<classpath refid="classpath" />
			<jvmarg line="-ea" />
			<arg line="${app.host}" />
		</java>
	</target>
</project>