forked from CBSR-Biobank/biobank
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-tools.xml
126 lines (117 loc) · 4.28 KB
/
build-tools.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?xml version="1.0" encoding="UTF-8"?>
<project name="biobank-tools" basedir=".">
<property file="build.properties" />
<property name="tools.build.dir" value="${eclipse.proj.dir.tools}/output" />
<target name="tools-prepare">
<mkdir dir="${tools.build.dir}" />
</target>
<target name="tools-compile" depends="build-common-project,tools-prepare" >
<copy includeemptydirs="false"
todir="${tools.build.dir}" overwrite="true">
<fileset dir="${eclipse.proj.dir.tests}/src">
<exclude name="**/*.launch" />
<exclude name="**/*.java" />
</fileset>
</copy>
<javac destdir="${tools.build.dir}"
debug="true"
debuglevel="lines,source"
includeantruntime="false">
<src path="${eclipse.proj.dir.tools}/src" />
<classpath>
<pathelement location="${eclipse.proj.dir.common}/output" />
<fileset dir="${eclipse.proj.dir.tools}/lib">
<include name="*.jar" />
</fileset>
</classpath>
<classpath refid="biobank.common.build.classpath" />
</javac>
</target>
<path id="tools.run.classpath">
<fileset refid="biobank.common.server.build.classpath" />
<fileset refid="biobank.common.client.build.classpath" />
<pathelement location="${eclipse.proj.dir.common}/output" />
<pathelement location="${tools.build.dir}" />
<pathelement location="${eclipse.proj.dir.tools}/conf" />
<pathelement location="${eclipse.proj.dir.common}/conf" />
<fileset dir="${eclipse.proj.dir.tools}/lib">
<include name="*.jar" />
</fileset>
</path>
<target name="clean-tools">
<delete dir="${tools.build.dir}" />
</target>
<target name="test-config-create"
depends="tools-compile"
description="creates a testing configuration in the database. Uses db.properties to
connect to the database.">
<java classname="edu.ualberta.med.biobank.tools.testconfig.TestConfigCreate"
fork="true">
<sysproperty key="db.properties" value="db.properties"/>
<!--arg value="-h"/-->
<classpath refid="tools.run.classpath" />
</java>
</target>
<target name="server-maintenance-mode-query"
depends="tools-compile"
description="displays the current state for the servers' maintenance mode.">
<input message="Enter host name"
addProperty="host.name"
defaultValue="localhost" />
<input message="Enter host port"
addProperty="host.port"
defaultValue="8443" />
<input message="Enter user name"
addProperty="biobank.user.name"
defaultValue="testuser" />
<input message="Enter user password"
addProperty="biobank.user.password"
defaultValue="">
<handler type="secure" />
</input>
<java classname="edu.ualberta.med.biobank.tools.maintenancemode.MaintenanceModeTool"
fork="true">
<arg value="--hostname" />
<arg value="${host.name}" />
<arg value="--port" />
<arg value="${host.port}" />
<arg value="--user" />
<arg value="${biobank.user.name}" />
<arg value="--password" />
<arg value="${biobank.user.password}" />
<arg value="query" />
<classpath refid="tools.run.classpath" />
</java>
</target>
<target name="server-maintenance-mode-toggle"
depends="tools-compile"
description="toggles the servers' maintenance mode.">
<input message="Enter host name"
addProperty="host.name"
defaultValue="localhost" />
<input message="Enter host port"
addProperty="host.port"
defaultValue="8443" />
<input message="Enter user name"
addProperty="biobank.user.name"
defaultValue="testuser" />
<input message="Enter user password"
addProperty="biobank.user.password"
defaultValue="">
<handler type="secure" />
</input>
<java classname="edu.ualberta.med.biobank.tools.maintenancemode.MaintenanceModeTool"
fork="true">
<arg value="--hostname" />
<arg value="${host.name}" />
<arg value="--port" />
<arg value="${host.port}" />
<arg value="--user" />
<arg value="${biobank.user.name}" />
<arg value="--password" />
<arg value="${biobank.user.password}" />
<arg value="toggle" />
<classpath refid="tools.run.classpath" />
</java>
</target>
</project>