forked from uvagfx/hipi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
128 lines (113 loc) · 5.29 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
<project basedir="." default="all">
<target name="setup">
<property name="hadoop.home" value="/opt/hadoop/" />
<property name="hadoop.version" value="0.20.1+152" />
<property name="hadoop.classpath" value="${hadoop.home}/hadoop-${hadoop.version}-core.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 target="1.6" nowarn="on" srcdir="${srcdir}:./src:./examples:./experiments" includes="${files}" destdir="./bin" classpath="${hadoop.classpath}:${metadata.jar}" />
<!-- Create the jar -->
<jar destfile="${jardir}/${jarfilename}" basedir="./bin">
<zipfileset src="${metadata.jar}" />
<manifest>
<attribute name="Main-Class" value="${mainclass}" />
</manifest>
</jar>
</target>
<!-- Computes the average image of a subset of the images via the CullMapper -->
<target name="avgimgcull">
<antcall target="compile">
<param name="srcdir" value="experiments/hipi/experiments/averageimage" />
<param name="files" value="AverageImageCull.java" />
<param name="jarfilename" value="averageimagecull.jar" />
<param name="jardir" value="experiments" />
<param name="mainclass" value="hipi.experiments.averageimage.AverageImageCull" />
</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="files" value="Covariance.java" />
<param name="jarfilename" value="covariance.jar" />
<param name="jardir" value="examples" />
<param name="mainclass" value="hipi.examples.covariance.Covariance" />
</antcall>
</target>
<!-- Create a sequence file from a HIB-->
<target name="seqfile">
<antcall target="compile">
<param name="srcdir" value="examples/hipi/examples/createsequencefile" />
<param name="files" value="CreateSequenceFile.java" />
<param name="jarfilename" value="createsequencefile.jar" />
<param name="jardir" value="examples" />
<param name="mainclass" value="hipi.examples.createsequencefile.CreateSequenceFile" />
</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="files" value="DownloaderInputFormat.java, DownloaderRecordReader.java, Downloader.java" />
<param name="jarfilename" value="downloader.jar" />
<param name="jardir" value="examples" />
<param name="mainclass" value="hipi.examples.downloader.Downloader" />
</antcall>
</target>
<!-- Converts a set of images to grayscale -->
<target name="im2gray">
<antcall target="compile">
<param name="srcdir" value="experiments/hipi/experiments/im2gray" />
<param name="files" value="Im2Gray.java" />
<param name="jarfilename" value="im2gray.jar" />
<param name="jardir" value="experiments" />
<param name="mainclass" value="hipi.experiments.im2gray.Im2Gray" />
</antcall>
</target>
<!-- Test the various input types for HIPI -->
<target name="inputtest">
<antcall target="compile">
<param name="srcdir" value="experiments/hipi/experiments/inputtest" />
<param name="files" value="InputTest.java" />
<param name="jarfilename" value="inputtest.jar" />
<param name="jardir" value="experiments" />
<param name="mainclass" value="hipi.experiments.inputtest.InputTest" />
</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="files" value="JpegFromHib.java" />
<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="files" value="DumpHib.java" />
<param name="jarfilename" value="dumphib.jar" />
<param name="jardir" value="examples" />
<param name="mainclass" value="hipi.examples.dumphib.DumpHib" />
</antcall>
</target>
<target name="compileall" depends="avgimgcull, covariance, seqfile, downloader, im2gray, inputtest, hib2jpg, dumphib" />
<target name="all" depends="compileall" />
<!-- Clean -->
<target name="clean">
<delete dir="bin" />
<delete>
<fileset dir="." includes="examples/*.jar,experiments/*.jar" />
</delete>
</target>
</project>