forked from dermotte/LIRE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
268 lines (243 loc) · 10.9 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
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!--
~ This file is part of the LIRE project: http://www.semanticmetadata.net/lire
~ LIRE is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or
~ (at your option) any later version.
~
~ LIRE is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with LIRE; if not, write to the Free Software
~ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
~
~ We kindly ask you to refer the any or one of the following publications in
~ any publication mentioning or employing Lire:
~
~ Lux Mathias, Savvas A. Chatzichristofis. Lire: Lucene Image Retrieval –
~ An Extensible Java CBIR Library. In proceedings of the 16th ACM International
~ Conference on Multimedia, pp. 1085-1088, Vancouver, Canada, 2008
~ URL: http://doi.acm.org/10.1145/1459359.1459577
~
~ Lux Mathias. Content Based Image Retrieval with LIRE. In proceedings of the
~ 19th ACM International Conference on Multimedia, pp. 735-738, Scottsdale,
~ Arizona, USA, 2011
~ URL: http://dl.acm.org/citation.cfm?id=2072432
~
~ Mathias Lux, Oge Marques. Visual Information Retrieval using Java and LIRE
~ Morgan & Claypool, 2013
~ URL: http://www.morganclaypool.com/doi/abs/10.2200/S00468ED1V01Y201301ICR025
~
~ Copyright statement:
~ ====================
~ (c) 2002-2013 by Mathias Lux ([email protected])
~ http://www.semanticmetadata.net/lire, http://www.lire-project.net
~
~ Updated: 29.01.15 09:41
-->
<project name="Lire" default="compile" basedir=".">
<description>
This build file is used to build and package the LIRE library.
The LIRE library allows the creation of a Lucene Index for
content based image retrieval (CBIR). Furthermore methods
for searching the index are provided.
This library was part of the Caliph and Emir project and aims
to provide the CBIR features to other Java projects in an
easy and light weight way.
For more information on the usage of LIRE see the docs.
- Mathias Lux, Graz 2006-02-04
http://www.SemanticMetadata.net
</description>
<property name="src" value="src/main/java"/>
<property name="res" value="src/main/resources"/>
<property name="config" value="src/main/config"/>
<property name="build" value="classes"/>
<property name="dist" value="dist"/>
<property name="versionstring" value="1.0b2"/>
<!-- path to test files -->
<property name="test" value="test"/>
<!-- path to documentation like README or CHANGES -->
<property name="doc" value="src/main/doc"/>
<!-- path to additional files like installer scripts, icons and batch files -->
<property name="add.files" value="add.files"/>
<!-- define the classpath -->
<path id="classpath.path">
<pathelement location="${build}"/>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="init">
<tstamp/>
<tstamp>
<format property="touch.time" pattern="dd.MM.yyyy hh:mm aa"/>
</tstamp>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="clean, init">
<propertyfile file="${config}/build.properties" comment="Properties of this specific CALIPH build">
<entry key="build-date" type="date" value="now"/>
<entry key="build-number" type="int" value="1" operation="+"/>
</propertyfile>
<property file="${config}/build.properties"/>
<echo file="default.mf" append="false">Build-Date: ${touch.time}
Build-Number: ${build-number}
</echo>
<javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source" encoding="UTF-8">
<classpath refid="classpath.path"/>
<exclude name="**/ClassifierTest.java"/>
<exclude name="**/net.semanticmetadata.lire.classifiers.HashingSearchBasedClassifierMod.java"/>
</javac>
<copy todir="${build}">
<fileset dir="${src}">
<patternset>
<include name="**/*.*"/>
<exclude name="**/*.java"/>
<exclude name="**/*.html"/>
<exclude name="**/.svn/*"/>
<exclude name="**/.svn/*"/>
</patternset>
</fileset>
</copy>
<copy todir="${build}">
<fileset dir="${res}">
<patternset>
<include name="**/*.*"/>
<exclude name="**/*.java"/>
<exclude name="**/*.html"/>
<exclude name="**/.svn/*"/>
<exclude name="**/.svn/*"/>
</patternset>
</fileset>
</copy>
</target>
<target name="javadoc">
<!--<javadoc sourcepath="${src}" destdir="${dist}/docs/apidocs"/>-->
<javadoc packagenames="net.*"
sourcepath="${src}"
destdir="${dist}/docs/api"
author="true"
version="true"
use="true"
windowtitle="LIRE API"
classpathref="classpath.path" encoding="UTF-8"/>
</target>
<target name="clean">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
<target name="dist" depends="compile">
<mkdir dir="${dist}"/>
<mkdir dir="${dist}/lib"/>
<mkdir dir="${dist}/docs"/>
<copy todir="${dist}/lib">
<fileset dir="lib">
<patternset>
<include name="**/*.*"/>
<exclude name="**/CVS/*"/>
<exclude name="**/.svn/*"/>
</patternset>
</fileset>
</copy>
<copy todir="${dist}/docs">
<fileset dir="src/main/docs">
<patternset>
<include name="**/*.*"/>
<exclude name="**/CVS/*"/>
<exclude name="**/.svn/*"/>
</patternset>
</fileset>
</copy>
<!--zip destfile="${dist}/Lire-src-${versionstring}.zip">
<fileset dir="src/main/java">
<patternset>
<include hashFunctionsFileName="**/*.*"/>
<exclude hashFunctionsFileName="**/CVS/*"/>
<exclude hashFunctionsFileName="**/.svn/*"/>
</patternset>
</fileset>
<filename hashFunctionsFileName="build.xml"/>
</zip-->
<!--jar jarfile="${dist}/lire.jar" basedir="${build}" manifest="default.mf"/-->
<jar jarfile="${dist}/lire.jar" basedir="${build}"/>
</target>
<target name="copy_jar_to_liredemo" depends="dist">
<copy force="true" file="dist/lire.jar" todir="./samples/liredemo/lib"/>
<copy force="true" file="dist/lire.jar" todir="./samples/simpleapplication/lib"/>
<copy force="true" file="dist/lire.jar" todir="./samples/teaching/lib"/>
<!--delete file="../LireSolr/lib/lire.jar"/-->
<!--copy force="true" file="dist/lire.jar" todir="../LireSolr/lib"/-->
</target>
<target name="release" depends="dist, javadoc">
<!-- create binary package for release -->
<!-- Copy all ressources to the directory -->
<copy todir="${dist}/Lire-${versionstring}">
<fileset dir="${dist}">
<patternset>
<include name="**/*.*"/>
<exclude name="**/*.iml"/>
<exclude name="**/CVS/*"/>
<exclude name="**/.svn/*"/>
</patternset>
</fileset>
<fileset dir=".">
<patternset>
<include name="src/**"/>
<!--include hashFunctionsFileName="lib/**"/-->
<include name="build.xml"/>
<include name="LICENSE.txt"/>
<include name="README.txt"/>
<exclude name="**/CVS/*"/>
<exclude name="**/.svn/*"/>
<exclude name="**/docs/*"/>
<exclude name="**/*.iml"/>
</patternset>
</fileset>
</copy>
<copy todir="${dist}/Lire-${versionstring}">
<fileset dir=".">
<patternset>
<include name="src/main/docs/INSTALL.txt"/>
<include name="src/main/docs/CHANGES.txt"/>
</patternset>
</fileset>
</copy>
<!-- Make a tar file -->
<tar tarfile="${dist}/Lire-${versionstring}.tar.bz2" compression="bzip2">
<tarfileset dir="${dist}">
<patternset>
<include name="Lire-${versionstring}/**"/>
</patternset>
</tarfileset>
</tar>
<!-- Make a zip file -->
<zip destfile="${dist}/Lire-${versionstring}.zip">
<fileset dir="${dist}">
<patternset>
<include name="Lire-${versionstring}/**"/>
</patternset>
</fileset>
</zip>
<!-- Delete temp directory -->
<delete dir="${dist}/Lire-${versionstring}"/>
</target>
<target name="index" depends="compile">
<!-- Note: This needs to be forked, otherwise multi threading won't work and the heap space will be exceeded soon. -->
<java classpathref="classpath.path" classname="net.semanticmetadata.lire.indexers.parallel.ParallelIndexer" fork="true" maxmemory="2048M" error="indexer_error.log" output="indexer_output.log">
<jvmarg line="-Xmx2048M -server"/>
<!-- adapt this argument to use your pictures -->
<arg line="-d ./testdata/ferrari -i ./idx-test -n 16"/>
<!--
Usage:
$> ParallelIndexer -i <index> <-d <image-directory> | -l <image-list>> [-n <number of threads>]
index ... The directory of the index. Will be appended or created if not existing.
images-directory ... The directory the images are found in. It's traversed recursively.
image-list ... A list of images in a file, one per line. Use instead of images-directory.
number of threads ... The number of threads used for extracting features, e.g. # of CPU cores.
-->
</java>
</target>
</project>