-
Notifications
You must be signed in to change notification settings - Fork 3
/
ant-derby.xml
52 lines (52 loc) · 1.46 KB
/
ant-derby.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
<project name="Derby">
<!--
Derby home (we use the internal JavaDB of JDK (= Apache Derby)
-->
<property name="derby.home" value="C:\Program Files\Java\jdk1.8.0_131\db" />
<!-- Derby libraries -->
<path id="derby.classpath">
<fileset dir="${derby.home}/lib">
<include name="*.jar" />
</fileset>
</path>
<!-- To start/stop derby server script (macros) -->
<macrodef name="server">
<attribute name="arg" />
<sequential>
<java classname="org.apache.derby.drda.NetworkServerControl">
<arg value="@{arg}" />
<classpath refid="derby.classpath" />
</java>
</sequential>
</macrodef>
<!-- To start the Derby server -->
<target name="server-start">
<server arg="start" />
</target>
<!-- To stop the Derby server -->
<target name="server-stop">
<server arg="shutdown" />
</target>
<!-- To run script (macros) -->
<macrodef name="run">
<attribute name="script" />
<sequential>
<java classname="org.apache.derby.tools.ij" fork="on">
<arg value="@{script}" />
<classpath refid="derby.classpath" />
</java>
</sequential>
</macrodef>
<!-- Creates the DB -->
<target name="run-db-create">
<run script="sql/create-db.sql" />
</target>
<!-- Fills DB with base info -->
<target name="run-db-fill">
<run script="sql/fill-db.sql" />
</target>
<!-- Test-selects stuff from DB -->
<target name="run-select">
<run script="sql/select-test.sql" />
</target>
</project>