forked from mrry/skywriting
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
132 lines (115 loc) · 4.92 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
14 Sep 2010 14:04:44
Skywriting-java
Build script for Skywriting java components.
dgm36
====================================================================== -->
<project name="skywriting-java" default="default">
<description>
Build script for Skywriting java components.
</description>
<macrodef name="exampleJar">
<attribute name="exampledir"/>
<attribute name="examplepackage"/>
<sequential>
<jar destfile="${dir.dist}/sky-eg-@{exampledir}.jar">
<fileset dir="${dir.build}/examples/@{exampledir}" includes="skywriting/examples/@{examplepackage}/**"/>
</jar>
</sequential>
</macrodef>
<path id="examplesourcepath">
<pathelement location="src/java"/>
<pathelement location="examples/Grep/src"/>
<pathelement location="examples/tests/src"/>
<pathelement location="examples/Mandelbrot/src"/>
<pathelement location="examples/Pi/src"/>
<pathelement location="examples/skydoop/src"/>
<pathelement location="examples/skyhout/src"/>
<pathelement location="examples/SmithWaterman/src"/>
<pathelement location="examples/WordCount/src"/>
<pathelement location="examples/TeraSort/src"/>
</path>
<path id="exampleclasspath">
<pathelement location="ext/mahout-0.3/mahout-core-0.3.jar"/>
<pathelement location="ext/mahout-0.3/mahout-collections-0.3.jar"/>
<pathelement location="ext/mahout-0.3/mahout-math-0.3.jar"/>
<pathelement location="ext/mahout-0.3/lib/commons-logging-1.1.1.jar"/>
<pathelement location="ext/mahout-0.3/lib/gson-1.3.jar"/>
<pathelement location="ext/mahout-0.3/lib/hadoop-core-0.20.2.jar"/>
<pathelement location="ext/mahout-0.3/lib/slf4j-api-1.5.8.jar"/>
<pathelement location="ext/mahout-0.3/lib/slf4j-jcl-1.5.8.jar"/>
<pathelement location="ext/mahout-0.3/lib/uncommons-maths-1.2.jar"/>
</path>
<path id="bindingclasspath">
<pathelement location="ext/google-gson-1.7.1/gson-1.7.1.jar"/>
</path>
<macrodef name="compileExampleJar">
<attribute name="example"/>
<sequential>
<mkdir dir="${dir.build}/examples/@{example}"/>
<javac srcdir="examples/@{example}" sourcepathref="examplesourcepath" classpathref="exampleclasspath" destdir="${dir.build}/examples/@{example}"/>
</sequential>
</macrodef>
<target name="compile-bindings">
<mkdir dir="${dir.build}/bindings"/>
<javac srcdir="src/java"
destdir="${dir.build}/bindings"
classpathref="bindingclasspath"/>
</target>
<target name="build-bindings" depends="compile-bindings">
<mkdir dir="${dir.dist}"/>
<sequential>
<jar destfile="${dir.dist}/skywriting.jar">
<fileset dir="${dir.build}/bindings" includes="uk/co/mrry/mercator/task/**"/>
<fileset dir="${dir.build}/bindings" includes="com/asgow/ciel/**"/>
</jar>
</sequential>
</target>
<target name="compile-tests" depends="compile-bindings">
<mkdir dir="${dir.build}/tests"/>
<javac srcdir="examples/tests" destdir="${dir.build}/tests" classpath="${dir.build}/bindings"/>
</target>
<target name="build-tests" depends="compile-tests">
<mkdir dir="${dir.dist}"/>
<sequential>
<jar destfile="${dir.dist}/java-tests.jar">
<fileset dir="${dir.build}/tests" includes="tests/**"/>
</jar>
</sequential>
</target>
<target name="compile-examples">
<mkdir dir="${dir.build}/examples"/>
<compileExampleJar example="tests"/>
<compileExampleJar example="SmithWaterman"/>
<compileExampleJar example="Mandelbrot"/>
<compileExampleJar example="Pi"/>
<compileExampleJar example="WordCount"/>
<compileExampleJar example="Grep"/>
<compileExampleJar example="skyhout"/>
<compileExampleJar example="TeraSort"/>
<compileExampleJar example="kmeans"/>
</target>
<target name="build-examples" depends="build-bindings, compile-examples">
<mkdir dir="${dir.dist}"/>
<exampleJar exampledir="tests" examplepackage="tests"/>
<exampleJar exampledir="SmithWaterman" examplepackage="smithwaterman"/>
<exampleJar exampledir="Mandelbrot" examplepackage="mandelbrot"/>
<exampleJar exampledir="Pi" examplepackage="pi"/>
<exampleJar exampledir="WordCount" examplepackage="wordcount"/>
<exampleJar exampledir="Grep" examplepackage="grep"/>
<exampleJar exampledir="skyhout" examplepackage="skyhout"/>
<exampleJar exampledir="TeraSort"
examplepackage="terasort"/>
<exampleJar exampledir="kmeans" examplepackage="kmeans"/>
</target>
<target name="clean">
<echo>=== CLEAN ===</echo>
<delete failonerror="false">
<fileset dir="${dir.dist}" includes="**/*"/>
<fileset dir="${dir.build}" includes="**/*"/>
</delete>
</target>
<target name="default" depends="build-bindings" description="Build script for Skywriting java components.">
</target>
</project>