-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
124 lines (112 loc) · 3.77 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
<project name="rdb2rdf-th" default="zip">
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="lib.dir.present" value="lib"/>
<property name="model.dir.present" value="model"/>
<property name="dist.dir" value="dist"/>
<property name="model.dir" value="${dist.dir}/model"/>
<property name="util.dir" value="util"/>
<property name="javadoc.dir" value="doc"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="lib.dir" value="${dist.dir}/lib"/>
<property name="jar.name" value="${ant.project.name}.jar"/>
<property name="main-class" value="org.rdb2rdf.testcase.th.TCScanner"/>
<property name="version" value="0.0.7"/>
<description> rdb2rdf-th build file</description>
<path id="classpath">
<fileset dir="${lib.dir.present}" includes="*.jar"/>
</path>
<!-- =================================
target: zip
================================= -->
<target name="zip" depends="dist">
<zip destfile="${ant.project.name}_bin_${version}.zip" basedir="./${dist.dir}">
</zip>
<delete dir="${build.dir}"/>
</target>
<!-- =================================
target: dist
================================= -->
<target name="dist" depends="build">
<mkdir dir="${dist.dir}"/>
<mkdir dir="${lib.dir}"/>
<mkdir dir="${model.dir}"/>
<copy todir="${lib.dir}">
<fileset dir="${lib.dir.present}">
<include name="**/*.jar"/>
</fileset>
</copy>
<copy todir="${model.dir}">
<fileset dir="${model.dir.present}">
<include name="**/*.ttl"/>
</fileset>
</copy>
<copy todir="${dist.dir}">
<fileset dir="${util.dir}"/>
<fileset dir="${jar.dir}"/>
</copy>
</target>
<!-- =================================
target: default
================================= -->
<target name="build" depends="compile" description="description">
<jar destfile="${jar.dir}/${jar.name}" basedir="${classes.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}" />
</manifest>
</jar>
</target>
<!-- =================================
target: compile
================================= -->
<target name="compile">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath"/>
</target>
<!-- =================================
target: copyJars
================================= -->
<target name="copyJars" if="lib.dir.present">
<copy todir="${dist.lib.dir}">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</copy>
</target>
<!-- =================================
target: clean
================================= -->
<target name="clean"
description="Destroys all generated files and dirs.">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${javadoc.dir}"/>
<delete>
<fileset dir="." includes="**/*.zip"/>
</delete>
</target>
<!-- =================================
target: jar
================================= -->
<target name="jar" depends="compile">
<jar jarfile="${build.dir}/${jar.dir}/${jar.name}">
</jar>
</target>
<!-- =================================
target: javadoc
================================= -->
<target name="javadoc">
<javadoc
access="public"
destdir="${javadoc.dir}"
author="true"
version="true"
use="true"
>
<fileset dir="${src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
</javadoc>
</target>
</project>