hs.hsadmin/hsarback/build.xml

165 lines
5.7 KiB
XML
Raw Normal View History

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" />
2011-05-06 12:28:11 +02:00
<property name="test.home" value="${basedir}/test" />
2010-10-01 21:42:49 +02:00
<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}" />
2011-12-19 16:40:48 +01:00
<delete file="webapp/WEB-INF/web.xml" />
2012-04-05 15:35:31 +02:00
<delete file="webapp/META-INF/context.xml" />
2010-10-01 21:42:49 +02:00
</target>
2011-05-05 16:29:06 +02:00
<target name="deploy" depends="war">
2011-05-05 18:00:25 +02:00
<delete dir="${hsar.deploy.dir}/hsar" />
2011-05-05 16:29:06 +02:00
<copy file="build/hsar.war" todir="${hsar.deploy.dir}" />
2012-09-21 14:16:22 +02:00
<!-- <sleep minutes="2"/> -->
2011-05-05 16:29:06 +02:00
</target>
2011-07-07 15:55:41 +02:00
<target name="jar" depends="enhance">
<jar destfile="build/hsar.jar">
<fileset dir="build/cls"/>
<fileset dir="src">
<include name="**/*.properties"/>
<include name="**/*.jtpl"/>
</fileset>
<fileset dir="conf">
<include name="**/*.xml"/>
</fileset>
</jar>
</target>
2010-10-01 21:42:49 +02:00
<target name="war" depends="enhance">
2012-04-05 15:35:31 +02:00
<copy file="conf/WEB-INF/${target}-web.xml" tofile="webapp/WEB-INF/web.xml">
2011-05-05 17:43:26 +02:00
<filterset>
<filter token="LOGIN_HOST" value="${cas.domain.name}"/>
<filter token="LOGIN_PORT" value="${cas.https.port}"/>
<filter token="CONFIG_HOST" value="${hsar.domain.name}"/>
<filter token="CONFIG_PORT" value="${hsar.https.port}"/>
</filterset>
</copy>
2012-04-05 15:35:31 +02:00
<copy file="conf/META-INF/${target}-context.xml" tofile="webapp/META-INF/context.xml">
2012-04-05 15:23:24 +02:00
</copy>
2012-04-05 15:35:31 +02:00
<war destfile="build/hsar.war" basedir="webapp" needxmlfile="false">
2010-10-01 21:42:49 +02:00
<lib dir="lib">
<include name="**/*.jar"/>
<exclude name="**/servlet*.jar"/>
<exclude name="**/geronimo-jms*.jar"/>
2011-05-17 19:46:03 +02:00
<exclude name="**/geronimo-j2ee-management*.jar"/>
<exclude name="**/activemq*.jar"/>
2010-10-01 21:42:49 +02:00
</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-06 16:18:11 +02:00
<javac srcdir="${src.home}" destdir="${build.home}/cls" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" encoding="UTF8" includeantruntime="false">
2010-10-01 21:42:49 +02:00
<classpath refid="compile.classpath" />
</javac>
</target>
2011-05-06 12:28:11 +02:00
<target name="compile-test" description="tests compilieren" depends="compile">
<mkdir dir="${build.home}" />
<mkdir dir="${build.home}/test" />
2011-05-06 17:19:58 +02:00
<javac srcdir="${test.home}" destdir="${build.home}/test" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" encoding="UTF8" includeantruntime="false">
2011-05-06 12:28:11 +02:00
<classpath refid="compile.classpath" />
<classpath>
<pathelement path="${compile.classpath}"/>
<pathelement location="${build.home}/cls"/>
<pathelement path="/usr/share/java/junit4.jar"/>
</classpath>
</javac>
</target>
2010-10-01 21:42:49 +02:00
<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>
<target name="init-db" description="init empty database">
<sql
2011-05-05 16:29:06 +02:00
classpath="/usr/share/java/postgresql-jdbc3.jar"
driver="org.postgresql.Driver"
2011-12-19 15:10:37 +01:00
url="jdbc:postgresql://${database.host}:5432/${database.name}"
2011-03-25 18:37:16 +01:00
userid="${database.user}" password="${database.password}"
src="database/schema.sql" />
<sql
2011-05-05 16:29:06 +02:00
classpath="/usr/share/java/postgresql-jdbc3.jar"
driver="org.postgresql.Driver"
2011-12-19 15:10:37 +01:00
url="jdbc:postgresql://${database.host}:5432/${database.name}"
2011-03-25 18:37:16 +01:00
userid="${database.user}" password="${database.password}"
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"
2011-12-19 15:10:37 +01:00
url="jdbc:postgresql://${database.host}:5432/${database.name}"
2011-03-25 18:37:16 +01:00
userid="${database.user}" password="${database.password}"
2011-12-19 16:40:48 +01:00
src="database/dropschema.sql" />
2011-03-25 18:37:16 +01:00
</target>
2011-05-06 12:28:11 +02:00
<target name="remote-test" description="inspection of xmlrpc-api" depends="compile-test">
2011-05-06 13:01:58 +02:00
<mkdir dir="${build.home}/junit" />
2011-05-06 12:28:11 +02:00
<junit printsummary="yes" fork="yes">
2011-05-06 15:45:04 +02:00
<jvmarg value="-Djavax.net.ssl.trustStore=${javax.net.ssl.trustStore}"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=${javax.net.ssl.trustStorePassword}"/>
2011-05-06 12:28:11 +02:00
<classpath>
<fileset dir="lib">
<include name="*.jar" />
</fileset>
<pathelement location="${build.home}/cls"/>
<pathelement location="${build.home}/test"/>
<pathelement path="/usr/share/java/junit4.jar"/>
</classpath>
<formatter type="xml"/>
2012-01-04 13:27:05 +01:00
<test name="de.hsadmin.remote.ContinuousIntegrationTest" todir="${build.home}/junit" />
2011-05-06 12:28:11 +02:00
</junit>
</target>
2010-10-01 21:42:49 +02:00
</project>