javadb/build.xml
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sun, 19 Jul 2009 19:44:48 +0200
changeset 101 176448af80fa
parent 100 a6d2add085d7
child 135 f837cf975e95
permissions -rw-r--r--
Ignore files from the javadb project Do not nerve with class- and derby files committer: Markus Bröker <mbroeker@largo.homelinux.org>

<?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="init, compile">
		<java classname="${package.name}.app.App"
			failonerror="true" fork="yes">
			<classpath refid="classpath" />
			<arg line="${app.host}" />
		</java>
	</target>
</project>