-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
117 lines (102 loc) · 4.16 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
<?xml version="1.0" ?>
<project name="Ontoquest2" default="dist" basedir=".">
<description>
OntoQuest Ontology Query Engine
</description>
<!-- set global properties for this build -->
<property name="version" value="0_1"/>
<property name="src" location="src"/>
<property name="build" location="classes"/>
<property name="test" location="test"/>
<property name="dist" location="dist"/>
<property name="config" location="config"/>
<property name="lib" location="lib"/>
<property name="scripts" location="scripts"/>
<path id="project.classpath">
<pathelement location="${build}"/>
<fileset dir="${lib}">
<include name="*.jar"/>
<include name="*.zip"/>
</fileset>
</path>
<target name="init" depends="clean">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
</target>
<target name="compile" depends="init"
description="compile source codes" >
<echo message="+------------------------------------------+"/>
<echo message="| Compiling source codes ... |"/>
<echo message="+------------------------------------------+"/>
<!-- Compile the java code from ${src} into ${build} -->
<!-- <javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines"
executable="C:/softwares/Java/jdk1.5.0_06/bin/javac"
compiler="javac1.5" verbose="on"> -->
<javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines">
<classpath refid="project.classpath"/>
</javac>
<!-- <javac srcdir="${test}" destdir="${build}"
executable="C:/softwares/Java/jdk1.5.0_06/bin/javac"
compiler="javac1.5"> -->
<javac srcdir="${test}" destdir="${build}">
<classpath refid="project.classpath"/>
</javac>
</target>
<target name="dist" depends="jar_dist, war_dist"/>
<target name="jar_dist" depends="compile"
description="generate the jar distribution for using ontoquest API">
<echo message="---------------------------------------------------"/>
<echo message="| Generating the jar distribution ... |"/>
<echo message="---------------------------------------------------"/>
<jar jarfile="${dist}/OntoQuest.jar"
basedir="${build}"
includes="**" manifest="${config}/manifest.mf"/>
<!-- Copy other files to the distribution directory -->
<copy todir="${dist}/config">
<fileset dir="${config}"/>
</copy>
<copy todir="${dist}/lib">
<fileset dir="${lib}"/>
</copy>
<copy todir="${dist}">
<fileset dir="${build}" includes="*.class"/>
</copy>
<copy todir="${dist}">
<fileset dir="${test}" includes="*.java"/>
</copy>
<copy todir="${dist}" file="${scripts}/runExample.bat"/>
<echo message="---------------------------------------------------"/>
<echo message="| Making zip file ... |"/>
<echo message="---------------------------------------------------"/>
<zip destfile="${dist}/OntoQuest.zip">
<zipfileset dir="${dist}" prefix="ontoquest"/>
</zip>
<echo message="--------- done ---------"/>
</target>
<target name="war_dist" depends="compile"
description="generate the war distribution for using ontoquest REST services">
<echo message="---------------------------------------------------"/>
<echo message="| Generating the war distribution ... |"/>
<echo message="---------------------------------------------------"/>
<war destfile="${dist}/ontoquest.war"
webxml="${config}/web.xml"
duplicate="preserve"
>
<lib dir="lib">
<exclude name="servlet-api.jar"/>
</lib>
<classes dir="${build}" />
<zipfileset dir="${config}" prefix="config" filemode="640"/>
<zipfileset dir="logs" prefix="logs" />
</war>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>