-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
63 lines (53 loc) · 1.74 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
62
<project name="shop" default="init" basedir=".">
<import file="build-properties.xml" />
<target name="init">
<mkdir dir="${web-inf}/classes" />
<mkdir dir="${classes}" />
<mkdir dir="${web-inf}/lib" />
</target>
<target name="compile">
<javac srcdir="${src}" destdir="${classes}" includeantruntime="no" classpath="${servlet-api}" />
</target>
<target name="prepare-tomcat-file-structure">
<!-- copy *.jsp files -->
<copy file="${web}/default.jsp" todir="${shop-dir}" />
<copy todir="${web-inf}">
<fileset dir="${web}">
<exclude name="default.jsp" />
</fileset>
</copy>
<!-- copy web.xml file -->
<copy file="${etc}/web.xml" todir="${web-inf}" />
<!-- copy *.class files -->
<copy todir="${web-inf}/classes">
<fileset dir="${classes}" />
</copy>
<!-- copy lib -->
<copy todir="${web-inf}/lib">
<fileset dir="${lib}" />
</copy>
</target>
<target name="create-db-tables">
<sql driver="${DBDRIVER}" url="${DBURLNEWDB}" userid="${DBUSER}"
password="${DBPASSWORD}" delimiter="${DBDELIMITER}"
classpathref="CLASSPATH">
<transaction src="${sql-file}" />
</sql>
</target>
<target name="move-file-structure">
<move file="${DBNAME}" todir="${tomcat}" />
<move file="webapps" todir="${tomcat}" />
</target>
<target name="setup">
<antcall target="init" />
<antcall target="compile" />
<antcall target="prepare-tomcat-file-structure" />
<antcall target="create-db-tables" />
<antcall target="move-file-structure" />
</target>
<target name="clean">
<delete dir="${tomcat}/${DBNAME}" />
<delete dir="${tomcat}/webapps/shop" />
<delete dir="${basedir}" />
</target>
</project>