-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
117 lines (103 loc) · 5.06 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
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
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xdb="http://exist-db.org/ant" default="deploy-local" name="pessoa">
<property file="local.properties"/>
<path id="classpath.core">
<fileset dir="${exist-home}/lib">
<include name="*.jar"/>
</fileset>
<pathelement path="${exist-home}/exist-ant-5.3.1.jar"/>
</path>
<typedef resource="org/exist/ant/antlib.xml" uri="http://exist-db.org/ant">
<classpath refid="classpath.core"/>
</typedef>
<target name="deploy-local">
<echo message="Deploying app to local eXist-db."/>
<property file="deploy-local.properties"/>
<!-- Generating zip files from the data -->
<!--
<zip destfile="data/pub.zip" basedir="data/pub/" excludes="dont*.*"/>
<zip destfile="data/doc.zip" basedir="data/doc/" excludes="dont*.*"/>
-->
<xdb:xquery uri="${uri}" queryfile="app/pre-install.xql" user="${user}" password="${password}"/>
<xdb:store uri="${uri}" createcollection="true" createsubcollections="true" user="${user}" password="${password}">
<fileset dir="${corpuspath}">
<include name="*.*"/>
<exclude name="*.xpr"/>
<!-- data: -->
<include name="data/doc/*.*"/>
<include name="data/network/*.*"/>
<exclude name="data/pre1913/*.*"/>
<include name="data/prosa/*.*"/>
<include name="data/pub/*.*"/>
<include name="data/schema/*.*"/>
<include name="data/timelines/*.*"/>
<exclude name="data/todo/*.*"/>
<include name="data/*.*"/>
<!-- general excludes: -->
<exclude name="**/*.properties"/>
<exclude name="**/*.tmpl"/>
<exclude name="**/*.md"/>
<exclude name="**/.gitignore"/>
</fileset>
<fileset dir="./app">
<include name="*.*"/>
<include name="modules/*.*"/>
<include name="page/*.*"/>
<include name="resources/**/*.*"/>
<include name="templates/*.*"/>
<include name="xslt/**/*.*"/>
<exclude name="**/.gitignore"/>
</fileset>
</xdb:store>
<xdb:xquery uri="${uri}" queryfile="app/post-install.xql" user="${user}" password="${password}"/>
<!--
<delete file="data/pub.zip"/>
<delete file="data/doc.zip"/>
-->
</target>
<target name="deploy-remote">
<echo message="Deploying app to remote eXist-db:"/>
<!--<input message="Do you really want to deploy the application (y/n)?" validargs="y,n" addproperty="do.delete"/>
<condition property="do.abort">
<equals arg1="n" arg2="${do.delete}"/>
</condition>
<fail if="do.abort">Deployment aborted by user.</fail>-->
<property file="deploy-remote.properties"/>
<!-- Generating zip files from the data -->
<zip destfile="./app/data/pub.zip" basedir="${corpuspath}/data/pub/" excludes="dont*.*"/>
<zip destfile="./app/data/doc.zip" basedir="${corpuspath}/data/doc/" excludes="dont*.*"/>
<xdb:xquery uri="${uri}" queryfile="app/pre-install.xql" user="${user}" password="${password}"/>
<xdb:store uri="${uri}" createcollection="true" createsubcollections="true" user="${user}" password="${password}">
<fileset dir="${corpuspath}">
<include name="*.*"/>
<exclude name="*.xpr"/>
<!-- data: -->
<include name="data/doc/*.*"/>
<include name="data/network/*.*"/>
<exclude name="data/pre1913/*.*"/>
<include name="data/prosa/*.*"/>
<include name="data/pub/*.*"/>
<include name="data/schema/*.*"/>
<include name="data/timelines/*.*"/>
<exclude name="data/todo/*.*"/>
<include name="data/*.*"/>
<!-- general excludes: -->
<exclude name="**/*.properties"/>
<exclude name="**/*.tmpl"/>
<exclude name="**/*.md"/>
<exclude name="**/.gitignore"/>
</fileset>
<fileset dir="./app">
<include name="*.*"/>
<exclude name="modules/*.*"/>
<include name="page/*.*"/>
<include name="resources/**/*.*"/>
<include name="templates/*.*"/>
<include name="xslt/**/*.*"/>
<exclude name="**/.gitignore"/>
</fileset>
</xdb:store>
<xdb:xquery uri="${uri}" queryfile="app/post-redirect.xql" user="${user}" password="${password}"/>
<xdb:xquery uri="${uri}" queryfile="app/post-install.xql" user="${user}" password="${password}"/>
</target>
</project>