-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
158 lines (123 loc) · 4.97 KB
/
build.xml
File metadata and controls
158 lines (123 loc) · 4.97 KB
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
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0"?>
<!--
Ant build file Batman
see:
<a href="http://ant.apache.org/">Ant Project Homepage</a>
author: Thomas Down
portions based on the biojava build.xml file by:
Michael Heuer
Keith James (JUnit support, DocBook support)
Greg Cox (fixed documentation)
portions Copyright (c) 1999-2000 The Apache Software Foundation.
-->
<project name="batman" default="all" basedir=".">
<property environment="env" />
<target name="all" depends="package-java" />
<!-- Checks environment and setup variables -->
<target name="init" description="Checks environment and setup variables">
<tstamp />
<property name="version" value="0.1" />
<property name="build.compiler" value="modern" />
<property name="bin.dir" value="./bin" />
<property name="lib.dir" value="./lib" />
<property name="src.main.dir" value="./src" />
<property name="manifest.dir" value="./manifest" />
<property name="resources.dir" value="./resources" />
<property name="classpath" value="${lib.dir}/biojava.jar:${lib.dir}/bytecode.jar:${lib.dir}/bjv2-core-0.1.jar:${lib.dir}/stax-api-1.0.1.jar:${lib.dir}/colt.jar" />
<!-- Main build directory -->
<property name="build.dir" value="./ant-build" />
<property name="build.classes.dir" value="${build.dir}/classes" />
<!-- Javac properties -->
<property name="javac.depend" value="false" />
<property name="javac.debug" value="true" />
<property name="javac.deprecation" value="false" />
<property name="javac.source" value="1.5" />
<!-- Javadoc properties -->
<property name="build.dest.docs" value="${build.dir}/docs" />
<property name="build.dest.doccheck" value="${build.dir}/docs/check" />
<property name="packages" value="net.*" />
<!-- Subdirectories for main source and classes -->
<property name="name.main" value="batman" />
<property name="Name.main" value="Batman" />
<property name="build.dest.main" value="${build.classes.dir}/${name.main}" />
<property name="build.docs.main" value="${build.dest.docs}/${name.main}" />
<property name="jar.main" value="${lib.dir}/${name.main}.jar" />
<property name="manifest.file.main" value="${manifest.dir}/${name.main}.txt" />
<!-- Echo information -->
<echo message="Building ${name.main}-${version}" />
</target>
<!--
Prepare each part of the project.
Each preparation creates working directories and copies files over.
-->
<!-- Prepares the basic stuff -->
<target name="prepare" depends="init" description="creates basic directories">
<!-- Creates directories -->
<mkdir dir="${build.dir}" />
<mkdir dir="${bin.dir}" />
</target>
<!-- Prepares the source code -->
<target name="prepare-java" depends="prepare" description="Prepares java source files">
<!-- Creates directories -->
<mkdir dir="${build.dest.main}" />
<mkdir dir="${build.docs.main}" />
</target>
<!-- Prepares the javadocs -->
<target name="prepare-javadocs" depends="prepare" description="Prepares the javadocs">
<!-- Creates directories -->
<mkdir dir="${build.dest.docs}" />
</target>
<!-- Compiles the source directory -->
<target name="compile-java" depends="prepare-java" description="Compiles the java source code">
<apt
destdir="${build.dest.main}"
depend="${javac.depend}"
deprecation="${javac.deprecation}"
debug="${javac.debug}"
srcdir="${src.main.dir}">
<classpath>
<pathelement path="${classpath}" />
<pathelement path="${build.dest.build}" />
</classpath>
<filename name="batman/**/*.java" />
</apt>
</target>
<!--
Creates the .jar files containing each distributable component.
This probably just jars up the .class files and any resources as well as
a manifest for each distributable component.
-->
<!-- Creates the biojava package (tests are left in the parallel tree) -->
<target name="package-java" depends="compile-java" description="create main class jar file">
<jar
jarfile="${jar.main}"
manifest="${manifest.file.main}"
>
<fileset dir="${build.dest.main}" />
<fileset dir="${resources.dir}" />
</jar>
</target>
<!-- Creates the API documentation -->
<target name="javadocs" depends="prepare-java" description="Creates the API documentation">
<javadoc
packagenames="${packages}"
sourcepath="${src.dir}"
classpath="${classpath}"
destdir="${build.docs.main}"
author="true"
version="true"
use="true"
source="1.4"
windowtitle="${Name.main} API"
doctitle="${Name.main}"
maxmemory="96m">
<link href="http://java.sun.com/j2se/1.4.2/docs/api/" offline="false" />
<link href="http://www.derkholm.net/autobuild/latest-docs/docs/biojava/" offline="false" />
</javadoc>
</target>
<!-- Cleans everything -->
<target name="clean" depends="init"
description="Cleans everything">
<delete dir="${build.dir}" />
</target>
</project>