-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
executable file
·58 lines (48 loc) · 3.19 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
<project name="usgin-geoportal" default="config" basedir=".">
<property file="config.properties"/>
<property name="gpt.dir" value="WEB-INF/classes/gpt/config"/>
<property name="context.dir" value="META-INF"/>
<property name="driver.dir" value="postgres-drivers"/>
<property name="lib.dir" value="WEB-INF/lib"/>
<property name="db.connection.string" value="jdbc:postgresql://${db.host}:${db.port}/${db.name}"/>
<target name="config" description="replace configuration parameters in Geoportal files">
<copy file="META-INF/context-template.xml" tofile="${context.dir}/context.xml"/>
<replace file="${context.dir}/context.xml" token="$(db.connection.string)" value="${db.connection.string}"/>
<replace file="${context.dir}/context.xml" token="$(db.username)" value="${db.username}"/>
<replace file="${context.dir}/context.xml" token="$(db.password)" value="${db.password}"/>
<copy file="WEB-INF/classes/gpt/config/gpt-template.xml" tofile="${gpt.dir}/gpt.xml"/>
<replace file="${gpt.dir}/gpt.xml" token="$(lucene.index.location)" value="${lucene.index.location}"/>
<replace file="${gpt.dir}/gpt.xml" token="$(mail.host)" value="${mail.host}"/>
<replace file="${gpt.dir}/gpt.xml" token="$(mail.port)" value="${mail.port}"/>
<replace file="${gpt.dir}/gpt.xml" token="$(mail.username)" value="${mail.username}"/>
<replace file="${gpt.dir}/gpt.xml" token="$(mail.password)" value="${mail.password}"/>
<replace file="${gpt.dir}/gpt.xml" token="$(mail.emailAddress)" value="${mail.emailAddress}"/>
<replace file="${gpt.dir}/gpt.xml" token="$(admin.name)" value="${admin.name}"/>
<replace file="${gpt.dir}/gpt.xml" token="$(admin.password)" value="${admin.password}"/>
<condition property="postgres.driver.file" value="postgresql-9.2-1002.jdbc4.jar">
<equals arg1="${db.postgres.version}" arg2="9.2"/>
</condition>
<condition property="postgres.driver.file" value="postgresql-9.1-903.jdbc4.jar">
<equals arg1="${db.postgres.version}" arg2="9.1"/>
</condition>
<condition property="postgres.driver.file" value="postgresql-9.0-802.jdbc4.jar">
<equals arg1="${db.postgres.version}" arg2="9.0"/>
</condition>
<condition property="postgres.driver.file" value="postgresql-8.4-703.jdbc4.jar">
<equals arg1="${db.postgres.version}" arg2="8.4"/>
</condition>
<condition property="postgres.driver.file" value="postgresql-8.3-607.jdbc4.jar">
<equals arg1="${db.postgres.version}" arg2="8.3"/>
</condition>
<condition property="postgres.driver.file" value="postgresql-8.2-512.jdbc4.jar">
<equals arg1="${db.postgres.version}" arg2="8.2"/>
</condition>
<copy file="${driver.dir}/${postgres.driver.file}" tofile="${lib.dir}/${postgres.driver.file}"/>
<exec executable="postgres-scripts/create_schema_linuxpg.sh">
<arg value="${db.host}"/>
<arg value="${db.port}"/>
<arg value="${db.name}"/>
<arg value="${db.username}"/>
</exec>
</target>
</project>