-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.xml
162 lines (138 loc) · 5.28 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<project name='Stomp' default='compile-test' basedir='.'>
<property name='build' location='build'/>
<property name='src' location='java'/>
<property name='dest' location='classes'/>
<property name='libs' location='lib/junit.jar'/>
<property name='release' value='0.4.1'/>
<property name='debug' value='No'/>
<target name='compile-java-dist' depends='info,compile-java'/>
<target name='compile-test'>
<mkdir dir="${dest}"/>
<javac srcdir='${src}' destdir='${dest}' debug='on'
classpath='${libs}'/>
</target>
<target name='compile-java'>
<property file='info.txt'/>
<property name='debug' value='true'/>
<filter token='release' value='${release}'/>
<filter token='revision' value='${Revision}'/>
<mkdir dir='build'/>
<copy todir='build' filtering='true'>
<fileset dir='java' excludes='**/.svn/**'/>
</copy>
<mkdir dir='${dest}'/>
<javac srcdir='build' destdir='${dest}' debug='true'
excludes='Test.java'/>
<delete dir='build'/>
</target>
<target name='clean'>
<delete dir='classes'/>
<delete dir='build'/>
<delete file='info.txt'/>
<delete>
<fileset dir='.'>
<include name='gozirra-*.tar.gz'/>
<include name='gozirra-*.jar'/>
<include name='gozirra-server-*.jar'/>
<include name='gozirra-client-*.jar'/>
<include name='web.tgz'/>
<include name='dist.xml'/>
</fileset>
</delete>
</target>
<target name='all-jar' depends='compile-java-dist'>
<delete file='gozirra-${release}.jar'/>
<jar destfile='gozirra-${release}.jar' basedir='${dest}'
excludes='Test*.class'/>
</target>
<target name='server-only-jar' depends='compile-java-dist'>
<!-- Application -->
<manifest file='manifest'>
<attribute name='Main-Class' value='net.ser1.stomp.Server'/>
</manifest>
<jar destfile='gozirra-server-${release}.jar' manifest='manifest'>
<fileset dir='${dest}'>
<include name='net/ser1/stomp/Message.class'/>
<include name='net/ser1/stomp/Server.class'/>
<include name='net/ser1/stomp/MessageReceiver.class'/>
<include name='net/ser1/stomp/Stomp.class'/>
<include name='net/ser1/stomp/Receiver.class'/>
<include name='net/ser1/stomp/Server$ConnectionListener.class'/>
<include name='net/ser1/stomp/IntraVMClient.class'/>
<include name='net/ser1/stomp/Server$SocketHandler.class'/>
<include name='net/ser1/stomp/Transmitter.class'/>
<include name='net/ser1/stomp/Queue.class'/>
<include name='net/ser1/stomp/Listener.class'/>
<include name='net/ser1/stomp/AbstractListener.class'/>
<include name='net/ser1/stomp/FileQueue.class'/>
<include name='net/ser1/stomp/Command.class'/>
<include name='net/ser1/stomp/Version.class'/>
</fileset>
</jar>
<delete file='manifest'/>
</target>
<target name='client-only-jar' depends='compile-java-dist'>
<jar destfile='gozirra-client-${release}.jar'>
<fileset dir='${dest}'>
<include name='net/ser1/stomp/Message.class'/>
<include name='net/ser1/stomp/MessageReceiver.class'/>
<include name='net/ser1/stomp/Stomp.class'/>
<include name='net/ser1/stomp/Receiver.class'/>
<include name='net/ser1/stomp/Transmitter.class'/>
<include name='net/ser1/stomp/Client.class'/>
<include name='net/ser1/stomp/Listener.class'/>
<include name='net/ser1/stomp/AbstractListener.class'/>
<include name='net/ser1/stomp/Command.class'/>
<include name='net/ser1/stomp/Version.class'/>
</fileset>
</jar>
</target>
<target name='source-tarball' depends='info'>
<property file='info.txt'/>
<filter token='release' value='${release}'/>
<filter token='revision' value='${Revision}'/>
<mkdir dir='dist'/>
<mkdir dir='dist/gozirra-${release}'/>
<copy todir='dist/gozirra-${release}' filtering='true'>
<fileset dir='.' includes='java/**,README,build.xml,info.txt'
excludes='**/.svn/**'/>
</copy>
<tar tarfile='gozirra.tar' basedir='dist'/>
<gzip zipfile='gozirra-${release}.tar.gz' src='gozirra.tar'/>
<delete>
<fileset dir='.' includes='gozirra.tar'/>
</delete>
<delete dir='dist'/>
</target>
<target name='web'>
<property file='info.txt'/>
<filter token='release' value='${release}'/>
<filter token='revision' value='${Revision}'/>
<mkdir dir='dist'/>
<copy todir='dist' filtering='true'>
<fileset dir='doc' includes='index.html'/>
<fileset dir='doc' includes='dist.xml'/>
</copy>
<copy todir='.' file='doc/dist.xml' filtering='true'/>
<tar tarfile='web.tar' basedir='dist'/>
<gzip zipfile='web.tgz' src='web.tar'/>
<delete> <fileset dir='.' includes='web.tar'/> </delete>
<delete dir='dist'/>
</target>
<target name='test'>
<junit printsummary="yes" haltonfailure="yes">
<classpath>
<pathelement location='${dest}'/>
</classpath>
<test name='Test'/>
</junit>
</target>
<target name='build-dist'
depends='info,all-jar,server-only-jar,client-only-jar,source-tarball,web'/>
<target name='info'>
<exec executable='svn' output='info.txt'>
<arg line='info'/>
</exec>
<replace file='info.txt' token=': ' value='='/>
</target>
</project>