forked from tomwhite/hadoop-book
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-examples.xml
51 lines (47 loc) · 1.85 KB
/
build-examples.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
<?xml version="1.0"?>
<project name="htdg-examples" basedir="." default="examples">
<property name="build.dir" value="build"/>
<property name="dist.dir" value="${build.dir}/dist"/>
<property name="src.dir" value="src/main"/>
<property name="src.test.dir" value="src/test"/>
<property name="data.dir" value="input"/>
<property name="dist.name" value="htdg-examples-0.1.1"/>
<property name="phragmite.pl" value="bin/phragmite_db.pl"/>
<target name="examples" description="Creates an examples distribution to accompany the book.">
<delete dir="${build.dir}"/>
<mkdir dir="${build.dir}"/>
<copy todir="${build.dir}/filteredsrc">
<fileset dir="${src.dir}"/>
</copy>
<replaceregexp flags="gs">
<regexp pattern="// vv[^\n]+\n"/>
<substitution expression=""/>
<fileset dir="${build.dir}/filteredsrc"/>
</replaceregexp>
<tar destfile="${build.dir}/${dist.name}.tar.gz" compression="gzip">
<tarfileset dir="${basedir}" prefix="${dist.name}">
<include name="build.xml"/>
<include name="ivy.xml"/>
<include name="CHANGES"/>
<include name="README"/>
</tarfileset>
<tarfileset dir="${src.dir}" prefix="${dist.name}/${src.dir}">
<exclude name="**/examples/**"/>
<exclude name="**/grunt**"/>
<exclude name="**/sh/**"/>
<exclude name="**/ch03/resources/**"/>
<exclude name="**/ch08/r/**"/>
</tarfileset>
<tarfileset dir="${src.dir}" prefix="${dist.name}/${src.dir}">
<include name="**/app3/**"/>
</tarfileset>
<tarfileset dir="${src.test.dir}" prefix="${dist.name}/${src.test.dir}">
<exclude name="book/**"/>
</tarfileset>
<tarfileset dir="${data.dir}" prefix="${dist.name}/${data.dir}">
<include name="metoffice/**"/>
<include name="ncdc/**"/>
</tarfileset>
</tar>
</target>
</project>