Sat, 01 Dec 2007 00:00:00 +0000
Initial load
duke@435 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
duke@435 | 2 | <!-- |
duke@435 | 3 | Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. |
duke@435 | 4 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 5 | |
duke@435 | 6 | This code is free software; you can redistribute it and/or modify it |
duke@435 | 7 | under the terms of the GNU General Public License version 2 only, as |
duke@435 | 8 | published by the Free Software Foundation. |
duke@435 | 9 | |
duke@435 | 10 | This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 11 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 12 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 13 | version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 14 | accompanied this code). |
duke@435 | 15 | |
duke@435 | 16 | You should have received a copy of the GNU General Public License version |
duke@435 | 17 | 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 18 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 19 | |
duke@435 | 20 | Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
duke@435 | 21 | CA 95054 USA or visit www.sun.com if you need additional information or |
duke@435 | 22 | have any questions. |
duke@435 | 23 | |
duke@435 | 24 | --> |
duke@435 | 25 | |
duke@435 | 26 | <!-- This is an Ant project file. Ant is a build tool like make or gnumake which is not |
duke@435 | 27 | dependent on the underlying OS shell. For more information on Ant, please see |
duke@435 | 28 | http://ant.apache.org/ --> |
duke@435 | 29 | |
duke@435 | 30 | <!-- A "project" describes a set of targets that may be requested |
duke@435 | 31 | when Ant is executed. The "default" attribute defines the |
duke@435 | 32 | target which is executed if no specific target is requested, |
duke@435 | 33 | and the "basedir" attribute defines the current working directory |
duke@435 | 34 | from which Ant executes the requested task. This is normally |
duke@435 | 35 | set to the current working directory. |
duke@435 | 36 | --> |
duke@435 | 37 | |
duke@435 | 38 | |
duke@435 | 39 | <project name="HotSpot Serviceability Agent" default="all" basedir="."> |
duke@435 | 40 | |
duke@435 | 41 | <!-- Property Definitions --> |
duke@435 | 42 | |
duke@435 | 43 | <property name="app.name" value="sa"/> |
duke@435 | 44 | <property name="dist.jar" value="${app.name}.jar"/> |
duke@435 | 45 | <property name="libs" value="../src/share/lib"/> |
duke@435 | 46 | <property name="classes" value="../build/classes"/> |
duke@435 | 47 | |
duke@435 | 48 | <!-- The "prepare" target is used to construct the deployment home |
duke@435 | 49 | directory structure (if necessary), and to copy in static files |
duke@435 | 50 | as required. In the example below, Ant is instructed to create |
duke@435 | 51 | the deployment directory, copy the contents of the "web/" source |
duke@435 | 52 | hierarchy, and set up the WEB-INF subdirectory appropriately. |
duke@435 | 53 | --> |
duke@435 | 54 | |
duke@435 | 55 | <target name="prepare"> |
duke@435 | 56 | <mkdir dir="${classes}"/> |
duke@435 | 57 | </target> |
duke@435 | 58 | |
duke@435 | 59 | |
duke@435 | 60 | <!-- The "clean" target removes the deployment home directory structure, |
duke@435 | 61 | so that the next time the "compile" target is requested, it will need |
duke@435 | 62 | to compile everything from scratch. |
duke@435 | 63 | --> |
duke@435 | 64 | |
duke@435 | 65 | <target name="clean"> |
duke@435 | 66 | <delete dir="${classes}"/> |
duke@435 | 67 | </target> |
duke@435 | 68 | |
duke@435 | 69 | |
duke@435 | 70 | <!-- The "compile" target is used to compile (or recompile) the Java classes |
duke@435 | 71 | that make up this web application. The recommended source code directory |
duke@435 | 72 | structure makes this very easy because the <javac> task automatically |
duke@435 | 73 | works its way down a source code hierarchy and compiles any class that |
duke@435 | 74 | has not yet been compiled, or where the source file is newer than the |
duke@435 | 75 | class file. |
duke@435 | 76 | |
duke@435 | 77 | Feel free to adjust the compilation option parameters (debug, |
duke@435 | 78 | optimize, and deprecation) to suit your requirements. It is also |
duke@435 | 79 | possible to base them on properties, so that you can adjust this |
duke@435 | 80 | behavior at runtime. |
duke@435 | 81 | |
duke@435 | 82 | The "compile" task depends on the "prepare" task, so the deployment |
duke@435 | 83 | home directory structure will be created if needed the first time. |
duke@435 | 84 | --> |
duke@435 | 85 | |
duke@435 | 86 | <path id="javac.classpath"> |
duke@435 | 87 | <pathelement path="${libs}/maf-1_0.jar" /> |
duke@435 | 88 | <pathelement path="${libs}/jlfgr-1_0.jar" /> |
duke@435 | 89 | </path> |
duke@435 | 90 | |
duke@435 | 91 | <target name="compile" depends="prepare" description="Compiles the sources"> |
duke@435 | 92 | <javac srcdir="../src/share/classes" |
duke@435 | 93 | destdir="${classes}" |
duke@435 | 94 | debug="on" deprecation="on" |
duke@435 | 95 | source="1.4"> |
duke@435 | 96 | <classpath refid="javac.classpath" /> |
duke@435 | 97 | </javac> |
duke@435 | 98 | |
duke@435 | 99 | <rmic classname="sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer" |
duke@435 | 100 | base="${classes}"/> |
duke@435 | 101 | </target> |
duke@435 | 102 | |
duke@435 | 103 | <target name="deploy" depends="compile" description="Creates a deployment bundle"> |
duke@435 | 104 | <delete file="${classes}/${dist.jar}" /> |
duke@435 | 105 | <copy todir="${classes}/sun/jvm/hotspot/utilities/soql/"> |
duke@435 | 106 | <fileset dir="../src/share/classes/sun/jvm/hotspot/utilities/soql" includes="*.js" /> |
duke@435 | 107 | </copy> |
duke@435 | 108 | |
duke@435 | 109 | <mkdir dir="${classes}/sun/jvm/hotspot/ui/resources" /> |
duke@435 | 110 | <copy todir="${classes}/sun/jvm/hotspot/ui/resources"> |
duke@435 | 111 | <fileset dir="../src/share/classes/sun/jvm/hotspot/ui/resources" includes="*.png" /> |
duke@435 | 112 | </copy> |
duke@435 | 113 | |
duke@435 | 114 | <jar jarfile="${classes}/${dist.jar}" |
duke@435 | 115 | basedir="${classes}"/> |
duke@435 | 116 | </target> |
duke@435 | 117 | |
duke@435 | 118 | <target name="all" depends="deploy" description="Builds sources and deployment jar"/> |
duke@435 | 119 | |
duke@435 | 120 | </project> |