-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
132 lines (114 loc) · 4.38 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="plex-viewer" default="default" basedir=".">
<property name="version.num" value="1.0.0" />
<property name="build.dir" value="build" />
<property name="bin.dir" value="${build.dir}/bin" />
<property name="temp.dir" value="temp" />
<property name="src_test.dir" value="src_test" />
<property name="src.dir" value="src" />
<property name="lib.dir" value="lib" />
<property name="doc.dir" value="doc" />
<property name="dist.dir" value="dist" />
<property name="examples.dir" value="examples" />
<property name="doc.overview" value="doc_includes/overview.htm" />
<property name="package.name" value="edu.stanford.math.plex-viewer" />
<property name="runnable.jar" value="${dist.dir}/plex-viewer-${version.num}.jar" />
<property name="basic.jar" value="${temp.dir}/plex-viewer.jar" />
<property name="source.tarball" value="${dist.dir}/plex-viewer-src-${version.num}.tar.gz" />
<property name="doc.tarball" value="${dist.dir}/plex-viewer-doc-${version.num}.tar.gz" />
<property name="examples.tarball" value="${dist.dir}/plex-viewer-examples-${version.num}.tar.gz" />
<property name="ant.build.javac.source" value="1.5" />
<property name="ant.build.javac.target" value="1.5" />
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
<fileset dir="${lib.dir}/ext">
<include name="*.jar" />
</fileset>
</path>
<property name="debug.flag" value="off" />
<!--Default target-->
<target name="default" depends="clean,dist" />
<!--All targets-->
<target name="all" depends="clean,dist" />
<!--Clean targets-->
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${temp.dir}" />
<delete>
<fileset dir="." includes="TEST*.txt" />
</delete>
</target>
<target name="clean_dist" depends="clean">
<delete dir="${dist.dir}" />
</target>
<target name="clean_all" depends="clean,clean_dist" />
<!--Initialization targets-->
<target name="init">
<mkdir dir="${build.dir}" />
<mkdir dir="${bin.dir}" />
<mkdir dir="${dist.dir}" />
<mkdir dir="${temp.dir}" />
</target>
<!--Documentation targets-->
<target name="doc" depends="javadoc" />
<target name="javadoc">
<javadoc destdir="${doc.dir}" classpathref="classpath" Overview="${doc.overview}" sourcepath="${src.dir}">
<package name="${package.name}" />
<fileset dir="${src.dir}" />
</javadoc>
</target>
<!--Bin targets-->
<target name="classes" depends="init">
<javac destdir="${bin.dir}" classpathref="classpath" debug="${debug.flag}" includeAntRuntime="false" source="1.5" target="1.5">
<compilerarg value="-Xlint" />
<src>
<pathelement path="${src.dir}" />
</src>
</javac>
</target>
<!--Distribution targets-->
<target name="dist" depends="clean_dist,runnable_jar,doc_tar,source_dist,example_dist" />
<target name="doc_tar" depends="javadoc">
<tar destfile="${doc.tarball}" compression="gzip">
<tarfileset dir="doc" prefix="javadoc">
<include name="*.html" />
<include name="**/*.html" />
</tarfileset>
</tar>
</target>
<target name="source_dist">
<tar destfile="${source.tarball}" compression="gzip">
<tarfileset dir="${src.dir}" prefix="src">
<include name="**" />
<exclude name="**.svn/**" />
</tarfileset>
</tar>
</target>
<!--Runnable jar file-->
<target name="runnable_jar" depends="classes">
<jar destfile="${runnable.jar}" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="edu.stanford.math.plex_viewer.SimplexStreamViewer" />
<attribute name="Class-Path" value="." />
</manifest>
<fileset dir="${bin.dir}" />
<!--<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/javaplex.jar" />-->
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/ext/gluegen-rt.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/ext/jogl.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/commons-cli-1.2.jar" />
</jar>
</target>
<target name="example_dist" depends="runnable_jar">
<copy file="${runnable.jar}" tofile="${examples.dir}/plex-viewer.jar" />
<tar destfile="${examples.tarball}" compression="gzip">
<tarfileset dir="examples" prefix="plex-viewer/examples" preserveLeadingSlashes="true">
<include name="**" />
</tarfileset>
<tarfileset dir="lib" prefix="plex-viewer/lib" preserveLeadingSlashes="true">
<include name="**" />
</tarfileset>
</tar>
</target>
</project>