-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
41 lines (34 loc) · 1.23 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
<?xml version="1.0"?>
<project name="springapp" basedir="." default="usage">
<property file="build.properties"/>
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<path id="master-classpath">
<fileset dir="${hadoop.home}">
<include name="/*.jar"/>
</fileset>
<pathelement path="${build.dir}"/>
</path>
<target name="usage">
<echo message=""/>
<echo message="${name} build file"/>
<echo message="-----------------------------------"/>
<echo message=""/>
<echo message="Available targets are:"/>
<echo message=""/>
<echo message="build --> Build the application"/>
<echo message="pacakage --> create the jar"/>
</target>
<target name="build" description="Compile main source tree java files">
<mkdir dir="${build.dir}/classes"/>
<javac destdir="${build.dir}/classes" source="1.5" target="1.5" debug="true" deprecation="false" optimize="false" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="master-classpath"/>
</javac>
</target>
<target name="pacakage" description="build the jar" depends="build">
<mkdir dir="${build.dir}/dist"/>
<jar destfile="${build.dir}/dist/hadoop-examples.jar"
basedir="${build.dir}/classes"/>
</target>
</project>