forked from uvagfx/hipi
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.xml
87 lines (76 loc) · 3.46 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
<project basedir="." default="all">
<target name="setup">
<property name="hadoop.home" value="/usr/local/hadoop/" />
<property name="hadoop.version" value="1.1.2" />
<property name="hadoop.classpath" value="${hadoop.home}/hadoop-core-${hadoop.version}.jar" />
<property name="metadata.jar" value="3rdparty/metadata-extractor-2.3.1.jar" />
</target>
<target name="test_settings">
<fail unless="hadoop.home" message="The property hadoop.home was not specified. You must specify the home directory for Hadoop in the build.xml file." />
<fail unless="hadoop.version" message="The property hadoop.version was not specified. You must specify version of Hadoop you are using in the build.xml file." />
</target>
<target name="compile" depends="setup, test_settings">
<mkdir dir="bin" />
<!-- Compile -->
<javac nowarn="on" includeantruntime="no" srcdir="${srcdir}" destdir="./bin" classpath="${hadoop.classpath}:./src/hipi.jar:./3rdparty/metadata-extractor-2.3.1.jar:./3rdparty/junit-4.11.jar:./3rdparty/hamcrest-core-1.3.jar" />
<!-- Create the jar -->
<jar destfile="${jardir}/${jarfilename}" basedir="./bin">
<zipfileset src="./src/hipi.jar" />
<manifest>
<attribute name="Main-Class" value="${mainclass}" />
</manifest>
</jar>
</target>
<target name="hibimport">
<antcall target="compile">
<param name="srcdir" value="src/hipi/tool" />
<param name="jarfilename" value="hibimport.jar" />
<param name="jardir" value="tool" />
<param name="mainclass" value="hipi.tool.CreateHipiImageBundle" />
</antcall>
</target>
<!-- Create a sequence file from a HIB-->
<target name="covariance">
<antcall target="compile">
<param name="srcdir" value="examples/hipi/examples/covariance" />
<param name="jarfilename" value="covariance.jar" />
<param name="jardir" value="examples" />
<param name="mainclass" value="hipi.examples.covariance.Covariance" />
</antcall>
</target>
<!-- The distributed downloader, which takes a database of URL's and creates a HIB -->
<target name="downloader">
<antcall target="compile">
<param name="srcdir" value="examples/hipi/examples/downloader" />
<param name="jarfilename" value="downloader.jar" />
<param name="jardir" value="examples" />
<param name="mainclass" value="hipi.examples.downloader.Downloader" />
</antcall>
</target>
<!-- Extract a HIB into a folder and a sequence file of its constituent images -->
<target name="hib2jpg">
<antcall target="compile">
<param name="srcdir" value="examples/hipi/examples/jpegfromhib" />
<param name="jarfilename" value="hib2jpg.jar" />
<param name="jardir" value="examples" />
<param name="mainclass" value="hipi.examples.jpegfromhib.JpegFromHib" />
</antcall>
</target>
<!-- Dump some information about all of the information in a HIB -->
<target name="dumphib">
<antcall target="compile">
<param name="srcdir" value="examples/hipi/examples/dumphib" />
<param name="jarfilename" value="dumphib.jar" />
<param name="jardir" value="examples" />
<param name="mainclass" value="hipi.examples.dumphib.DumpHib" />
</antcall>
</target>
<target name="all" depends="hibimport, covariance, downloader, hib2jpg, dumphib" />
<!-- Clean -->
<target name="clean">
<delete dir="bin" />
<delete>
<fileset dir="." includes="examples/*.jar,experiments/*.jar" />
</delete>
</target>
</project>