-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
109 lines (85 loc) · 3.52 KB
/
build.xml
File metadata and controls
109 lines (85 loc) · 3.52 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
<!--
Copyright 2011 Kitware Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="NBIAAdapter" default="dist" basedir=".">
<description>
Java code to interface with NBIA.
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="lib.root" location="lib"/>
<!-- Set this to the location of the nbia grid clent jars. I
downloaded nbia_grid_client-jars-full_5.0.zip from
https://gforge.nci.nih.gov/frs/download.php/9090/nbia_grid_client-jars-full_5.0.zip-->
<property name="lib.nbia"
value="${lib.root}/nbia_grid_client-jars-full_5.0/"
/>
<!-- Build jargs from git://github.com/purcell/jargs.git -->
<property name="lib.jargs"
value="${lib.root}/jargs/"
/>
<!-- We also need castor apparently: http://dist.codehaus.org/castor/1.3.1/castor-1.3.1.zip -->
<property name="lib.castor"
value="${lib.root}/castor-1.3.1/" />
<!-- We use google-gson for json processing in Java. It's pretty nice: http://google-gson.googlecode.com/files/google-gson-1.6-release.zip -->
<property name="lib.gson"
value="${lib.root}/google-gson-1.6/" />
<!-- classpath definition -->
<path id="classpath">
<fileset dir="${lib.nbia}" includes="**/*.jar" />
<fileset dir="${lib.jargs}" includes="**/*.jar" />
<fileset dir="${lib.castor}" includes="**/*.jar" />
<fileset dir="${lib.gson}" includes="**/*.jar" />
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="compile"
depends="init"
description="compile the source" >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" classpathref="classpath"
includeantruntime="false" />
</target>
<target name="dist" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/lib/${ant.project.name}-${DSTAMP}.jar"
basedir="${build}">
<manifest>
<attribute name="Main-Class"
value="com.kitware.nbia.NBIAAdapter" />
</manifest>
<zipgroupfileset excludes="META-INF/*.SF" dir="${lib.jargs}" includes="*.jar"/>
<zipgroupfileset excludes="META-INF/*.SF" dir="${lib.castor}" includes="*.jar"/>
<zipgroupfileset excludes="META-INF/*.SF" dir="${lib.gson}" includes="*.jar"/>
</jar>
</target>
<target name="release" depends="dist" description="generate a release" >
<copy file="${dist}/lib/${ant.project.name}-${DSTAMP}.jar"
tofile="${dist}/lib/${ant.project.name}.jar"
overwrite="true" />
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} dinrectory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>