This repository has been archived by the owner on Sep 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
62 lines (51 loc) · 2.6 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?xml version="1.0"?>
<project name="workq" default="default">
<description>
WorkQ build file
</description>
<target name="default" depends="war" description="--> the default target that depends on the real default">
</target>
<target name="war" depends="compile" description="--> packages the web-application for deployment">
<mkdir dir="${dist.dir}" />
<war destfile="${war.file}" basedir="${webcontent}" webxml="${webinf}/web.xml">
<classes dir="${build.classes}" />
</war>
</target>
<target name="compile" depends="init" description="--> compiles Java source files">
<mkdir dir="${build.classes}" />
<javac srcdir="${src.dir}" destdir="${build.classes}" classpathref="build.classpath" />
</target>
<target name="sample-data" depends="init" description="--> inserts sample data into the database">
<sql classpathref="build.classpath" driver="org.postgresql.Driver" userid="postgres" password="postgres" url="jdbc:posgresql:postgres">
<fileset dir="${basedir}/../install/samples" includes="*_data.sql" />
</sql>
</target>
<target name="sample-schema" depends="init" description="--> creates sample tables in the database">
<sql classpathref="build.classpath" driver="org.postgresql.Driver" userid="postgres" password="postgres" url="jdbc:posgresql:postgres">
<fileset dir="${basedir}/../install/samples" includes="*_ddl.sql" />
</sql>
</target>
<target name="release" depends="distclean,war" description="--> builds the final release from scratch" />
<target name="distclean" depends="clean" description="--> removes final artifacts of the build">
<delete dir="${dist.dir}" />
</target>
<target name="clean" depends="init" description="--> removes intermediate artifacts of the build">
<delete dir="${build.classes}" />
</target>
<target name="init">
<property name="webcontent" value="${basedir}/WebContent" />
<property name="webinf" value="${webcontent}/WEB-INF" />
<property name="src.dir" value="${basedir}/src" />
<property name="dist.dir" value="${basedir}/dist" />
<property name="war.filename" value="${ant.project.name}.war" />
<property name="war.file" value="${dist.dir}/${war.filename}" />
<property name="build.dir" value="${basedir}/build" />
<property name="build.classes" value="${build.dir}/classes/" />
<property name="tomcat.home" location="${basedir}/../apache-tomcat-5.5.17" />
<path id="build.classpath">
<fileset dir="${webinf}/lib" includes="*.jar" />
<pathelement location="${tomcat.home}/common/lib/servlet-api.jar" />
<pathelement location="${basedir}/../pgsql/jdbc/postgresql-8.1-405.jdbc3.jar" />
</path>
</target>
</project>