HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2011-05-05 a63757a5f4a3ca46788ae251edfe978c7db03742
commit | author | age
19ea38 1 <?xml version="1.0" encoding="UTF-8"?>
PH 2 <project name="hsarweb" default="war">
3
4     <property name="build.home" value="${basedir}/build" />
5     <property name="lib.home" value="${basedir}/lib" />
6     <property name="conf.home" value="${basedir}/conf" />
7     <property name="src.home" value="${basedir}/src" />
8     <property name="dist.home" value="${basedir}/dist" />
9
f9c969 10     <property file="${user.home}/.hsar.ant.properties" />
PH 11     
19ea38 12     <!-- Optionen  für Java-Compiler-->
PH 13     <property name="compile.debug" value="true" />
14     <property name="compile.deprecation" value="true" />
15     <property name="compile.optimize" value="true" />
16
17     <path id="compile.classpath">
18         <fileset dir="lib">
19             <include name="*.jar" />
20         </fileset>
21     </path>
22
23     <path id="enhance.classpath">
24         <fileset dir="lib">
25             <include name="*.jar" />
26         </fileset>
27         <dirset dir="conf"/>
28         <dirset dir="${build.home}"/>
29     </path>
30
31     <target name="clean" description="aufräumen">
32         <delete dir="${build.home}" />
33         <delete dir="${dist.home}" />
34     </target>
35
a63757 36     <target name="deploy" depends="war">
PH 37         <copy file="build/hsar.war" todir="${hsar.deploy.dir}" />
38     </target>
39
19ea38 40     <target name="war" depends="enhance">
PH 41         <war destfile="build/hsar.war" basedir="webapp">
42             <lib dir="lib">
43                 <include name="**/*.jar"/>
44                 <exclude name="**/servlet*.jar"/>
45                 <exclude name="**/geronimo-jms*.jar"/>
46             </lib>
47             <classes dir="build/cls" />
48             <classes dir="src">
49                 <include name="**/*.properties"/>
726244 50                 <include name="**/*.jtpl"/>
19ea38 51             </classes>
PH 52             <classes dir="conf">
53                 <include name="**/*.xml"/>
54             </classes>
55         </war>
56     </target>
57
58     <target name="compile" description="compilieren">
59         <mkdir dir="${build.home}" />
60         <mkdir dir="${build.home}/cls" />
0fbca0 61         <javac srcdir="${src.home}" destdir="${build.home}/cls" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" encoding="UTF8">
19ea38 62             <classpath refid="compile.classpath" />
PH 63         </javac>
64     </target>
65
66     <target name="enhance" description="openjpa enhancer" depends="compile">
67         <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask">
68             <classpath refid="enhance.classpath"/>
69         </taskdef>
70         <taskdef name="mappingtool" classname="org.apache.openjpa.jdbc.ant.MappingToolTask">
71             <classpath refid="enhance.classpath"/>
72         </taskdef>
73         <openjpac>
74             <classpath refid="enhance.classpath"/>
75         </openjpac>
76         <echo message="Enhancing complete."/>
77     </target>
78
f94bfc 79     <target name="init-db" description="init empty database">
PH 80         <sql
a63757 81             classpath="/usr/share/java/postgresql-jdbc3.jar"
f94bfc 82             driver="org.postgresql.Driver" 
f9c969 83             url="jdbc:postgresql://localhost:5432/${database.name}"
PH 84             userid="${database.user}" password="${database.password}" 
f94bfc 85             src="database/schema.sql" />        
PH 86         <sql
a63757 87             classpath="/usr/share/java/postgresql-jdbc3.jar"
f94bfc 88             driver="org.postgresql.Driver" 
f9c969 89             url="jdbc:postgresql://localhost:5432/${database.name}"
PH 90             userid="${database.user}" password="${database.password}" 
f94bfc 91             src="database/data.sql" />        
PH 92     </target>
93     
f9c969 94     <target name="drop-db" description="make empty database">
PH 95         <sql
a63757 96             classpath="/usr/share/java/postgresql-jdbc3.jar"
f9c969 97             driver="org.postgresql.Driver" 
PH 98             url="jdbc:postgresql://localhost:5432/${database.name}"
99             userid="${database.user}" password="${database.password}" 
100             src="database/dropschema.sql" />        
101     </target>
102     
19ea38 103 </project>