forked from sanger-pathogens/Artemis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
166 lines (141 loc) · 5.26 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?xml version="1.0"?>
<!--
Ant build file for Artemis
-->
<project default="package" basedir=".">
<target name="init">
<tstamp />
<property name="name" value="artemis" />
<property name="version" value="live" />
<property name="build.compiler" value="modern" />
<property name="classpath" value="" />
<property name="src.dir" value="" />
<property name="docs.dir" value="docs" />
<property name="packages" value="uk.*" />
<property name="build.dir" value="./ant-build" />
<!-- Subdirectories for main source and classes -->
<property name="build.src.main" value="${build.dir}/src/main" />
<property name="build.dest.main" value="${build.dir}/classes/main" />
<!-- Subdirectories for tests source and classes -->
<property name="build.src.tests" value="${build.dir}/src/tests" />
<property name="build.dest.tests" value="${build.dir}/classes/tests" />
<!-- Subdirectories for docs -->
<property name="build.src.docs" value="${build.dir}/src/docs" />
<property name="build.dest.docs" value="${build.dir}/docs" />
<property name="build.dest.javadocs" value="${build.dest.docs}/api" />
<!-- Subdirectory for libraries used during build -->
<property name="build.src.main.lib" value="${build.src.main}/lib" />
<property name="dist.root" value="./dist" />
<property name="dist.dir" value="${dist.root}/${name}-${version}" />
<!-- Compile classpath -->
<path id="compile.classpath">
<!-- Main classes from build -->
<pathelement path="${build.src.main}" />
<!-- Dependency classes -->
<fileset dir="${build.src.main}/lib">
<include name="**.jar" />
</fileset>
<fileset dir="${build.src.main}/lib">
<include name="**/*.jar" />
<exclude name="j2ssh/j2ssh-artemis-plugin.jar"/>
</fileset>
</path>
</target>
<!-- Prepares the build directory -->
<target name="prepare" depends="init">
<mkdir dir="${build.dir}" />
</target>
<!-- Prepares the source code -->
<target name="prepare-core" depends="init,prepare">
<!-- Creates directories -->
<mkdir dir="${build.src.main}" />
<mkdir dir="${build.dest.main}" />
<mkdir dir="${build.src.docs}" />
<mkdir dir="${build.dest.docs}" />
<mkdir dir="${build.dest.javadocs}" />
<!-- Copies src files -->
<copy todir="${build.src.main}">
<fileset dir="${src.dir}">
<exclude name="**/CVS/**" />
<exclude name="test/**" />
<exclude name="ant-build/**" />
</fileset>
</copy>
<!-- Copies docs files -->
<copy todir="${build.src.docs}">
<fileset dir="${docs.dir}">
<exclude name="**/CVS/**" />
</fileset>
</copy>
<!-- Copies jars -->
<copy todir="${build.dir}">
<fileset dir=".">
<include name="*.jar" />
<exclude name="${docbook.tools.file}" />
</fileset>
</copy>
</target>
<target name="prepare-src" depends="init,prepare-core" />
<!-- Compile IDL stub classes into the build directory (jar preparation) -->
<target name="compile-idl" depends="init,prepare-core">
<exec executable="idlj" dir="${build.src.main}">
<arg line="-Icorba corba/types.idl" />
</exec>
<exec executable="idlj" dir="${build.src.main}">
<arg line="-Icorba corba/nsdb.idl" />
</exec>
<exec executable="idlj" dir="${build.src.main}">
<arg line="-Icorba corba/nsdb_write.idl" />
</exec>
<exec executable="idlj" dir="${build.src.main}">
<arg line="-Icorba corba/seqdb.idl" />
</exec>
</target>
<!-- Compiles the source directory -->
<target name="compile" depends="init,compile-idl,prepare-src">
<javac
fork="true"
memoryinitialsize="256m"
memorymaximumsize="256m"
srcdir="${build.src.main}"
destdir="${build.dest.main}"
excludes="nsdb/**,seqdb/**,type/**,lib/**,src/**,uk/ac/sanger/artemis/components/MacHandler.java,uk/ac/sanger/artemis/components/filetree/FileTree.java,uk/ac/sanger/artemis/components/filetree/SshFileTree.java,uk/ac/sanger/artemis/ExternalProgramUtils.java"
deprecation="false"
depend="no"
debug="true">
<classpath refid="compile.classpath"/>
</javac>
</target>
<!-- Creates the chado class package -->
<target name="chado-access" depends="init,compile">
<jar
jarfile="${build.dir}/chado-access.jar"
basedir="${build.dest.main}"
manifest="META-INF/MANIFEST.MF"
includes="uk/ac/sanger/artemis/chado/**,uk/ac/sanger/artemis/util/ByteBuffer*"
/>
<jar
jarfile="${build.dir}/chado-access.jar"
update="yes"
basedir="${build.src.main}"
includes="artemis_sqlmap/**,uk/ac/sanger/artemis/chado/**,uk/ac/sanger/artemis/util/ByteBuffer*"
/>
</target>
<!-- Creates the class package -->
<target name="package" depends="init,compile">
<jar
jarfile="${build.dir}/${name}.jar"
basedir="${build.dest.main}"
manifest="META-INF/MANIFEST.MF"
includes="**"
/>
</target>
<!-- Cleans everything -->
<target name="clean" depends="init">
<delete dir="${build.dir}" />
<delete dir="${dist.root}" />
<delete file="${name}-${version}.tar.gz" />
<delete file="${name}-${version}.tar" />
<delete file="${name}-${version}.zip" />
</target>
</project>