-
Notifications
You must be signed in to change notification settings - Fork 85
/
build.xml
78 lines (69 loc) · 2.07 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
<?xml version="1.0"?>
<project name="JavaNSQClient" default="jar" basedir=".">
<fileset id="lib" dir="lib">
<include name="*.jar" />
</fileset>
<path id="build.classpath">
<fileset refid="lib" />
</path>
<target name="clean">
<delete dir="build"/>
</target>
<target name="compile"
description="Compile the Java source code"
depends="clean"
>
<mkdir dir="build/classes"/>
<javac classpathref="build.classpath" destdir="build/classes" debug="true">
<src path="src" />
</javac>
</target>
<target name="jar" depends="compile">
<property name="version.num" value="1.00" />
<buildnumber file="build/build.num"/>
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<mkdir dir="build/jar"/>
<copy todir="build/jar">
<fileset dir="build/classes">
<include name="**/*.class"/>
</fileset>
</copy>
<mkdir dir="build/jar/META-INF"/>
<property name="jar-all" location="lib" />
<fileset id="jars" dir="${jar-all}">
<include name="*.jar" />
</fileset>
<path id="cp"> <fileset refid="jars" /> </path>
<pathconvert property="classpath" refid="cp"
pathsep=" " dirsep="/">
<map from="${jar-all}" to="lib" />
</pathconvert>
<!-- build the manifest -->
<manifest file="build/jar/META-INF/MANIFEST.MF">
<attribute name="Built-By" value="Dustin Norlander"/>
<attribute name="Implementation-Version"
value="${version.num}-b${build.number}"/>
<attribute name="Built-Date" value="${TODAY}"/>
<attribute name="Class-Path" value="${classpath}"/>
</manifest>
<jar destfile="build/nsq-client.jar"
basedir="build/jar"
manifest="build/jar/META-INF/MANIFEST.MF"
>
<exclude name="*.jar" />
<include name="**/*"/>
</jar>
</target>
<target name="javadoc" description="Create Javadocs">
<mkdir dir="build/javadoc/"/>
<javadoc
destdir="build/javadoc/"
classpathref="build.classpath"
access="public"
>
<fileset dir="src" includes="**/*.java" />
</javadoc>
</target>
</project>