-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
112 lines (94 loc) · 3.63 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
<!--
$Id: build.xml,v 1.4 2006/05/18 20:52:11 mat127 Exp $
The Lotus Notes Notifier build file
-->
<project name="lnn" default="all" basedir=".">
<property file="${basedir}/build.properties"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="class.dir" value="${build.dir}/classes"/>
<property name="doc.dir" value="${basedir}/doc"/>
<property name="conf.dir" value="${basedir}/etc"/>
<!-- default properties file if the "lnn.properties.file" property is not set -->
<condition property="lnn.properties.file" value="${conf.dir}/lnn.properties">
<not><isset property="lnn.properties.file"/></not>
</condition>
<!-- Lotus Notes classpath -->
<path id="notes.classpath">
<pathelement location="${notes.home}/Notes.jar"/>
</path>
<!-- Smack API (http://www.jivesoftware.org/smack/) -->
<path id="smack.classpath">
<pathelement location="${smack.home}/smack.jar" />
<pathelement location="${smack.home}/smackx.jar" />
</path>
<!-- The compile classpath -->
<path id="compile.classpath">
<path refid="notes.classpath"/>
<path refid="smack.classpath"/>
<pathelement location="${class.dir}"/>
</path>
<!-- Initialises the build -->
<target name="prepare">
<mkdir dir="${class.dir}"/>
<mkdir dir="${doc.dir}"/>
</target>
<!-- Clean up the build -->
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${doc.dir}" />
</target>
<!-- Compiles the source code -->
<target name="compile" depends="prepare">
<javac destdir="${class.dir}" classpathref="compile.classpath" debug="on">
<src path="${src.dir}"/>
</javac>
</target>
<!-- generate API docs -->
<target name="doc" depends="compile">
<javadoc destdir="${doc.dir}/api" classpathref="compile.classpath">
<fileset dir="${src.dir}">
<include name="net/sf/lnn/DocumentNotifier.java"/>
<include name="net/sf/lnn/DocumentNotifierException.java"/>
</fileset>
</javadoc>
</target>
<!-- package agent jar -->
<target name="package" depends="compile">
<jar destfile="${build.dir}/lnn.jar">
<fileset dir="${class.dir}" excludes="net/sf/lnn/test/**" />
</jar>
</target>
<!-- package binary distribution -->
<target name="package-bin" depends="package, doc">
<jar destfile="${build.dir}/lnn-${lnn.version}.jar">
<zipfileset file="${build.dir}/lnn.jar" prefix="lnn-${lnn.version}" />
<zipfileset file="${conf.dir}/lnn.properties" prefix="lnn-${lnn.version}" />
<zipfileset dir="${doc.dir}" prefix="lnn-${lnn.version}/doc"/>
</jar>
</target>
<!-- package source code distribution -->
<target name="package-src" depends="doc">
<jar destfile="${build.dir}/lnn-${lnn.version}-src.jar">
<zipfileset dir="${basedir}" prefix="lnn-${lnn.version}-src">
<include name="src/**/*.java"/>
<exclude name="src/net/sf/lnn/test/**"/>
<include name="etc/lnn.properties"/>
<include name="doc/README.html"/>
<include name="build.xml"/>
<include name="build.properties"/>
</zipfileset>
</jar>
</target>
<!-- It is neccessary for the agent installation to have all the jars in the same dir -->
<target name="install" depends="package">
<copy todir="${build.dir}">
<fileset dir="${smack.home}" includes="smack.jar,smackx.jar"/>
</copy>
<copy file="${lnn.properties.file}" tofile="${build.dir}/lnn.properties" overwrite="true"/>
</target>
<target name="test-jabber" depends="compile">
<java classname="net.sf.lnn.test.SmackTest" classpathref="compile.classpath" />
</target>
<target name="all" depends="package" />
</project>