-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
executable file
·89 lines (79 loc) · 3.34 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
<project basedir="." default="all">
<target name="setup">
<property name="hadoop.home" value="/usr/lib/hadoop" />
<property name="hadoop.version" value="1.2.1" />
<property name="hadoop.classpath" value="${hadoop.home}/hadoop-core-${hadoop.version}.jar" />
</target>
<path id="project-classpath">
<fileset dir="/usr/lib/hadoop/" includes="*.jar" />
<fileset dir="/usr/java/jdk1.7.0_67-cloudera/lib/" includes="opencv-249.jar" />
<fileset dir="./src" includes="*.jar" />
</path>
<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>
<!-- compute covariance from images -->
<target name="covariance" depends="setup, test_settings">
<mkdir dir="bin" />
<!-- Compile -->
<javac nowarn="on" includeantruntime="no" srcdir="./hipi/examples/covariance" destdir="./bin" classpath="${hadoop.classpath}:./src/hipi.jar" />
<!-- Create the jar -->
<jar destfile="./covariance.jar" basedir="./bin">
<zipfileset src="./src/hipi.jar" />
<manifest>
<attribute name="Main-Class" value="hipi.examples.covariance.Covariance" />
</manifest>
</jar>
</target>
<!-- download images from the Internet -->
<target name="downloader" depends="setup, test_settings">
<mkdir dir="bin" />
<!-- Compile -->
<echo>hadoop.classpath=${hadoop.classpath}</echo>
<javac nowarn="on" includeantruntime="no" srcdir="./hipi/examples/downloader" destdir="./bin" classpath="${hadoop.classpath}:./src/hipi.jar" />
<!-- Create the jar -->
<jar destfile="./downloader.jar" basedir="./bin">
<zipfileset src="./src/hipi.jar" />
<manifest>
<attribute name="Main-Class" value="hipi.examples.downloader.Downloader" />
</manifest>
</jar>
</target>
<!-- create hib file from jpeg files -->
<target name="dumphib" depends="setup, test_settings">
<mkdir dir="bin" />
<!-- Compile -->
<javac nowarn="on" includeantruntime="no" srcdir="./hipi/examples/dumphib" destdir="./bin" classpathref="project-classpath" />
<!-- Create the jar -->
<jar destfile="./dumphib.jar" basedir="./bin">
<zipfileset src="./src/hipi.jar" />
<zipfileset src="./src/opencv-249.jar" />
<manifest>
<attribute name="Main-Class" value="hipi.examples.dumphib.DumpHib" />
</manifest>
</jar>
</target>
<!-- create hib file from jpeg files -->
<target name="hib2jpg" depends="setup, test_settings">
<mkdir dir="bin" />
<!-- Compile -->
<javac nowarn="on" includeantruntime="no" srcdir="./hipi/examples/jpegfromhib" destdir="./bin" classpath="${hadoop.classpath}:../src/hipi.jar" />
<!-- Create the jar -->
<jar destfile="./hib2jpg.jar" basedir="./bin">
<zipfileset src="../src/hipi.jar" />
<manifest>
<attribute name="Main-Class" value="hipi.examples.jpegfromhib.JpegFromHib" />
</manifest>
</jar>
</target>
<target name="all" depends="covariance, downloader, dumphib, hib2jpg">
</target>
<!-- Clean -->
<target name="clean">
<delete dir="bin" />
<delete>
<fileset dir="." includes="./*.jar" />
</delete>
</target>
</project>