ia64/xen-unstable

view tools/control/build-xen.xml @ 523:65cdeae1932c

bitkeeper revision 1.290 (3f098d9aV-utpH62PCMaflI0ggwCXQ)

Use ioctl rather than /proc/xeno/new_dom_data when creating a new
domain.
author sos22@labyrinth.cl.cam.ac.uk
date Mon Jul 07 15:11:22 2003 +0000 (2003-07-07)
parents 316a46d203dd
children
line source
1 <!--
2 General purpose build script for web applications and web services,
3 including enhanced support for deploying directly to a Tomcat 4
4 based server.
6 This build script assumes that the source code of your web application
7 is organized into the following subdirectories underneath the source
8 code directory from which you execute the build script:
10 docs Static documentation files to be copied to
11 the "docs" subdirectory of your distribution.
13 src Java source code (and associated resource files)
14 to be compiled to the "WEB-INF/classes"
15 subdirectory of your web applicaiton.
17 web Static HTML, JSP, and other content (such as
18 image files), including the WEB-INF subdirectory
19 and its configuration file contents.
21 $Id: build.xml.txt,v 1.7 2002/12/28 09:08:58 jfclere Exp $
22 -->
25 <!-- A "project" describes a set of targets that may be requested
26 when Ant is executed. The "default" attribute defines the
27 target which is executed if no specific target is requested,
28 and the "basedir" attribute defines the current working directory
29 from which Ant executes the requested task. This is normally
30 set to the current working directory.
31 -->
33 <project name="My Project" default="compile" basedir=".">
37 <!-- ===================== Property Definitions =========================== -->
40 <!--
42 Each of the following properties are used in the build script.
43 Values for these properties are set by the first place they are
44 defined, from the following list:
46 * Definitions on the "ant" command line (ant -Dfoo=bar compile).
48 * Definitions from a "build.properties" file in the top level
49 source directory of this application.
51 * Definitions from a "build.properties" file in the developer's
52 home directory.
54 * Default definitions in this build.xml file.
56 You will note below that property values can be composed based on the
57 contents of previously defined properties. This is a powerful technique
58 that helps you minimize the number of changes required when your development
59 environment is modified. Note that property composition is allowed within
60 "build.properties" files as well as in the "build.xml" script.
62 -->
64 <property file="build.properties"/>
65 <property file="${user.home}/build.properties"/>
68 <!-- ==================== File and Directory Names ======================== -->
71 <!--
73 These properties generally define file and directory names (or paths) that
74 affect where the build process stores its outputs.
76 app.name Base name of this application, used to
77 construct filenames and directories.
78 Defaults to "myapp".
80 app.path Context path to which this application should be
81 deployed (defaults to "/" plus the value of the
82 "app.name" property).
84 app.version Version number of this iteration of the application.
86 build.home The directory into which the "prepare" and
87 "compile" targets will generate their output.
88 Defaults to "build".
90 catalina.home The directory in which you have installed
91 a binary distribution of Tomcat 4. This will
92 be used by the "deploy" target.
94 dist.home The name of the base directory in which
95 distribution files are created.
96 Defaults to "dist".
98 manager.password The login password of a user that is assigned the
99 "manager" role (so that he or she can execute
100 commands via the "/manager" web application)
102 manager.url The URL of the "/manager" web application on the
103 Tomcat installation to which we will deploy web
104 applications and web services.
106 manager.username The login username of a user that is assigned the
107 "manager" role (so that he or she can execute
108 commands via the "/manager" web application)
110 -->
112 <property name="app.name" value="myapp"/>
113 <property name="app.path" value="/${app.name}"/>
114 <property name="app.version" value="0.1-dev"/>
115 <property name="build.home" value="${basedir}/build"/>
116 <property name="catalina.home" value="../../../.."/> <!-- UPDATE THIS! -->
117 <property name="dist.home" value="${basedir}/dist"/>
118 <property name="docs.home" value="${basedir}/docs"/>
119 <!-- <property name="manager.url" value="http://localhost:8080/manager"/> -->
120 <property name="src.home" value="${basedir}/src"/>
121 <property name="web.home" value="${basedir}/web"/>
124 <!-- ================== Custom Ant Task Definitions ======================= -->
127 <!--
129 These properties define custom tasks for the Ant build tool that interact
130 with the "/manager" web application installed with Tomcat 4. Before they
131 can be successfully utilized, you must perform the following steps:
133 - Copy the file "server/lib/catalina-ant.jar" from your Tomcat 4
134 installation into the "lib" directory of your Ant installation.
136 - Create a "build.properties" file in your application's top-level
137 source directory (or your user login home directory) that defines
138 appropriate values for the "manager.password", "manager.url", and
139 "manager.username" properties described above.
141 For more information about the Manager web application, and the functionality
142 of these tasks, see <http://localhost:8080/tomcat-docs/manager-howto.html>.
144 -->
146 <taskdef name="install" classname="org.apache.catalina.ant.InstallTask"/>
147 <taskdef name="list" classname="org.apache.catalina.ant.ListTask"/>
148 <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
149 <taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask"/>
152 <!-- ==================== Compilation Control Options ==================== -->
154 <!--
156 These properties control option settings on the Javac compiler when it
157 is invoked using the <javac> task.
159 compile.debug Should compilation include the debug option?
161 compile.deprecation Should compilation include the deprecation option?
163 compile.optimize Should compilation include the optimize option?
165 -->
167 <property name="compile.debug" value="true"/>
168 <property name="compile.deprecation" value="false"/>
169 <property name="compile.optimize" value="true"/>
173 <!-- ==================== External Dependencies =========================== -->
176 <!--
178 Use property values to define the locations of external JAR files on which
179 your application will depend. In general, these values will be used for
180 two purposes:
181 * Inclusion on the classpath that is passed to the Javac compiler
182 * Being copied into the "/WEB-INF/lib" directory during execution
183 of the "deploy" target.
185 Because we will automatically include all of the Java classes that Tomcat 4
186 exposes to web applications, we will not need to explicitly list any of those
187 dependencies. You only need to worry about external dependencies for JAR
188 files that you are going to include inside your "/WEB-INF/lib" directory.
190 -->
192 <!-- Dummy external dependency -->
193 <!--
194 <property name="foo.jar"
195 value="/path/to/foo.jar"/>
196 -->
199 <!-- ==================== Compilation Classpath =========================== -->
201 <!--
203 Rather than relying on the CLASSPATH environment variable, Ant includes
204 features that makes it easy to dynamically construct the classpath you
205 need for each compilation. The example below constructs the compile
206 classpath to include the servlet.jar file, as well as the other components
207 that Tomcat makes available to web applications automatically, plus anything
208 that you explicitly added.
210 -->
212 <path id="compile.classpath">
214 <!-- Include all JAR files that will be included in /WEB-INF/lib -->
215 <!-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** -->
216 <!--
217 <pathelement location="${foo.jar}"/>
218 -->
220 <!-- Include all elements that Tomcat exposes to applications -->
221 <pathelement location="${catalina.home}/common/classes"/>
222 <fileset dir="${catalina.home}/common/endorsed">
223 <include name="*.jar"/>
224 </fileset>
225 <fileset dir="${catalina.home}/common/lib">
226 <include name="*.jar"/>
227 </fileset>
228 <pathelement location="${catalina.home}/shared/classes"/>
229 <fileset dir="${catalina.home}/shared/lib">
230 <include name="*.jar"/>
231 </fileset>
233 </path>
237 <!-- ==================== All Target ====================================== -->
239 <!--
241 The "all" target is a shortcut for running the "clean" target followed
242 by the "compile" target, to force a complete recompile.
244 -->
246 <target name="all" depends="clean,compile"
247 description="Clean build and dist directories, then compile"/>
251 <!-- ==================== Clean Target ==================================== -->
253 <!--
255 The "clean" target deletes any previous "build" and "dist" directory,
256 so that you can be ensured the application can be built from scratch.
258 -->
260 <target name="clean"
261 description="Delete old build and dist directories">
262 <delete dir="${build.home}"/>
263 <delete dir="${dist.home}"/>
264 </target>
268 <!-- ==================== Compile Target ================================== -->
270 <!--
272 The "compile" target transforms source files (from your "src" directory)
273 into object files in the appropriate location in the build directory.
274 This example assumes that you will be including your classes in an
275 unpacked directory hierarchy under "/WEB-INF/classes".
277 -->
279 <target name="compile" depends="prepare"
280 description="Compile Java sources">
282 <!-- Compile Java classes as necessary -->
283 <mkdir dir="${build.home}/WEB-INF/classes"/>
284 <javac srcdir="${src.home}"
285 destdir="${build.home}/WEB-INF/classes"
286 debug="${compile.debug}"
287 deprecation="${compile.deprecation}"
288 optimize="${compile.optimize}">
289 <classpath refid="compile.classpath"/>
290 </javac>
292 <!-- Copy application resources -->
293 <copy todir="${build.home}/WEB-INF/classes">
294 <fileset dir="${src.home}" excludes="**/*.java"/>
295 </copy>
297 </target>
301 <!-- ==================== Dist Target ===================================== -->
304 <!--
306 The "dist" target creates a binary distribution of your application
307 in a directory structure ready to be archived in a tar.gz or zip file.
308 Note that this target depends on two others:
310 * "compile" so that the entire web application (including external
311 dependencies) will have been assembled
313 * "javadoc" so that the application Javadocs will have been created
315 -->
317 <target name="dist" depends="compile,javadoc"
318 description="Create binary distribution">
320 <!-- Copy documentation subdirectories -->
321 <mkdir dir="${dist.home}/docs"/>
322 <copy todir="${dist.home}/docs">
323 <fileset dir="${docs.home}"/>
324 </copy>
326 <!-- Create application JAR file -->
327 <jar jarfile="${dist.home}/${app.name}-${app.version}.war"
328 basedir="${build.home}"/>
330 <!-- Copy additional files to ${dist.home} as necessary -->
332 </target>
336 <!-- ==================== Install Target ================================== -->
338 <!--
340 The "install" target tells the specified Tomcat 4 installation to dynamically
341 install this web application and make it available for execution. It does
342 *not* cause the existence of this web application to be remembered across
343 Tomcat restarts; if you restart the server, you will need to re-install all
344 this web application.
346 If you have already installed this application, and simply want Tomcat to
347 recognize that you have updated Java classes (or the web.xml file), use the
348 "reload" target instead.
350 NOTE: This target will only succeed if it is run from the same server that
351 Tomcat is running on.
353 NOTE: This is the logical opposite of the "remove" target.
355 -->
357 <target name="install" depends="compile"
358 description="Install application to servlet container">
360 <install url="${manager.url}"
361 username="${manager.username}"
362 password="${manager.password}"
363 path="${app.path}"
364 war="file://${build.home}"/>
366 </target>
369 <!-- ==================== Javadoc Target ================================== -->
371 <!--
373 The "javadoc" target creates Javadoc API documentation for the Java
374 classes included in your application. Normally, this is only required
375 when preparing a distribution release, but is available as a separate
376 target in case the developer wants to create Javadocs independently.
378 -->
380 <target name="javadoc" depends="compile"
381 description="Create Javadoc API documentation">
383 <mkdir dir="${dist.home}/docs/api"/>
384 <javadoc sourcepath="${src.home}"
385 destdir="${dist.home}/docs/api"
386 packagenames="*">
387 <classpath refid="compile.classpath"/>
388 </javadoc>
390 </target>
394 <!-- ====================== List Target =================================== -->
396 <!--
398 The "list" target asks the specified Tomcat 4 installation to list the
399 currently running web applications, either loaded at startup time or
400 installed dynamically. It is useful to determine whether or not the
401 application you are currently developing has been installed.
403 -->
405 <target name="list"
406 description="List installed applications on servlet container">
408 <list url="${manager.url}"
409 username="${manager.username}"
410 password="${manager.password}"/>
412 </target>
415 <!-- ==================== Prepare Target ================================== -->
417 <!--
419 The "prepare" target is used to create the "build" destination directory,
420 and copy the static contents of your web application to it. If you need
421 to copy static files from external dependencies, you can customize the
422 contents of this task.
424 Normally, this task is executed indirectly when needed.
426 -->
428 <target name="prepare">
430 <!-- Create build directories as needed -->
431 <mkdir dir="${build.home}"/>
432 <mkdir dir="${build.home}/WEB-INF"/>
433 <mkdir dir="${build.home}/WEB-INF/classes"/>
436 <!-- Copy static content of this web application -->
437 <copy todir="${build.home}">
438 <fileset dir="${web.home}"/>
439 </copy>
441 <!-- Copy external dependencies as required -->
442 <!-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** -->
443 <mkdir dir="${build.home}/WEB-INF/lib"/>
444 <!--
445 <copy todir="${build.home}/WEB-INF/lib" file="${foo.jar}"/>
446 -->
448 <!-- Copy static files from external dependencies as needed -->
449 <!-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** -->
451 </target>
454 <!-- ==================== Reload Target =================================== -->
456 <!--
458 The "reload" target tells the specified Tomcat 4 installation to dynamically
459 reload this web application, to reflect changes in the underlying classes or
460 the "web.xml" deployment descriptor.
462 -->
464 <target name="reload" depends="compile"
465 description="Reload application on servlet container">
467 <reload url="${manager.url}"
468 username="${manager.username}"
469 password="${manager.password}"
470 path="${app.path}"/>
472 </target>
475 <!-- ==================== Remove Target =================================== -->
477 <!--
479 The "remove" target tells the specified Tomcat 4 installation to dynamically
480 remove this web application from service.
482 NOTE: This is the logical opposite of the "install" target.
484 -->
486 <target name="remove"
487 description="Remove application on servlet container">
489 <remove url="${manager.url}"
490 username="${manager.username}"
491 password="${manager.password}"
492 path="${app.path}"/>
494 </target>
497 <target name="help">
498 <echo>all clean, them compile</echo>
499 <echo>dist create war file</echo>
500 <echo>install install application in servlet container</echo>
501 <echo>list list applications installed in servelet container</echo>
502 <echo>reload reload application in servlet container</echo>
503 <echo>remove dynamically remove web application</echo>
504 </target>
506 </project>