-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
148 lines (122 loc) · 4.6 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!-- ANT v1.6.5 build file Hopefully you will not have to alter this file
to make it work on your system. Instead, create a localbuild.properties file
from the localbuild.properties.in template. Targets: The default target (build)
will compile all classes "deploy" will deploy the application "clean" will
remove the classfiles -->
<project name="Viz4Vivo" default="build" basedir=".">
<!-- Create the build.properties file from localbuild.properties and set
the necessary variables there, try to avoid altering this file -->
<property file="localbuild.properties" />
<property file="build.properties" />
<!-- The directories containing source code, properties, and webapp files -->
<property name="src.dir" value="./src" />
<property name="test.src" location="test/src" />
<property name="build.test.dir" location="build/tests" />
<property name="properties" value="./resources" />
<property name="dist.dir" value="./dist" />
<property name="build.dir" value="./build" />
<property name="java.lib" value="./lib" />
<path id="compile.classpath">
<!-- Include all JAR files that will be included in /lib -->
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
<path id="run-classpath">
<fileset dir="lib">
<include name="*.jar" />
</fileset>
<pathelement path="${build.dir}/classes" />
</path>
<path id="test-classpath">
<fileset dir="lib">
<include name="*.jar" />
</fileset>
<pathelement path="${build.dir}/classes" />
<pathelement path="${build.test.dir}" />
</path>
<target name="prepare">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir}/classes" />
<mkdir dir="${dist.dir}" />
</target>
<target name="build" depends="compile, lib, resources"
description="Compile main source tree java files">
</target>
<target name="compile" depends="prepare">
<javac destdir="${build.dir}/classes"
srcdir="${src.dir}"
debug="true"
deprecation="false"
optimize="false"
source="${compile.source}"
target="${compile.target}"
failonerror="true">
<classpath refid="compile.classpath" />
</javac>
</target>
<target name="jar" depends="build" description="create jar file">
<jar destfile="${build.dir}/${app.name}.jar">
<fileset dir="${build.dir}/classes">
<include name="**/*.*" />
</fileset>
</jar>
</target>
<target name="lib" description="dependency jar files">
<!-- copy libraries to build dir -->
<copy todir="${build.dir}/lib" preservelastmodified="true">
<flattenmapper />
<fileset dir="lib/">
<include name="**/*.jar" />
<include name="**/*.mar" />
</fileset>
</copy>
</target>
<target name="resources" depends="prepare" >
<copy todir="${build.dir}/classes" preservelastmodified="true">
<fileset dir="${src.dir}/main/resources">
<include name="**/*" />
<exclude name="README" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${build.dir}" />
<delete file="${build.dir}/${app.name}.jar" />
</target>
<target name="compile.tests" depends="jar"
description="compile the junit test source ">
<mkdir dir="${build.test.dir}" />
<!-- Compile the java code from ${test.src} into ${test.build} -->
<javac srcdir="${test.src}"
destdir="${build.test.dir}"
debug="${compile.debug}"
deprecation="false"
optimize="false"
source="${compile.source}"
target="${compile.target}">
<classpath refid="test-classpath" />
</javac>
<!-- Copy the test resources to output directory -->
<copy todir="${build.test.dir}">
<fileset dir="test/resources" />
</copy>
<!-- Copy resources that have been placed in the src directory -->
<copy todir="${build.test.dir}">
<fileset dir="${test.src}">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<!--
<target name="GetRecordCount" depends="build" description="Run GetRecordCount" >
<echo message="Running GetRecordCount"/>
<java fork="true" dir="${basedir}" classname="edu.cornell.library.integration.GetRecordCount" >
<arg value="http://culdata.library.cornell.edu/data/voyager/bib/bib.mrc.full.done" />
<classpath>
<path refid="run-classpath"/>
</classpath>
</java>
</target>
-->
</project>