-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
212 lines (177 loc) · 7.92 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<!-- $Header$ -->
<project name="PARADE" default="compile" basedir=".">
<property file="parade.properties" />
<path id="project.class.path">
<pathelement path="../utilities"/>
</path>
<property name="project.class.path" refid="project.class.path" />
<target name="install" description="install the project. Attempt to install Tomcat from the bundle.">
<available file="parade.properties" property="properties.copied" />
<copy file="parade.properties.example" toFile="parade.properties" />
<fail unless="properties.copied" message="Configure parade.properties and start ant install again!"/>
<cvs command="checkout ${generics.cvs}" dest=".."/>
<ant antfile="${generics.path}" target="installTomcat"/>
<cvs command="update" dest="." />
<antcall target="getTaglibs" />
<copy file="${webapp.path}/WEB-INF/classes/MakumbaDatabase.properties.example"
toFile="${webapp.path}/WEB-INF/classes/MakumbaDatabase.properties" />
<copy file="servletContext.properties.example"
toFile="servletContext.properties" />
<cvs command="checkout utilities/" dest=".." />
<ant antfile="../utilities/build.xml" target="compile" dir="../utilities"/>
<cvs command="checkout karamba/public_html/WEB-INF/classes/dataDefinitions" dest=".." />
<antcall target="compile"/>
<echo message="Installation finished. Execute 'ant -projecthelp' to see what commands are available." />
</target>
<target name="applets" description="compiles applets and copies them to the webapp">
<antcall target="compile"/>
<!-- copy applets to webapp/ -->
<antcall target="appletCopy" />
</target>
<target name="appletCopy">
<copy toDir="webapp/" overwrite="true">
<fileset dir="webapp/WEB-INF/classes">
<include name="org/makumba/parade/applets/*.class" />
<include name="org/makumba/parade/sourceedit/*.class" />
</fileset>
</copy>
<echo>Press x in the Java Plugin console to make it forget old applets. If you have no java console, hold Shift while pressing Refresh in the browser.
</echo>
</target>
<target name="triggerCopy">
<copy toDir="triggerClasses/" overwrite="true">
<fileset dir="webapp/WEB-INF/classes">
<include name="org/makumba/parade/tools/TriggerFilter*.class" />
<include name="org/makumba/parade/tools/HttpServletRequestDummy*.class" />
</fileset>
</copy>
</target>
<target name="tomcat" description="start tomcat 5" >
<antcall target="compile" />
<!-- copy util-java/lib to tomcat's common, for use by webapps and LoginFilter
according to the tomcat classloader howto, should be copied to tomcat's share/classes,
but i couldn't get them to work frmom there.
-->
<copy toDir="${catalina.home}/common/lib" overwrite="true" >
<fileset dir="../../util-java/lib">
<include name="*.jar" />
<include name="*.zip" />
<exclude name="makumba.jar" />
<exclude name="antlr.jar" />
</fileset>
</copy>
<!-- copy utilities to tomcat's common, for use by webapps and LoginFilter
according to the tomcat classloader howto, should be copied to tomcat's share/classes,
but i couldn't get them to work frmom there.
-->
<copy toDir="${catalina.home}/common/classes/org" overwrite="true">
<fileset dir="../utilities/org/">
<include name="eu/best/tools/*.class" />
</fileset>
</copy>
<!-- copy dataDefinitions to parade's WEB-INF, for use by AccessServlet -->
<copy toDir="webapp/WEB-INF/classes/dataDefinitions" overwrite="true">
<fileset dir="../karamba/public_html/WEB-INF/classes/dataDefinitions">
<include name="**/*.mdd" />
<include name="**/*.idd" />
</fileset>
</copy>
<!-- copy BestMemberAuthorizer to parade's WEB-INF, for use by AccessServlet -->
<copy toDir="webapp/WEB-INF/classes/org" overwrite="true">
<fileset dir="../utilities/org/">
<include name="eu/best/BestMemberAuthorizer*.class" />
</fileset>
</copy>
<!-- copy applets to webapp/ -->
<copy toDir="webapp/" overwrite="true">
<fileset dir="webapp/WEB-INF/classes">
<include name="org/makumba/parade/applets/*.class" />
<include name="org/makumba/parade/sourceedit/*.class" />
</fileset>
</copy>
<antcall target="applets" />
<ant antfile="${generics.path}" target="startTomcat" />
</target>
<target name="quickStart" description="just start tomcat">
<ant antfile="${generics.path}" target="startTomcat" />
</target>
<target name="stopTomcat" description="stop tomcat 5">
<ant antfile="${generics.path}" target="stopTomcat" />
</target>
<target name="reload" >
<antcall target="compile" />
<ant antfile="${generics.path}" target="reload" />
</target>
<target name="getTaglibs" description="update ../commons.xml and download and install all taglibs needed for the project." >
<cvs command="update ${generics.cvs}" dest=".."/>
<antcall target="getMakumba"/>
<antcall target="getJSTL" />
</target>
<target name="getMakumba" description="get the lastest makumba JAR. Use this if you see makumba compilation errors!!!" >
<ant antfile="${generics.path}" target="getMakumba" />
</target>
<target name="getJSTL" description="install JSTL" >
<ant antfile="${generics.path}" target="getJSTL"/>
</target>
<target name="compile" description="compile the java files">
<ant antfile="${generics.path}" target="compile" inheritRefs="true"/>
</target>
<target name="clean" description="delete all generated and backup files">
<ant antfile="${generics.path}" target="clean"/>
</target>
<target name="maktomcat" description="for Makumba development. Compiles makumba and starts tomcat." >
<ant antfile="../makumba/build.xml" target="jar" dir="../makumba"/>
<copy file="../makumba/lib/makumba.jar" tofile="webapp/WEB-INF/lib/makumba.jar" overwrite="true" />
<antcall target="tomcat" />
</target>
<target name= "jcvstest" depends="compile">
<!-- use this with ant -Dcvspass=yourCVSPass
it's work in progress, see org.makumba.parade.CvsJCVSTest -->
<java classname="org.makumba.parade.CvsJCVSTest" fork="true"
failonerror="true"
>
<arg value="${cvspass}" />
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xrunjdwp:transport=dt_shmem,address=jdbconn,server=y,suspend=n" />
<classpath>
<pathelement path="${webapp.home}/WEB-INF/classes"/>
<path refid="project.class.path" />
</classpath>
</java>
</target>
<target name= "babylon" description="Start a babylon chat server">
<java classname="babylonServer" fork="true">
<arg value="-nographics" />
<classpath>
<pathelement path="${webapp.home}/chat/babylon.jar"/>
<pathelement path="${webapp.home}/WEB-INF/classes"/>
<path refid="project.class.path" />
</classpath>
</java>
</target>
<target name= "babylonStop" description="Stop babylon chat server">
<java classname="babylonServerShutdown" fork="true">
<arg value="-nographics" />
<classpath>
<pathelement path="${webapp.home}/chat/babylon.jar"/>
<pathelement path="${webapp.home}/WEB-INF/classes"/>
<path refid="project.class.path" />
</classpath>
</java>
</target>
<target name="checkInitialFiles">
<!-- it just checks if one file exist, if so it is assumed that
all the others were copied -->
<available file="parade.properties" type="file" property="files.copied"/>
</target>
<target name= "eclipseInstall" description="Configures files for Eclipse" unless="files.copied" depends="checkInitialFiles">
<copy file="parade.properties.example" toFile="parade.properties" />
<copy file="logging.properties.example" toFile="logging.properties" />
<copy file="servletContext.properties.example" toFile="servletContext.properties" />
<copy file="webapp/WEB-INF/classes/MakumbaDatabase.properties.example"
toFile="webapp/WEB-INF/classes/MakumbaDatabase.properties" />
<copy file="tomcat/conf/tomcat-users.xml.example"
toFile="tomcat/conf/tomcat-users.xml" />
<mkdir dir="tomcat/webapps_dummy"/>
</target>
</project>