[19e22f]: / dist / make-dist-database.xml  Maximize  Restore  History

Download this file

215 lines (191 with data), 9.3 kB

  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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse.ant.import?>
<project basedir="." default="dist" name="dist">
<!-- P R O P E R T I E S -->
<property name="version" value="3.0.0" />
<property name="dir.project" location="." />
<property name="dir.data" location="data" />
<property name="dir.doc" location="doc" />
<property name="dir.restore" location="restore" />
<property name="dir.legal" location="legal" />
<property name="dir.logs" location="../run/logs" />
<property name="dir.stats" location="../run/stats" />
<property name="dir.release" location="release" />
<!-- F I L E S E T S -->
<fileset id="fs.doc" dir="${dir.doc}">
<include name="*html" />
<include name="*css" />
<include name="images/*gif" />
<include name="images/*png" />
<include name="images/*svg" />
</fileset>
<fileset id="fs.restore.mysql" dir="${dir.restore}">
<include name="restore-mysql.bat" />
<include name="restore-mysql.sh" />
</fileset>
<fileset id="fs.restore.postgresql" dir="${dir.restore}">
<include name="restore-postgresql.bat" />
<include name="restore-postgresql.sh" />
</fileset>
<fileset id="fs.restore.standard" dir="${dir.restore}">
<include name="restore-mysql.bat" />
<include name="restore-mysql.sh" />
</fileset>
<!-- T A R G E T S -->
<!-- input -->
<target name="input-runargs" unless="args" description="prompts for command line arguments if necessary">
<input addProperty="dbms" message="dbms (mysql|postgresql|standard):" />
<echo>dbms=${dbms}</echo>
<input addProperty="wn.data.version" message="WordNet data (30,31,31_snapshot):" />
<echo>dbtag=${wn.data.version}</echo>
<property name="legacy.data.version" value="${wn.data.version}" />
<property name="vn.data.version" value="32" />
<property name="bnc.data.version" value="01" />
<property name="sumo.data.version" value="202-cvs-199" />
<property name="xwn.data.version" value="11" />
<property name="glf.data.version" value="2006" />
<property name="ilfwn.data.version" value="02" />
</target>
<target name="makestamp">
<tstamp>
<format property="touch.time" pattern="EEE MMM d HH:mm:ss z yyyy" unit="hour" locale="en" />
</tstamp>
</target>
<target name="dist" depends="makestamp,input-runargs">
<pack dbtype="${dbms}" domain="wn" version="${version}" dbtag="${wn.data.version}" domainversion="${wn.data.version}" />
<pack dbtype="${dbms}" domain="legacy" version="${version}" dbtag="${wn.data.version}" domainversion="${legacy.data.version}" />
<pack dbtype="${dbms}" domain="vn" version="${version}" dbtag="${wn.data.version}" domainversion="${vn.data.version}" />
<pack dbtype="${dbms}" domain="bnc" version="${version}" dbtag="${wn.data.version}" domainversion="${bnc.data.version}" />
<pack dbtype="${dbms}" domain="sumo" version="${version}" dbtag="${wn.data.version}" domainversion="${sumo.data.version}" />
<pack dbtype="${dbms}" domain="xwn" version="${version}" dbtag="${wn.data.version}" domainversion="${xwn.data.version}" />
<pack dbtype="${dbms}" domain="glf" version="${version}" dbtag="${wn.data.version}" domainversion="${glf.data.version}" />
<pack dbtype="${dbms}" domain="ilfwn" version="${version}" dbtag="${wn.data.version}" domainversion="${ilfwn.data.version}" />
<pack dbtype="${dbms}" domain="logs" version="${version}" dbtag="${wn.data.version}" domainversion="${wn.data.version}" />
<echo message="done" />
</target>
<target name="dump" depends="makestamp,input-runargs">
<echo message="version ${version}" />
<echo message="stamp ${DSTAMP}" />
<echo message="logs ${dir.logs}/" />
<echo message="release ${dir.release}/" />
<dumpfs dbtype="${dbms}" domain="wn" version="${version}" dbtag="${wn.data.version}" />
<dumpfs dbtype="${dbms}" domain="legacy" version="${version}" dbtag="${wn.data.version}" />
<dumpfs dbtype="${dbms}" domain="vn" version="${version}" dbtag="${wn.data.version}" />
<dumpfs dbtype="${dbms}" domain="bnc" version="${version}" dbtag="${wn.data.version}" />
<dumpfs dbtype="${dbms}" domain="sumo" version="${version}" dbtag="${wn.data.version}" />
<dumpfs dbtype="${dbms}" domain="xwn" version="${version}" dbtag="${wn.data.version}" />
<dumpfs dbtype="${dbms}" domain="glf" version="${version}" dbtag="${wn.data.version}" />
<dumpfs dbtype="${dbms}" domain="ilfwn" version="${version}" dbtag="${wn.data.version}" />
<dumpfs dbtype="${dbms}" domain="logs" version="${version}" dbtag="${wn.data.version}" />
<echo-fileset filesetref="fs.doc" />
<echo-fileset filesetref="fs.restore.mysql" />
<echo-fileset filesetref="fs.restore.postgresql" />
</target>
<!-- M A C R O S -->
<macrodef name="definefs">
<attribute name="dbtype" />
<attribute name="dbtag" />
<attribute name="version" />
<attribute name="domain" />
<sequential>
<echo message="define fs.@{dbtype}.@{domain}" />
<fileset id="fs.@{dbtype}.@{domain}.@{dbtag}.sql" dir="${dir.data}/@{dbtype}/@{dbtag}">
<include name="**@{dbtype}-@{domain}-schema.sql" />
<include name="**@{dbtype}-@{domain}-data.sql" />
<include name="**@{dbtype}-@{domain}-constrain.sql" />
<include name="**@{dbtype}-@{domain}-unconstrain.sql" />
<include name="**@{dbtype}-@{domain}-views.sql" />
</fileset>
<fileset id="fs.@{dbtype}.@{domain}.@{dbtag}.legal" dir="${dir.legal}">
<include name="README-@{domain}.txt" />
<include name="LICENSE-@{domain}.txt" />
</fileset>
<fileset id="fs.@{dbtype}.@{domain}.@{dbtag}.logs" dir="${dir.logs}/@{dbtype}/@{dbtag}" erroronmissingdir="false">
<include name="@{domain}*log" />
</fileset>
<fileset id="fs.@{dbtype}.@{domain}.@{dbtag}.utils" dir="${dir.project}/sql">
<include name="@{dbtype}-@{domain}*query.sql" />
<include name="renames/@{dbtype}-@{domain}*renames.sql" />
<include name="utils/@{dbtype}-@{domain}*.sql" />
</fileset>
<fileset id="fs.@{dbtype}.@{domain}.@{dbtag}.stats" dir="${dir.stats}">
<include name="stats-@{dbtag}.html" />
<include name="stats-logs-@{dbtag}.html" />
</fileset>
</sequential>
</macrodef>
<macrodef name="pack">
<attribute name="dbtype" />
<attribute name="dbtag" />
<attribute name="version" />
<attribute name="domain" />
<attribute name="domainversion" />
<sequential>
<definefs dbtype="@{dbtype}" domain="@{domain}" version="@{version}" dbtag="@{dbtag}" />
<mkdir dir="${dir.release}" />
<echo message="jar @{dbtype}-@{version}-@{domain}-@{domainversion}.zip" />
<jar destfile="${dir.release}/@{dbtype}-@{version}-@{dbtag}-@{domain}-@{domainversion}.zip" update="no">
<fileset refid="fs.@{dbtype}.@{domain}.@{dbtag}.sql" />
<fileset refid="fs.restore.@{dbtype}" />
<mappedresources>
<fileset refid="fs.@{dbtype}.@{domain}.@{dbtag}.legal" />
<globmapper from="*" to="legal/*" />
</mappedresources>
<mappedresources>
<fileset refid="fs.@{dbtype}.@{domain}.@{dbtag}.logs" />
<globmapper from="*" to="logs/*" />
</mappedresources>
<mappedresources>
<fileset refid="fs.@{dbtype}.@{domain}.@{dbtag}.utils" />
<globmapper from="*" to="utils/*" />
</mappedresources>
<mappedresources>
<fileset refid="fs.@{dbtype}.@{domain}.@{dbtag}.stats" />
<globmapper from="*" to="stats/*" />
</mappedresources>
<mappedresources>
<fileset refid="fs.doc" />
<globmapper from="*" to="doc/*" />
</mappedresources>
<manifest>
<section name="wordnet/sql/data">
<attribute name="Specification-Title" value="SQL-@{dbtype}-@{domain}-@{version}-@{dbtag}-@{domainversion}" />
<attribute name="Implementation-Title" value="SQL-@{dbtype}-@{domain}-@{version}-@{dbtag}-@{domainversion}" />
<attribute name="Specification-Version" value="@{dbtag}-@{domainversion}" />
<attribute name="Implementation-Version" value="@{version}-@{dbtag}-@{domainversion}-${DSTAMP}" />
<attribute name="Specification-Vendor" value="Bernard Bou, bbou@ac-toulouse.fr" />
<attribute name="Implementation-Vendor" value="Bernard Bou, bbou@ac-toulouse.fr" />
<attribute name="Built-By" value="Bernard Bou, bbou@ac-toulouse.fr" />
</section>
</manifest>
</jar>
</sequential>
</macrodef>
<macrodef name="dumpfs">
<attribute name="dbtype" />
<attribute name="domain" />
<attribute name="version" />
<attribute name="dbtag" />
<sequential>
<definefs dbtype="@{dbtype}" domain="@{domain}" version="@{version}" dbtag="@{dbtag}" />
<echo message="[filesets] for @{dbtype}.@{domain}" />
<echo-fileset filesetref="fs.@{dbtype}.@{domain}.@{dbtag}.sql" />
<echo-fileset filesetref="fs.@{dbtype}.@{domain}.@{dbtag}.legal" />
<echo-fileset filesetref="fs.@{dbtype}.@{domain}.@{dbtag}.logs" />
<echo-fileset filesetref="fs.@{dbtype}.@{domain}.@{dbtag}.utils" />
<echo-fileset filesetref="fs.@{dbtype}.@{domain}.@{dbtag}.stats" />
</sequential>
</macrodef>
<macrodef name="echo-fileset">
<attribute name="filesetref" />
<sequential>
<pathconvert pathsep="${line.separator}" property="@{filesetref}.echopath">
<path>
<fileset refid="@{filesetref}" />
</path>
</pathconvert>
<echo>[fileset] @{filesetref}</echo>
<echo>${@{filesetref}.echopath}</echo>
</sequential>
</macrodef>
</project>