2010-10-01 21:42:49 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project name="hsarweb" default="war">
|
|
|
|
|
|
|
|
<property name="build.home" value="${basedir}/build" />
|
|
|
|
<property name="lib.home" value="${basedir}/lib" />
|
|
|
|
<property name="conf.home" value="${basedir}/conf" />
|
|
|
|
<property name="src.home" value="${basedir}/src" />
|
|
|
|
<property name="dist.home" value="${basedir}/dist" />
|
|
|
|
|
2011-03-25 18:37:16 +01:00
|
|
|
<property file="${user.home}/.hsar.ant.properties" />
|
|
|
|
|
2010-10-01 21:42:49 +02:00
|
|
|
<!-- Optionen für Java-Compiler-->
|
|
|
|
<property name="compile.debug" value="true" />
|
|
|
|
<property name="compile.deprecation" value="true" />
|
|
|
|
<property name="compile.optimize" value="true" />
|
|
|
|
|
|
|
|
<path id="compile.classpath">
|
|
|
|
<fileset dir="lib">
|
|
|
|
<include name="*.jar" />
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="enhance.classpath">
|
|
|
|
<fileset dir="lib">
|
|
|
|
<include name="*.jar" />
|
|
|
|
</fileset>
|
|
|
|
<dirset dir="conf"/>
|
|
|
|
<dirset dir="${build.home}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="clean" description="aufräumen">
|
|
|
|
<delete dir="${build.home}" />
|
|
|
|
<delete dir="${dist.home}" />
|
|
|
|
</target>
|
|
|
|
|
2011-05-05 16:29:06 +02:00
|
|
|
<target name="deploy" depends="war">
|
|
|
|
<copy file="build/hsar.war" todir="${hsar.deploy.dir}" />
|
|
|
|
</target>
|
|
|
|
|
2010-10-01 21:42:49 +02:00
|
|
|
<target name="war" depends="enhance">
|
|
|
|
<war destfile="build/hsar.war" basedir="webapp">
|
|
|
|
<lib dir="lib">
|
|
|
|
<include name="**/*.jar"/>
|
|
|
|
<exclude name="**/servlet*.jar"/>
|
|
|
|
<exclude name="**/geronimo-jms*.jar"/>
|
|
|
|
</lib>
|
|
|
|
<classes dir="build/cls" />
|
|
|
|
<classes dir="src">
|
|
|
|
<include name="**/*.properties"/>
|
2010-10-05 21:42:07 +02:00
|
|
|
<include name="**/*.jtpl"/>
|
2010-10-01 21:42:49 +02:00
|
|
|
</classes>
|
|
|
|
<classes dir="conf">
|
|
|
|
<include name="**/*.xml"/>
|
|
|
|
</classes>
|
|
|
|
</war>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" description="compilieren">
|
|
|
|
<mkdir dir="${build.home}" />
|
|
|
|
<mkdir dir="${build.home}/cls" />
|
2011-05-04 18:17:22 +02:00
|
|
|
<javac srcdir="${src.home}" destdir="${build.home}/cls" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" encoding="UTF8">
|
2010-10-01 21:42:49 +02:00
|
|
|
<classpath refid="compile.classpath" />
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="enhance" description="openjpa enhancer" depends="compile">
|
|
|
|
<taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask">
|
|
|
|
<classpath refid="enhance.classpath"/>
|
|
|
|
</taskdef>
|
|
|
|
<taskdef name="mappingtool" classname="org.apache.openjpa.jdbc.ant.MappingToolTask">
|
|
|
|
<classpath refid="enhance.classpath"/>
|
|
|
|
</taskdef>
|
|
|
|
<openjpac>
|
|
|
|
<classpath refid="enhance.classpath"/>
|
|
|
|
</openjpac>
|
|
|
|
<echo message="Enhancing complete."/>
|
|
|
|
</target>
|
|
|
|
|
2011-03-25 17:47:54 +01:00
|
|
|
<target name="init-db" description="init empty database">
|
|
|
|
<sql
|
2011-05-05 16:29:06 +02:00
|
|
|
classpath="/usr/share/java/postgresql-jdbc3.jar"
|
2011-03-25 17:47:54 +01:00
|
|
|
driver="org.postgresql.Driver"
|
2011-03-25 18:37:16 +01:00
|
|
|
url="jdbc:postgresql://localhost:5432/${database.name}"
|
|
|
|
userid="${database.user}" password="${database.password}"
|
2011-03-25 17:47:54 +01:00
|
|
|
src="database/schema.sql" />
|
|
|
|
<sql
|
2011-05-05 16:29:06 +02:00
|
|
|
classpath="/usr/share/java/postgresql-jdbc3.jar"
|
2011-03-25 17:47:54 +01:00
|
|
|
driver="org.postgresql.Driver"
|
2011-03-25 18:37:16 +01:00
|
|
|
url="jdbc:postgresql://localhost:5432/${database.name}"
|
|
|
|
userid="${database.user}" password="${database.password}"
|
2011-03-25 17:47:54 +01:00
|
|
|
src="database/data.sql" />
|
|
|
|
</target>
|
|
|
|
|
2011-03-25 18:37:16 +01:00
|
|
|
<target name="drop-db" description="make empty database">
|
|
|
|
<sql
|
2011-05-05 16:29:06 +02:00
|
|
|
classpath="/usr/share/java/postgresql-jdbc3.jar"
|
2011-03-25 18:37:16 +01:00
|
|
|
driver="org.postgresql.Driver"
|
|
|
|
url="jdbc:postgresql://localhost:5432/${database.name}"
|
|
|
|
userid="${database.user}" password="${database.password}"
|
|
|
|
src="database/dropschema.sql" />
|
|
|
|
</target>
|
|
|
|
|
2010-10-01 21:42:49 +02:00
|
|
|
</project>
|