forked from openplaces/heritrix-hdfs-writer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
196 lines (173 loc) · 8.46 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<?xml version="1.0"?>
<project name="HDFSWriterProcessor" default="compile">
<description>
This is the ant build file for the HDFSWriterProcessor extension to Heritrix 3.
</description>
<!-- Load all the default properties, and any the user wants -->
<!-- to contribute (without having to type -D or edit this file -->
<property file="${user.home}/build.properties" />
<property file="${basedir}/build.properties" />
<property name="Name" value="Heritrix-Hadoop-DFS-Writer-Processor"/>
<property name="name" value="heritrix-hadoop-dfs-writer-processor"/>
<property name="version" value="3.0.0"/>
<property name="final.name" value="${name}-${version}"/>
<property name="year" value="2010"/>
<property name="src.dir" value="${basedir}/src/java"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="docs.dir" value="${basedir}/docs"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="build.classes" value="${build.dir}/classes"/>
<property name="build.src" value="${build.dir}/src"/>
<property name="build.platform" value="${os.name}-${os.arch}-${sun.arch.data.model}"/>
<property name="build.docs" value="${build.dir}/docs"/>
<property name="build.javadoc" value="${build.docs}/api"/>
<property name="build.encoding" value="ISO-8859-1"/>
<property name="releases.dir" value="${basedir}/releases"/>
<property name="test.src.dir" value="${basedir}/src/test"/>
<property name="test.build.dir" value="${build.dir}/test"/>
<property name="test.build.data" value="${test.build.dir}/data"/>
<property name="test.cache.data" value="${test.build.dir}/cache"/>
<property name="test.log.dir" value="${test.build.dir}/logs"/>
<property name="test.build.classes" value="${test.build.dir}/classes"/>
<property name="test.build.testjar" value="${test.build.dir}/testjar"/>
<property name="test.build.javadoc" value="${test.build.dir}/docs/api"/>
<property name="test.include" value="Test*"/>
<property name="test.classpath.id" value="test.classpath"/>
<property name="test.output" value="no"/>
<property name="test.junit.output.format" value="plain"/>
<property name="javadoc.link.java"
value="http://java.sun.com/j2se/1.5/docs/api/"/>
<property name="dist.dir" value="${build.dir}/${final.name}"/>
<!-- the normal classpath -->
<path id="classpath">
<pathelement location="${build.classes}"/>
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<pathelement location="${conf.dir}"/>
</path>
<!-- the unit test classpath: uses test.src.dir for configuration -->
<path id="test.classpath">
<pathelement location="${test.build.classes}" />
<pathelement location="${test.src.dir}"/>
<pathelement location="${build.dir}"/>
<path refid="classpath"/>
</path>
<!-- the cluster test classpath: uses conf.dir for configuration -->
<path id="test.cluster.classpath">
<path refid="classpath"/>
<pathelement location="${test.build.classes}" />
<pathelement location="${test.src.dir}"/>
<pathelement location="${build.dir}"/>
</path>
<!-- ====================================================== -->
<!-- Stuff needed by all targets -->
<!-- ====================================================== -->
<target name="init">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes}"/>
<mkdir dir="${build.src}"/>
<mkdir dir="${test.build.dir}"/>
<mkdir dir="${test.build.classes}"/>
<mkdir dir="${test.build.testjar}"/>
</target>
<!-- ====================================================== -->
<!-- Compile the Java files -->
<!-- ====================================================== -->
<target name="compile" depends="init">
<javac
encoding="${build.encoding}"
srcdir="${src.dir};${build.src}"
destdir="${build.classes}">
<classpath refid="classpath"/>
</javac>
</target>
<!-- ================================================================== -->
<!-- Make heritrix-hadoop-dfs-writer-processor.jar -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="jar" depends="compile">
<jar jarfile="${build.dir}/${final.name}.jar" basedir="${build.classes}"/>
</target>
<!-- ================================================================== -->
<!-- D I S T R I B U T I O N -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="package" depends="jar">
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.dir}/lib"/>
<copy file="${build.dir}/${final.name}.jar" todir="${dist.dir}"/>
<copy file="build.xml" todir="${dist.dir}/" />
</target>
<!-- ================================================================== -->
<!-- Make release tarball -->
<!-- ================================================================== -->
<target name="tar" depends="package">
<mkdir dir="${releases.dir}" />
<tar longfile="gnu" compression="gzip" destfile="${releases.dir}/${final.name}.tar.gz">
<tarfileset dir="${basedir}" mode="664">
<include name="README.txt" />
<include name="CHANGELOG.txt" />
<include name="lib/archive-overlay-commons-httpclient-3.1.jar" />
<include name="lib/archive-overlay-commons-pool-1.3.jar" />
<include name="lib/commons-httpclient-3.0.1.jar" />
<include name="lib/commons-lang-2.3.jar" />
<include name="lib/fastutil-5.0.7.jar" />
<include name="lib/hadoop-0.20.1-core.jar" />
<include name="lib/heritrix-commons-3.0.0.jar" />
<include name="lib/heritrix-engine-3.0.0.jar" />
<include name="lib/heritrix-modules-3.0.0.jar" />
<include name="lib/json-20090211.jar" />
<include name="lib/log4j-1.2.15.jar" />
<include name="lib/spring-beans-2.5.6.jar" />
<include name="lib/spring-context-2.5.6.jar" />
<include name="lib/spring-core-2.5.6.jar" />
</tarfileset>
<tarfileset dir="${build.dir}" mode="664">
<include name="${final.name}.jar" />
</tarfileset>
</tar>
<tar longfile="gnu" compression="gzip" destfile="${releases.dir}/${final.name}-src.tar.gz">
<tarfileset dir="${basedir}" mode="664">
<include name="build.xml" />
<include name="README.txt" />
<include name="CHANGELOG.txt" />
<include name="lib/archive-overlay-commons-httpclient-3.1.jar" />
<include name="lib/archive-overlay-commons-pool-1.3.jar" />
<include name="lib/commons-httpclient-3.0.1.jar" />
<include name="lib/commons-lang-2.3.jar" />
<include name="lib/fastutil-5.0.7.jar" />
<include name="lib/hadoop-0.20.1-core.jar" />
<include name="lib/heritrix-commons-3.0.0.jar" />
<include name="lib/heritrix-engine-3.0.0.jar" />
<include name="lib/heritrix-modules-3.0.0.jar" />
<include name="lib/json-20090211.jar" />
<include name="lib/log4j-1.2.15.jar" />
<include name="lib/spring-beans-2.5.6.jar" />
<include name="lib/spring-context-2.5.6.jar" />
<include name="lib/spring-core-2.5.6.jar" />
<include name="src/**" />
</tarfileset>
<tarfileset dir="${build.dir}" mode="664">
<include name="${final.name}.jar" />
</tarfileset>
</tar>
</target>
<!-- ================================================================== -->
<!-- Clean. Delete the build files, and their directories -->
<!-- ================================================================== -->
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<!-- ================================================================== -->
<!-- Contrib targets. For now, they must be called explicitely -->
<!-- Using subant instead of ant as a workaround for 30569 -->
<!-- ================================================================== -->
<target name="deploy-contrib" depends="compile">
<subant target="deploy">
<fileset file="src/contrib/build.xml"/>
</subant>
</target>
</project>