-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
123 lines (109 loc) · 3.98 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
<?xml version="1.0"?>
<project name="joycrawler" default="jar" basedir=".">
<description>
Joycrawler, A web spider for hadoop application
</description>
<property name="name" value="joycrawler" />
<property name="version" value="0.13.3" />
<property name="final.name" value="${name}-${version}" />
<property name="lib" value="lib" />
<property name="src" value="src" />
<property name="dist" value="./" />
<property name="dest" value="build" />
<!-- The compilation classpath -->
<path id="classpath">
<fileset dir="${lib}">
<include name="*.jar" />
</fileset>
</path>
<!-- =================================
target: jar
================================= -->
<target name="jar" depends=" compile" description="make joycrawler jar">
<mkdir dir="${dist}" />
<jar jarfile="${dist}/${final.name}.jar" basedir="${dest}">
<manifest>
<section name="joycrawler">
<attribute name="Implementation-Title" value="joycrawler" />
<attribute name="Implementation-Version" value="${version}" />
<attribute name="Implementation-Vendor" value="Jeremy Chow(coderplay@gmail.com)" />
</section>
</manifest>
</jar>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: rank
- - - - - - - - - - - - - - - - - -->
<target name="rank" depends="compile">
<java classname="org.joy.pagerank.RankDriver" maxmemory="1000m" fork="true">
<classpath>
<pathelement location="./build/"/>
<pathelement location="./conf/"/>
<path refid="classpath"/>
</classpath>
</java>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: crawler
- - - - - - - - - - - - - - - - - -->
<target name="crawler" depends="compile">
<java classname="org.joy.crawler.Crawler" maxmemory="1000m" fork="true">
<arg value="seeds.txt"/>
<arg value="15"/>
<classpath>
<pathelement location="./build/"/>
<pathelement location="./conf/"/>
<path refid="classpath"/>
</classpath>
</java>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: example
- - - - - - - - - - - - - - - - - -->
<target name="example" depends="compile">
<java classname="org.joy.crawler.example.ExtractorDriver" maxmemory="1000m" fork="true">
<classpath>
<pathelement location="./build/"/>
<pathelement location="./conf/"/>
<path refid="classpath"/>
</classpath>
</java>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: run
- - - - - - - - - - - - - - - - - -->
<target name="run" depends="compile">
<java classname="org.joy.crawler.Crawler" maxmemory="1000m" fork="true">
<arg value="seeds.txt"/>
<arg value="15"/>
<classpath>
<pathelement location="./build/"/>
<pathelement location="./conf/"/>
<path refid="classpath"/>
</classpath>
</java>
<java classname="org.joy.pagerank.RankDriver" maxmemory="1000m" fork="true">
<classpath>
<pathelement location="./build/"/>
<pathelement location="./conf/"/>
<path refid="classpath"/>
</classpath>
</java>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: compile
- - - - - - - - - - - - - - - - - -->
<target name="compile">
<mkdir dir="${dest}" />
<javac srcdir="${src}" destdir="${dest}" encoding="utf-8" debug="true">
<classpath refid="classpath" />
</javac>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: clean
- - - - - - - - - - - - - - - - - -->
<target name="clean">
<delete dir="${dest}" />
<delete dir="${dist}" />
</target>
</project>