source: tags/0.9.0/build.xml

Last change on this file was 12, checked in by bowman, 14 years ago

Added build number + a hack to use the current svn repository revision as build number for cardservproxy.jar, when the ant build is able to execute svnversion (needs to be in PATH).

File size: 6.5 KB
Line 
1<?xml version="1.0"?>
2
3<project name="cardservproxy" default="tar-app" basedir=".">
4
5 <target name="prepare-build">
6 <delete dir="classes" />
7 <mkdir dir="classes" />
8 <path id="classpath">
9 <fileset dir="lib">
10 <include name="**/*.jar"/>
11 </fileset>
12 </path>
13 <delete dir="build" />
14 <mkdir dir="build" />
15 <mkdir dir="build/lib" />
16 <mkdir dir="build/log" />
17 <mkdir dir="build/etc" />
18 <copy todir="build/etc">
19 <fileset dir="etc">
20 <include name="policy.all" />
21 <include name="protocol.txt" />
22 </fileset>
23 </copy>
24 <copy todir="build/lib">
25 <fileset dir="lib">
26 <include name="*.jar" />
27 <exclude name="bowbot.jar" />
28 <exclude name="orionembedded.jar" />
29 <exclude name="mail.jar" />
30 </fileset>
31 </copy>
32 <mkdir dir="build/config" />
33 <copy todir="build/config">
34 <fileset dir="config">
35 <include name="*.*" />
36 <exclude name="proxy.xml" />
37 <exclude name="proxy.xml.bak" />
38 </fileset>
39 </copy>
40 <mkdir dir="build/config/example "/>
41 <copy todir="build/config/example">
42 <fileset dir="config/example">
43 <include name="*.*" />
44 </fileset>
45 </copy>
46 <copy todir="build" file="cardproxy.sh" />
47 <copy todir="build" file="cardproxy.sh.ubuntu-autostart" />
48 <copy todir="build" file="changelog.txt" />
49 <copy todir="build" file="README.txt" />
50 <copy todir="build" file="README.ClusteredCache.txt" />
51 <copy todir="build" file="README.XmlUserManager.txt" />
52 <copy todir="build" file="README.HttpXmlApi.txt" />
53 <copy todir="build" file="README.Optimization.txt" />
54 <copy todir="build" file="README.Compiling.txt" />
55 <copy todir="build" file="README.Plugins.txt" />
56 <copy todir="build" file="README.0.9.0.txt" />
57 <copy todir="build" file="jsw-win32.zip" />
58 <copy todir="classes">
59 <fileset dir="src">
60 <include name="**/*.properties"/>
61 <include name="**/*.xml"/>
62 <exclude name="**/filefetcher.properties"/>
63 </fileset>
64 </copy>
65 <property name="classpath" refid="classpath" />
66 </target>
67
68 <target name="build-app" depends="prepare-build">
69 <javac srcdir="src" includes="**/*.java"
70 destdir="classes" classpath="${classpath}"
71 source="1.4" target="1.4"
72 debug="on">
73 </javac>
74 <rmic classpath="${classpath}" stubversion="1.2" classname="com.bowman.cardserv.rmi.RemoteHandler" base="classes"/>
75 <rmic classpath="${classpath}" stubversion="1.2" classname="com.bowman.cardserv.test.RemoteTestClient" base="classes"/>
76 <delete file="classes/com/bowman/cardserv/test/TestUtil.class"/>
77 <delete file="classes/com/bowman/cardserv/BowbotUserManager.class"/>
78 <exec executable="svnversion" outputproperty="svn.revision" failifexecutionfails="false">
79 <arg value="src"/>
80 </exec>
81 <echo message="svn.revision=${svn.revision}" file="classes/com/bowman/cardserv/build.properties"/>
82 <jar jarfile="build/lib/cardservproxy.jar" manifest="src/META-INF/MANIFEST.MF">
83 <fileset dir="classes">
84 <include name="**/*" />
85 </fileset>
86 </jar>
87 <jar jarfile="build/lib/fishenc.jar" manifest="trtest/META-INF/MANIFEST.MF">
88 <fileset dir="classes">
89 <include name="**/*FileFetcher*" />
90 </fileset>
91 </jar>
92 <copy todir="dist" file="build/lib/cardservproxy.jar" />
93 <copy todir="dist" file="build/lib/fishenc.jar" />
94 </target>
95
96 <target name="build-web">
97 <copy todir="web" file="config/proxy-reference.html" />
98 <jar jarfile="build/lib/cs-status.war" basedir="web" />
99 <copy todir="dist" file="build/lib/cs-status.war" />
100 <copy todir="lib" file="build/lib/cs-status.war" />
101 </target>
102
103 <target name="build-plugins" unless="skip-plugins">
104 <ant inheritAll="false" dir="plugins/MessagingPlugin"/>
105 <ant inheritAll="false" dir="plugins/EmmAnalyzerPlugin"/>
106 <ant inheritAll="false" dir="plugins/GeoipPlugin"/>
107 <ant inheritAll="false" dir="plugins/DcwFilterPlugin"/>
108 <ant inheritAll="false" dir="plugins/ProviderIdentPlugin"/>
109 <ant inheritAll="false" dir="plugins/IrdetoPlugin"/>
110 <ant inheritAll="false" dir="plugins/DreamboxPlugin"/>
111 <ant inheritAll="false" dir="plugins/SoftNdsPlugin"/>
112
113 <ant inheritAll="false" dir="plugins/ConaxConnector"/>
114
115 <mkdir dir="build/plugins" />
116 <copy todir="build/plugins" flatten="true">
117 <fileset dir="plugins">
118 <include name="**/dist/*.jar"/>
119 <include name="**/README.*.txt"/>
120 </fileset>
121 </copy>
122 </target>
123
124 <target name="tar-app" depends="build-app, build-web, build-plugins">
125 <move todir="build/cardservproxy">
126 <fileset dir="build"/>
127 </move>
128 <tar tarfile="dist/cardservproxy.tar" basedir="build" excludes="cardservproxy/cardproxy.sh*">
129 <tarfileset dir="build/cardservproxy" mode="755" prefix="cardservproxy">
130 <include name="cardproxy.sh*"/>
131 </tarfileset>
132 </tar>
133 <gzip zipfile="dist/cardservproxy.tar.gz" src="dist/cardservproxy.tar"/>
134 <delete file="dist/cardservproxy.tar" />
135 <delete dir="build"/>
136 </target>
137
138 <target name="tar-src" depends="prepare-build">
139 <mkdir dir="build/src"/>
140 <copy todir="build/src">
141 <fileset dir="src">
142 <include name="**/*" />
143 </fileset>
144 </copy>
145 <copy todir="build/web">
146 <fileset dir="web">
147 <include name="**/*" />
148 </fileset>
149 </copy>
150 <copy todir="build/trtest">
151 <fileset dir="trtest">
152 <include name="**/*" />
153 </fileset>
154 </copy>
155 <copy todir="build">
156 <fileset dir=".">
157 <include name="CardServProxy.iml" />
158 <include name="CardServProxy.ipr" />
159 </fileset>
160 </copy>
161 <delete dir="build/plugins"/>
162 <copy todir="build/plugins">
163 <fileset dir="plugins">
164 <include name="**/*"/>
165 <exclude name="**/dist/*"/>
166 <exclude name="**/*.iws"/>
167 <exclude name="**/*.bak"/>
168 <exclude name="**/*.jar"/>
169 </fileset>
170 </copy>
171 <delete file="build/src/com/bowman/cardserv/BowbotUserManager.java"/>
172 <delete file="build/src/com/bowman/cardserv/web/filefetcher.properties"/>
173 <delete file="build/src/com/bowman/cardserv/test/TestUtil.java"/>
174 <copy todir="build" file="build.xml"/>
175 <move todir="build/cardservproxy-src">
176 <fileset dir="build"/>
177 </move>
178 <tar tarfile="dist/cardservproxy-src.tar" basedir="build"/>
179 <gzip zipfile="dist/cardservproxy-src.tar.gz" src="dist/cardservproxy-src.tar"/>
180 <delete file="dist/cardservproxy-src.tar" />
181 <delete dir="build"/>
182 </target>
183
184</project>
Note: See TracBrowser for help on using the repository browser.