-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
executable file
·198 lines (147 loc) · 5.49 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<project name="jhplot" default="dist" basedir=".">
<description>
jhplot build file of the DMelt project.
</description>
<property file="abuild.properties"/>
<!-- set global properties for this build -->
<property name="app.version" value="${build.version}"/>
<property name="app.author" value="${build.author}"/>
<property name="app.name" value="JHPlot"/>
<!-- set global properties for this build -->
<property name="src.dir" location="src" />
<property name="build.dir" location="build"/>
<property name="dist" location="dist" />
<property name="lib.dir" value="lib"/>
<property name="javadoc.dir" value="doc/api" />
<property name="prop.dir" location="${src.dir}/properties"/>
<property name="icons.dir" location="${src.dir}/icons"/>
<property name="resource.dir" location="${src.dir}/resources"/>
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<!-- Build the CLASSPATH -->
<path id="classpath_run">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
<fileset dir="." includes="jhplot.jar"/>
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build.dir}"/>
<mkdir dir="${javadoc.dir}" />
<delete file="${lib.dir}/system/jhplot.jar"/>
</target>
<target name="copybeforecompile" depends="init">
<!-- make necessary manifest -->
<manifest file="${src.dir}/META-INF/MANIFEST.MF">
<attribute name="Built-By" value="${app.author}"/>
<attribute name="Main-Class" value="test.Main"/>
<attribute name="Class-Path" value=""/>
<attribute name="Built-Date" value="${DSTAMP}"/>
<attribute name="Version" value="${app.version}"/>
</manifest>
<copy todir="${build.dir}">
<fileset dir="${src.dir}">
<patternset>
<exclude name="**/*.java*" />
<exclude name="**/*.odg" />
<exclude name="**/*.odp" />
<exclude name="**/*.*~" />
<exclude name="**/*.bak" />
<exclude name="**/*.pdf" />
<exclude name="**/*_old" />
</patternset>
</fileset>
</copy>
<!-- jaxoDraw -->
<copy todir="${build.dir}">
<fileset dir="${prop.dir}">
<include name="*.properties"/>
</fileset>
</copy>
<copy todir="${build.dir}">
<fileset dir="${resource.dir}"/>
<mapper>
<globmapper from="*" to="resources/*"/>
</mapper>
</copy>
</target>
<target name="compile" depends="init,copybeforecompile"
description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src.dir}" destdir="${build.dir}"
debug="on" deprecation="off" optimize="on"
target="${build.targetversion}" source="${build.sourceversion}"
classpathref="classpath">
</javac>
</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="jhplot.jar"
basedir="${build.dir}"
index="true"
manifest="${build.dir}/META-INF/MANIFEST.MF"/>
</target>
<target name="run" depends="dist">
<!-- run the class -->
<java classname="test.Main"
fork="true"
failonerror="true"
maxmemory="64m"
>
<!-- add a command line arg: <arg value="-h"/> -->
<arg value="-h"/>
<classpath>
<!-- use the value of the ${classpath} property in the classpath -->
<!-- <pathelement path="${classpath_run}"/> -->
<!-- include all jar files -->
<pathelement path="${java.class.path}"/>
<fileset dir=".">
<include name="jhplot.jar"/>
</fileset>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</java>
</target>
<target name="javadoc" depends="init,cleandoc">
<javadoc destdir="${javadoc.dir}"
author="true"
version="false"
use="true"
splitindex="true"
source="${build.sourceversion}"
overview="doc/symbols.html"
link="http://download.oracle.com/javase/7/docs/api/"
windowtitle="DataMelt-${build.version} API - jHPlot" classpathref="classpath">
<!--
<classpath>
<pathelement path="${java.class.path}/"/>
</classpath>
-->
<packageset dir="${src.dir}" >
<include name="jhplot/**" />
<include name="carmetal/objects/**" />
<exclude name="jhplot/gui/**" />
</packageset>
<bottom><![CDATA[<i>© Copyright 2005-2011 S.Chekanov. All Rights Reserved.
<br>jHPlot package, a part of <a href="http://jwork.org/dmelt/">DataMelt</a>: is a full-featured multiplatform data-analysis framework</i>]]></bottom>
</javadoc>
</target>
<target name="cleandoc"
description="clean up javadoc" >
<delete dir="doc/api"/>
</target>
<target name="clean"
description="clean up" >
<delete dir="${build.dir}"/>
<delete dir="${dist}"/>
<delete file="jhplot.jar"/>
<delete dir="doc"/>
</target>
</project>