-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.xml
76 lines (62 loc) · 3.02 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
<!--
Copyright 2011 The Buzz Media, LLC
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="Simple Java XML Parser" default="dist">
<property name="dir.src" value="src/main/java" />
<property name="dir.bin" value="bin" />
<property name="dir.doc" value="docs" />
<property name="dir.lib" value="lib" />
<property name="dir.dist" value="dist" />
<property name="dir.javadoc" value="${dir.dist}/javadoc" />
<path id="classpath">
<pathelement path="${dir.lib}/xpp3-1.1.4c.jar" />
</path>
<property name="version.major" value="2" />
<property name="version.minor" value="2" />
<property name="name.file" value="sjxp" />
<property name="name.file.javadoc" value="${name.file}-${version.major}.${version.minor}-javadoc.jar" />
<property name="name.file.src" value="${name.file}-${version.major}.${version.minor}-sources.jar" />
<target name="clean">
<delete dir="${dir.bin}" />
<delete dir="${dir.dist}" />
<mkdir dir="${dir.bin}" />
<mkdir dir="${dir.dist}" />
</target>
<target name="compile" depends="clean">
<javac srcdir="${dir.src}" destdir="${dir.bin}" debug="true" source="1.5" target="1.5" classpathref="classpath" />
<copy todir="${dir.bin}">
<fileset dir="${dir.src}">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="javadoc">
<delete dir="${dir.javadoc}" />
<mkdir dir="${dir.javadoc}" />
<javadoc sourcepath="${dir.src}" destdir="${dir.javadoc}" author="true" windowtitle="Simple Java XML Parser v${version.major}.${version.minor}" footer="Copyright 2011 The Buzz Media, LLC" link="http://download.oracle.com/javase/1.5.0/docs/api/" linksource="true" classpathref="classpath" package="true" source="1.5" use="true" />
</target>
<target name="jar" depends="compile">
<jar basedir="${dir.bin}" destfile="${dir.dist}/${name.file}-${version.major}.${version.minor}.jar" compress="no" />
</target>
<target name="src">
<delete file="${dir.dist}/${name.file}-${version.major}.${version.minor}-src.zip" />
<jar compress="yes" basedir="${dir.src}" destfile="${dir.dist}/${name.file.src}" />
</target>
<target name="dist" depends="compile,javadoc,jar,src">
<copy file="README" todir="${dir.dist}" />
<copy file="LICENSE" todir="${dir.dist}" />
<copydir src="${dir.lib}" dest="${dir.dist}/${dir.lib}" />
<copydir src="${dir.doc}" dest="${dir.dist}/${dir.lib}" />
<jar compress="yes" basedir="${dir.javadoc}" destfile="${dir.dist}/${name.file.javadoc}" />
<zip compress="yes" basedir="${dir.dist}" destfile="${dir.dist}/${name.file}-${version.major}.${version.minor}.zip" />
</target>
</project>