HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2011-05-04 0fbca0921528a0c347e79d99008a9272ce6c1c08
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
36     <target name="war" depends="enhance">
37         <war destfile="build/hsar.war" basedir="webapp">
38             <lib dir="lib">
39                 <include name="**/*.jar"/>
40                 <exclude name="**/servlet*.jar"/>
41                 <exclude name="**/geronimo-jms*.jar"/>
42             </lib>
43             <classes dir="build/cls" />
44             <classes dir="src">
45                 <include name="**/*.properties"/>
726244 46                 <include name="**/*.jtpl"/>
19ea38 47             </classes>
PH 48             <classes dir="conf">
49                 <include name="**/*.xml"/>
50             </classes>
51         </war>
52     </target>
53
54     <target name="compile" description="compilieren">
55         <mkdir dir="${build.home}" />
56         <mkdir dir="${build.home}/cls" />
0fbca0 57         <javac srcdir="${src.home}" destdir="${build.home}/cls" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" encoding="UTF8">
19ea38 58             <classpath refid="compile.classpath" />
PH 59         </javac>
60     </target>
61
62     <target name="enhance" description="openjpa enhancer" depends="compile">
63         <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask">
64             <classpath refid="enhance.classpath"/>
65         </taskdef>
66         <taskdef name="mappingtool" classname="org.apache.openjpa.jdbc.ant.MappingToolTask">
67             <classpath refid="enhance.classpath"/>
68         </taskdef>
69         <openjpac>
70             <classpath refid="enhance.classpath"/>
71         </openjpac>
72         <echo message="Enhancing complete."/>
73     </target>
74
f94bfc 75     <target name="init-db" description="init empty database">
PH 76         <sql
77             classpath="/usr/share/java/postgresql-jdbc3-8.2.jar"
78             driver="org.postgresql.Driver" 
f9c969 79             url="jdbc:postgresql://localhost:5432/${database.name}"
PH 80             userid="${database.user}" password="${database.password}" 
f94bfc 81             src="database/schema.sql" />        
PH 82         <sql
83             classpath="/usr/share/java/postgresql-jdbc3-8.2.jar"
84             driver="org.postgresql.Driver" 
f9c969 85             url="jdbc:postgresql://localhost:5432/${database.name}"
PH 86             userid="${database.user}" password="${database.password}" 
f94bfc 87             src="database/data.sql" />        
PH 88     </target>
89     
f9c969 90     <target name="drop-db" description="make empty database">
PH 91         <sql
92             classpath="/usr/share/java/postgresql-jdbc3-8.2.jar"
93             driver="org.postgresql.Driver" 
94             url="jdbc:postgresql://localhost:5432/${database.name}"
95             userid="${database.user}" password="${database.password}" 
96             src="database/dropschema.sql" />        
97     </target>
98     
19ea38 99 </project>