-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.xml
109 lines (94 loc) · 4.32 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
<project default="jar" basedir ="." name="indextank-apiclient">
<property name="project" value="indextank-apiclient"/>
<property name="version" value="trunk"/>
<property name="src.dir" location="src/main/java"/>
<property name="thrift.dir" location="thrift"/>
<property name="build.dir" location="build"/>
<property name="output.dir" location="output"/>
<property name="lib.dir" location="lib"/>
<property name="javadoc.dir" location="doc/javadoc"/>
<path id="build.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<!--******************************************************************************************************-->
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build.dir}"/>
<mkdir dir="${output.dir}"/>
<mkdir dir="${javadoc.dir}"/>
</target>
<!--******************************************************************************************************-->
<target name="compile" depends="init" description="Compiles all the source." >
<javac debug="true" debuglevel="lines,vars,source" srcdir="${src.dir}" destdir="${build.dir}" classpathref="build.classpath"/>
</target>
<!--******************************************************************************************************-->
<target name="jar" depends="compile" description="Builds the jarfile." >
<jar jarfile="${output.dir}/${project}-${version}.jar" >
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Version" value="${version}"/>
<attribute name="Main-Class" value="com.flaptor.indextank.apiclient.IndexTankMain"/>
</manifest>
<fileset dir="${build.dir}" excludes="**/*Test.class">
<include name="**/*.class"/>
</fileset>
</jar>
</target>
<!--******************************************************************************************************-->
<target name="depjar" depends="init" description="builds the Indextank dependencies jar file" >
<jar jarfile="${output.dir}/${project}-${version}-deps.jar" >
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Version" value="${version}"/>
</manifest>
<zipgroupfileset dir="${lib.dir}">
<include name="*.jar" />
</zipgroupfileset>
</jar>
</target>
<!--******************************************************************************************************-->
<target name="fatjar" depends="compile" description="Builds IndexTank's fat jar file" >
<jar jarfile="${output.dir}/${project}-${version}-fat.jar" >
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Version" value="${version}"/>
<attribute name="Main-Class" value="com.flaptor.indextank.apiclient.IndexTankMain"/>
</manifest>
<fileset dir="${build.dir}" excludes="**/*Test.class">
<include name="com/flaptor/**/*.class"/>
</fileset>
<zipgroupfileset dir="${lib.dir}">
<include name="*.jar" />
</zipgroupfileset>
</jar>
</target>
<!--******************************************************************************************************-->
<target name="doc" description="Creates de JavaDoc documentation." >
<delete dir="${javadoc.dir}" />
<mkdir dir="${javadoc.dir}" />
<javadoc sourcepath="${src.dir}"
destdir="${javadoc.dir}"
Private="true"
linksource="yes"
>
<fileset dir="${src.dir}" defaultexcludes="yes">
<include name="com/**/*.java" />
</fileset>
<doctitle><![CDATA[<h1>${project} version ${version} documentation.</h1>]]></doctitle>
<classpath>
<path refid="build.classpath" />
</classpath>
</javadoc>
</target>
<!--******************************************************************************************************-->
<target name="clean" description="Clean up." >
<delete dir="${build.dir}"/>
<delete dir="${output.dir}"/>
<delete dir="${javadoc.dir}"/>
</target>
<!--******************************************************************************************************-->
</project>