-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
114 lines (101 loc) · 3.56 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
<!-- Build the Fulfillment stuff -->
<project name="jmdns" default="help" basedir=".">
<target name="init">
<tstamp/>
</target>
<!-- Configure the context PATH for this application -->
<property name="src" value="./src" />
<property name="dest" value="./classes"/>
<property name="doc" value="./docs"/>
<property name="version" value="2.0"/>
<!-- Configure custom Ant tasks for the Manager application -->
<path id="jmdns.classpath">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="help" description="Prints brief help message to screen">
<echo message="usage:"/>
<echo message=" ant TARGET where TARGET is one of the following:"/>
<echo message=" build --- Compiles the JmDNS sources. Including the tools"/>
<echo message=" tools --- Compiles the tools: The browser and main class"/>
<echo message=" samples --- Compiles the samples in the samples package"/>
<echo message=" jar --- Creates the jmdns.jar file "/>
<echo message=" javadoc --- Creates the javadoc docs "/>
<echo message=" release --- Creates a release "/>
<echo message=" clean --- Cleanup time! "/>
<echo message=" help --- This message "/>
</target>
<!-- Executable Targets -->
<target name="build" depends="init" description="compile the generated source">
<javac srcdir= "${src}" destdir="${dest}" debug="true">
<include name="javax/**/*.java" />
<classpath refid="jmdns.classpath"/>
</javac>
</target>
<target name="tools" depends="build" description="Main program" >
<javac srcdir="${src}" destdir="${dest}">
<include name="com/**/tools/*.java"/>
<classpath refid="jmdns.classpath"/>
</javac>
</target>
<target name="samples" depends="build" description="Sample programs" >
<javac srcdir="${src}" destdir="${dest}">
<include name="samples/*.java"/>
<classpath refid="jmdns.classpath"/>
</javac>
</target>
<target name="jar" depends="build,tools" description="Jar the files">
<jar destfile="lib/jmdns.jar"
manifest="lib/jmdns.manifest"
basedir="${dest}"
includes="**/*.class"/>
</target>
<target name="javadoc" depends="build" description="Create the java doc">
<javadoc
destdir="${doc}"
author="true"
version="true"
header="JmDNS ${version}"
windowtitle="JmDNS">
<fileset dir="${src}" defaultexcludes="yes">
<include name="javax/**/*.java"/>
<include name="com/**/*.java"/>
</fileset>
<doctitle><![CDATA[<H1>JmDNS</h1>]]></doctitle>
</javadoc>
</target>
<target name="release" depends="build,tools,javadoc,jar" description="Create a release">
<delete dir="jmdns-${version}"/>
<copy todir="jmdns-${version}">
<fileset dir="." includes="*.txt"/>
<fileset dir="." includes="NOTICE"/>
<fileset dir="." includes="LICENSE"/>
<fileset dir="." includes="lib/jmdns.jar"/>
<fileset dir="." includes="src/**/*.java"/>
<fileset dir="." includes="docs/**"/>
</copy>
<zip destfile="jmdns-${version}.zip">
<fileset dir="." includes="jmdns-${version}/**"/>
</zip>
<tar destfile="jmdns-${version}.tar">
<tarfileset dir="." includes="jmdns-${version}/**"/>
</tar>
<gzip destfile="jmdns-${version}.tar.gz" src="jmdns-${version}.tar"/>
</target>
<target name="clean">
<delete dir="jmdns-${version}"/>
<delete includeEmptyDirs="true">
<fileset dir="classes" includes="**"/>
<fileset dir="docs" includes="**"/>
<fileset dir="lib" includes="jmdns.jar"/>
<fileset dir="." includes="jmdns-**"/>
</delete>
<delete>
<fileset defaultexcludes="false" dir=".">
<include name="**/.*"/>
<include name="**/*~"/>
</fileset>
</delete>
</target>
</project>