This repository has been archived by the owner on May 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.xml
90 lines (78 loc) · 2.49 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
<project name="smr" default="all" basedir=".">
<property name="src.dir" value="src/"/>
<property name="build.dir" value="classes"/>
<property name="docs.dir" value="docs"/>
<property name="plugin.dir" value="jars"/>
<!-- 3. Define project CLASSPATH. -->
<property environment="env"/>
<path id="project.classpath">
<fileset dir="${env.SCALA_HOME}/lib/">
<include name="*.jar"/>
</fileset>
<pathelement location="${build.dir}"/>
<fileset dir="${env.HADOOP_HOME}">
<include name="*.jar"/>
<include name="lib/*.jar"/>
</fileset>
</path>
<!-- 4. Define scala compiler command. -->
<taskdef resource="scala/tools/ant/antlib.xml"/>
<!-- 5. Compiles sources by using "scalac" command. -->
<target name="java-silliness">
<javac srcdir="${src.dir}" destdir="${build.dir}"
classpathref="project.classpath" >
<include name="**/*.java"/>
</javac>
</target>
<target name="compile" depends="plugin,java-silliness">
<mkdir dir="${build.dir}"/>
<!--
-->
<scalac srcdir="${src.dir}" destdir="${build.dir}"
classpathref="project.classpath" force="changed"
deprecation="yes" unchecked="yes"
addparams="-Xplugin:${plugin.dir}/seroverride.jar -Xshow-phases"
>
<include name="**/*.scala"/>
</scalac>
</target>
<target name="docs">
<mkdir dir="${docs.dir}"/>
<scaladoc
srcdir="${src.dir}"
destdir="${docs.dir}"
deprecation="yes" unchecked="yes"
windowtitle="Scala MapReduce Documentation"
doctitle="<div>Scala MapReduce 0.0.3</div>" >
<include name="**/*.scala"/>
</scaladoc>
</target>
<target name="plugin">
<mkdir dir="${build.dir}"/>
<scalac srcdir="${src.dir}" destdir="${build.dir}"
classpathref="project.classpath" force="changed"
deprecation="yes" unchecked="yes"
>
<include name="**/plugin/*.scala"/>
</scalac>
<mkdir dir="jars"/>
<jar destfile="jars/seroverride.jar">
<fileset dir="classes/"
includes="**/plugin/*.class"
/>
<fileset dir="misc"/>
</jar>
</target>
<target name="libjar" depends="compile">
<jar destfile="jars/smr.jar">
<fileset dir="classes"/>
</jar>
</target>
<target name="testjar" depends="compile">
<jar destfile="jars/smr-basic.jar">
<fileset dir="classes"/>
<fileset dir="${env.SCALA_HOME}" includes="lib/**.jar"/>
</jar>
</target>
<target name="all" depends="compile,libjar"/>
</project>