-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.xml
67 lines (57 loc) · 2.24 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- build.xml - "ant" build file for tar-to-seq.jar
Copyright (C) 2008 Stuart Sierra
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You
may obtain a copy of the License at
http:www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.
-->
<project name="tar-to-seq" default="jar">
<description>
Build jar with "ant"
</description>
<property name="src" location="src"/>
<property name="build" location="classes"/>
<property name="lib" location="lib"/>
<property name="hadoop_jar" location="${lib}/hadoop-core.jar"/>
<property name="ant_jar" location="${lib}/ant.jar"/>
<property name="log4j_jar" location="${lib}/log4j-1.2.15.jar"/>
<property name="classpath" value="${hadoop_jar}:${ant_jar}:${log4j_jar}"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init"
description="Compile Java sources.">
<javac srcdir="${src}" destdir="${build}" classpath="${classpath}"
includeJavaRuntime="yes" debug="true"/>
</target>
<target name="expand.lib.jars">
<unjar dest="${build}">
<fileset dir="${lib}"
includes="**/*.jar"/>
<patternset>
<include name="**/*.class"/>
</patternset>
</unjar>
</target>
<target name="jar" depends="compile, expand.lib.jars"
description="Create jar file.">
<jar jarfile="tar-to-seq.jar" basedir="${build}">
<fileset dir="." includes="*.txt"/>
<manifest>
<attribute name="Main-Class" value="org.altlaw.hadoop.TarToSeqFile"/>
<attribute name="Class-Path" value="lib/hadoop-core.jar:lib/ant.jar:/lib/log4j-1.2.15.jar:lib/log4j.xml"/>
</manifest>
</jar>
</target>
<target name="clean"
description="Remove autogenerated files and directories.">
<delete dir="${build}"/>
</target>
</project>