-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
75 lines (64 loc) · 2.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
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="GrowlListener" default="dist" basedir=".">
<property environment="env"/>
<property name="src" value="src"/>
<property name="build" value="build"/>
<property name="dist" value="dist"/>
<property name="lib" value="lib"/>
<property name="ant.jar" value="${env.ANT_HOME}/lib/ant.jar"/>
<path id="compile.classpath" >
<fileset dir="${lib}" includes="*.jar"/>
</path>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init" description="Compile the code">
<javac srcdir="${src}" destdir="${build}" debug="true"
classpathref="compile.classpath"/>
</target>
<target name="dist" depends="compile" description="Build a jar">
<mkdir dir="${dist}/lib"/>
<jar jarfile="${dist}/lib/growllistener.jar">
<fileset dir="${build}"/>
<fileset dir="${basedir}">
<include name="LICENSE"/>
<include name="README"/>
</fileset>
</jar>
</target>
<target name="clean" description="Clean up">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
<target name="test" depends="dist" description="Test GrowlListener">
<java classname="net.slimeslurp.growl.GrowlListener">
<classpath>
<path refid="compile.classpath"/>
<pathelement location="${dist}/lib/growllistener.jar"/>
<pathelement location="${ant.jar}"/>
</classpath>
</java>
</target>
<target name="test.echo" depends="dist" description="Test GrowlEcho task">
<taskdef name="growl" classname="net.slimeslurp.growl.GrowlEcho"/>
<growl message="regular"/>
<growl message="sticky..." sticky="true"/>
</target>
<target name="test.ncecho" depends="dist" description="Test GrowlEcho task">
<taskdef name="nc" classname="net.slimeslurp.growl.NCEcho"/>
<nc message="regular"/>
<nc message="sticky..." sticky="true"/>
</target>
<target name="test.nc" depends="dist" description="Test NCListener">
<echo>${ANT_HOME}</echo>
<java classname="net.slimeslurp.growl.NCListener">
<classpath>
<path refid="compile.classpath"/>
<pathelement location="${ant.jar}"/>
<pathelement location="${dist}/lib/growllistener.jar"/>
</classpath>
</java>
</target>
</project>