-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
191 lines (179 loc) · 7.68 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
<!-- ANT BUILD FILE (Ref. http://jakarta.apache.org/ant ) -->
<project name="JScience" default="distribution" basedir=".">
<description>
JScience - Java(TM) Tools and Libraries for the Advancement of Sciences.
</description>
<target name="info">
<echo>This software includes the Javolution Library (http://javolution.org)</echo>
</target>
<target name="init">
<tstamp/>
<property name="library" value="jscience" />
<property name="version" value="4.3" />
<property name="release" value="1" />
<property name="src" value="src" />
<property name="bin" value="bin" />
<property name="lib" value="lib" />
<property name="api" value="api" />
<property name="debug" value="true" />
<property name="optimize" value="true" />
<property name="encoding" value="UTF-8" />
<property name="classpath" value="${bin};${lib}/javolution.jar;${lib}/geoapi.jar" />
</target>
<target name="compile" depends="init">
<mkdir dir="${bin}" />
<!-- Compile -->
<javac srcdir="${src}" destdir="${bin}" classpath="${classpath}" target="1.5" source="1.5"
debug="${debug}" optimize="${optimize}" encoding="${encoding}">
<!-- <compilerarg value="-Xlint"/> -->
</javac>
<!-- Updates version information (Javolution class) -->
<delete file="${bin}/org/jscience/JScience.class"/>
<filter token="VERSION" value="${version}.${release} ${TODAY}"/>
<copy file="src/org/jscience/JScience.java"
todir="${bin}/org/jscience" filtering="true"/>
<javac srcdir="${bin}" destdir="${bin}" classpath="${classpath}" target="1.5" source="1.5"
debug="${debug}" optimize="${optimize}" encoding="${encoding}"/>
<!-- Copies resources if any -->
<copy todir="${bin}" >
<fileset dir="${src}" >
<include name="**/res-files/*" />
</fileset>
</copy>
</target>
<target name="javadoc" depends="init">
<mkdir dir="${api}" />
<javadoc sourcepath="${src}"
destdir="${api}"
windowtitle="JScience v${version} API"
overview="src/overview.html"
author="true"
version="true"
classpath="${classpath}"
charset="${encoding}"
encoding="${encoding}"
docencoding="${encoding}"
stylesheetfile="doc/javadoc.css"
link="http://javolution.org/api/"
splitindex="true">
<header>
<![CDATA[<A HREF="http://jscience.org">
<SPAN CLASS="style0">J</SPAN><SPAN CLASS="style1">Science v${version}</SPAN></A>]]>
</header>
<bottom>
<![CDATA[<i>Copyright © 2006 <b>J<b>Science.</i>]]>
</bottom>
<group title="JScience modules moved to JSR-275 to be part of Java Standard Library" packages="javax.*"/>
<group title="JScience core modules" packages="org.jscience.*"/>
<packageset dir="${src}" defaultexcludes="yes">
<include name="org/jscience/**/*" />
<include name="javax/**/*" />
<exclude name="**/doc-files/**"/>
<exclude name="**/res-files/**"/>
</packageset>
</javadoc>
<!-- Formats/colarizes code between [code]...[/code] -->
<java classname="Colapi" classpath="colapi.jar">
<arg value="${api}" />
</java>
</target>
<target name="jarfile" depends="compile">
<unzip src="${lib}/javolution.jar"
dest="${bin}">
<patternset>
<include name="**/*.class"/>
</patternset>
</unzip>
<unzip src="${lib}/geoapi.jar"
dest="${bin}">
<patternset>
<include name="**/*.class"/>
</patternset>
</unzip>
<jar jarfile="${library}.jar"
basedir="${bin}"
update="false">
<manifest>
<attribute name="Main-Class"
value="org.jscience.JScience"/>
<attribute name="Specification-Title"
value="JScience - Core"/>
<attribute name="Specification-Version"
value="${version}"/>
<attribute name="Specification-Vendor"
value="JScience"/>
<attribute name="Implementation-Title"
value="JScience - Core"/>
<attribute name="Implementation-URL"
value="http://jscience.org"/>
<attribute name="Implementation-Vendor"
value="JScience"/>
<attribute name="Implementation-Version"
value="${version}.${release} ${TODAY}"/>
</manifest>
</jar>
</target>
<target name="retroweaver" depends="init">
<unzip src="retroweaver.jar"
dest="${bin}">
<patternset>
<include name="**/*.class"/>
</patternset>
</unzip>
<jar jarfile="${library}-vm14.jar"
basedir="${bin}"
update="false">
<manifest>
<attribute name="Main-Class"
value="org.jscience.JScience"/>
<attribute name="Specification-Title"
value="JScience - Core"/>
<attribute name="Specification-Version"
value="${version}-VM1.4"/>
<attribute name="Specification-Vendor"
value="JScience"/>
<attribute name="Implementation-Title"
value="JScience - Core"/>
<attribute name="Implementation-URL"
value="http://jscience.org"/>
<attribute name="Implementation-Vendor"
value="JScience"/>
<attribute name="Implementation-Version"
value="${version}.${release} ${TODAY} VM1.4"/>
</manifest>
</jar>
</target>
<target name="clean" depends="init">
<delete dir="${bin}" />
<delete dir="${api}" />
<delete file="${library}.jar"/>
<delete file="${library}-${version}.${release}-src.zip"/>
<delete file="${library}-${version}.${release}-bin.zip"/>
</target>
<target name="distribution" depends="info, clean, jarfile, javadoc">
<zip destfile="${library}-${version}.${release}-src.zip" update="false">
<zipfileset dir="." prefix="${library}-${version}"
includes="${src}/**/*, doc/**/*, ${lib}/javolution.jar, ${lib}/geoapi.jar,
colapi.jar, index.html, build.xml" />
</zip>
<zip destfile="${library}-${version}.${release}-bin.zip" update="false">
<zipfileset dir="." prefix="${library}-${version}"
includes="doc/**/*, ${api}/**/*,
index.html, ${library}.jar" />
</zip>
</target>
<!-- NETBEANS SUPPORT -->
<target name="run" depends="clean, compile">
<java classpath="${classpath}" classname="org.jscience.JScience" fork="true">
<jvmarg value="-server" />
<jvmarg value="-Xms512M" />
<jvmarg value="-Xmx512M" />
<arg value="perf" />
</java>
</target>
<target name="test" depends="clean, compile">
<java classpath="${classpath}" classname="org.jscience.JScience" fork="true">
<arg value="test" />
</java>
</target>
</project>