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