-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
65 lines (56 loc) · 1.87 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
<?xml version="1.0"?>
<project name="storage" default="dist" basedir=".">
<!-- Sources location generated by thrift -->
<property name="src.dir" location="${basedir}/gen-java"/>
<property name="build.dir" location="${basedir}/build"/>
<property name="lib.dir" location="${basedir}/lib"/>
<property name="dist.dir" location="${basedir}/dist"/>
<!-- Include the base properties file -->
<property file="${basedir}/build.properties" />
<!-- The final jar name -->
<property name="jar.file" location="${dist.dir}/${project.name}.jar"/>
<path id="compile.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${src.dir}"/>
</target>
<target name="init" depends="clean">
<tstamp/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>
<target name="thrift">
<apply executable="thrift" failonerror="true" timeout="60000"
verbose="true">
<arg value="--gen"/>
<arg value="java"/>
<fileset dir="${basedir}">
<include name="**/*.thrift"/>
</fileset>
</apply>
</target>
<target name="compile" depends="init,thrift">
<javac srcdir="${src.dir}" destdir="${build.dir}" source="1.6" target="1.6" debug="true" classpathref="compile.classpath"/>
</target>
<target name="dist" depends="compile">
<mkdir dir="${build.dir}/META-INF"/>
<jar jarfile="${jar.file}">
<manifest>
<attribute name="Implementation-Title" value="${project.name}"/>
<attribute name="Implementation-Version" value="${project.version}"/>
</manifest>
<fileset dir="${build.dir}">
<include name="**/*.class"/>
<include name="META-INF/*.txt"/>
</fileset>
<fileset dir="${src.dir}">
<include name="**/*.java"/>
</fileset>
</jar>
</target>
</project>