-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
140 lines (122 loc) · 4.93 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
<project name="strainer" default="compile" basedir=".">
<description>
simple build file for the strainer java project
</description>
<!-- set global properties for this build -->
<property name="my.version" value="0.9.7b"/>
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="my.dist.name" value="Strainer-pkg-${my.version}"/>
<property name="my.jar.exe" value="strainer-${my.version}.jar"/>
<property name="my.source.name" value="Strainer-src-${my.version}"/>
<property name="dist" location="${my.dist.name}"/>
<property name="my.main.class" value="amd.strainer.display.Main"/>
<path id="project.build.class.path">
<pathelement location="lib/biojava-1.7.1.jar"/>
<pathelement location="lib/junit-4.4.jar"/>
<pathelement location="lib/jaligner.jar"/>
</path>
<path id="project.run.class.path">
<pathelement location="lib/biojava-1.7.1.jar"/>
<pathelement location="lib/jlfgr-1_0.jar"/>
<pathelement location="lib/bytecode.jar"/>
<pathelement location="lib/jaligner.jar"/>
<pathelement path="build/"/>
<pathelement path="src/"/>
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
</target>
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}">
<classpath refid="project.build.class.path"/>
</javac>
</target>
<target name="genes" depends="compile"
description="run gene strainer on all genes" >
<pathconvert targetos="unix" property="run.path.unix" refid="project.run.class.path"/>
<echo>${run.path.unix}</echo>
<java classname="amd.strainer.AutoStrainEntry" fork="true" maxmemory="396m">
<classpath refid="project.run.class.path"/>
</java>
</target>
<target name="run" depends="compile"
description="launches the GUI" >
<pathconvert targetos="unix" property="run.path.unix" refid="project.run.class.path"/>
<echo>${run.path.unix}</echo>
<java classname="${my.main.class}" fork="true" maxmemory="1396m">
<classpath refid="project.run.class.path"/>
</java>
</target>
<target name="jar" depends="compile"
description="package class files" >
<!-- unpack needed jars into build dir as a hack -->
<unjar src="lib/jlfgr-1_0.jar" dest="${build}"/>
<unjar src="lib/biojava-1.7.1.jar" dest="${build}"/>
<unjar src="lib/bytecode.jar" dest="${build}"/>
<unjar src="lib/jaligner.jar" dest="${build}"/>
<!--unjar src="lib/xerces.jar" dest="${build}"/>
<unjar src="lib/commons-cli.jar" dest="${build}"/>
<unjar src="lib/commons-collections-2.1.jar" dest="${build}"/>
<unjar src="lib/commons-pool-1.1.jar" dest="${build}"/>
<unjar src="lib/commons-dbcp-1.1.jar" dest="${build}"/-->
<jar jarfile="${my.jar.exe}" basedir="${build}">
<manifest>
<!--attribute name="Class-Path" value="jlfgr-1_0.jar mysql-connector-java-3.1.6.bin.jar biojava-1.30-jdk14.jar bytecode-0.91.jar jakarta-regexp.jar xerces.jar"/-->
<attribute name="Main-Class" value="${my.main.class}"/>
</manifest>
</jar>
</target>
<target name="dist" depends="jar"
description="generate the distribution" >
<!-- copy todir="${dist}/lib">
<fileset dir="lib">
<include name="*.jar"/>
<include name="*.zip"/>
</fileset>
<fileset dir=".">
<include name="applet.html"/>
</fileset>
</copy -->
<copy todir="${dist}">
<fileset dir=".">
<include name="README.txt"/>
<include name="License.txt"/>
<include name="Manual.doc"/>
<include name="Manual.pdf"/>
</fileset>
</copy>
<copy file="${my.jar.exe}" tofile="${dist}/lib/strainer.jar"/>
</target>
<target name="package" depends="dist"
description="generate the final file" >
<jar jarfile="${my.dist.name}.jar" basedir="${dist}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Date-Stamp" value="${DSTAMP}"/>
</manifest>
</jar>
</target>
<target name="source"
description="generate the source archive file" >
<jar jarfile="${my.source.name}.jar" basedir="." includes="Manual.pdf Manual.doc License.txt README.txt src/** build.xml lib/biojava-1.4.jar lib/junit_3.8.1.jar lib/biojava-1.4.jar lib/jlfgr-1_0.jar lib/bytecode-0.92.jar">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Date-Stamp" value="${DSTAMP}"/>
</manifest>
</jar>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>