1 <!--
   2  Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
   3 
   4  Redistribution and use in source and binary forms, with or without
   5  modification, are permitted provided that the following conditions
   6  are met:
   7 
   8    - Redistributions of source code must retain the above copyright
   9      notice, this list of conditions and the following disclaimer.
  10 
  11    - Redistributions in binary form must reproduce the above copyright
  12      notice, this list of conditions and the following disclaimer in the
  13      documentation and/or other materials provided with the distribution.
  14 
  15    - Neither the name of Oracle nor the names of its
  16      contributors may be used to endorse or promote products derived
  17      from this software without specific prior written permission.
  18 
  19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  20  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  21  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  22  PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  23  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  24  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  25  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  26  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  27  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  28  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  29  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30 -->
  31 
  32 <project name="J2DBench" default="dist" basedir=".">
  33     <description>
  34         simple example build file
  35     </description>
  36   <!-- set global properties for this build -->
  37   <property name="src" location="src"/>
  38   <property name="build" location="build"/>
  39   <property name="dist"  location="dist"/>
  40   <property name="resources"  location="resources"/>
  41 
  42   <target name="init">
  43     <!-- Create the time stamp -->
  44     <tstamp/>
  45     <!-- Create the build directory structure used by compile -->
  46     <mkdir dir="${build}"/>
  47   </target>
  48 
  49   <target name="compile" depends="init"
  50         description="compile the source " >
  51     <!-- Compile the java code from ${src} into ${build} -->
  52     <javac debug="false" source="1.2" target="1.2" srcdir="${src}" destdir="${build}"/>
  53   </target>
  54 
  55   <target name="run" depends="dist" 
  56     description="run J2DBench" >
  57     <java jar="${dist}/J2DBench.jar"
  58        fork="true"
  59     >
  60     </java>
  61   </target>
  62 
  63   <target name="analyze" depends="dist" 
  64     description="run J2DAnalyzer" >
  65     <java jar="${dist}/J2DAnalyzer.jar"
  66        fork="true"
  67     >
  68     </java>
  69   </target>
  70 
  71   <target name="resources" depends="init"
  72         description="copy resources into build dir" >
  73     <!-- Copy the resource files from ${resources} into ${build}/ -->
  74     <mkdir dir="${dist}"/>
  75     <mkdir dir="${build}/j2dbench/tests/text/textdata"/>
  76     <copy todir="${build}/j2dbench/tests/text/textdata">
  77       <fileset dir="${resources}/textdata" />
  78     </copy>
  79     <mkdir dir="${build}/j2dbench/tests/iio/images"/>
  80     <copy todir="${build}/j2dbench/tests/iio/images">
  81       <fileset dir="${resources}/images" />
  82     </copy>
  83   </target>
  84 
  85   <target name="dist" depends="compile, resources"
  86         description="generate the distribution" >
  87     <!-- Create the distribution directory -->
  88     <mkdir dir="${dist}"/>
  89 
  90     <!-- Put everything in ${build} into the J2DBench.jar file -->
  91     <jar jarfile="${dist}/J2DBench.jar" basedir="${build}" 
  92         excludes="j2dbench/report/**" >
  93       <manifest>
  94         <attribute name="Built-By" value="${user.name}"/>
  95         <attribute name="Main-Class" value="j2dbench.J2DBench"/>
  96       </manifest>
  97     </jar>
  98     <jar jarfile="${dist}/J2DAnalyzer.jar" basedir="${build}" 
  99         includes="j2dbench/report/**" >
 100       <manifest>
 101         <attribute name="Built-By" value="${user.name}"/>
 102         <attribute name="Main-Class" value="j2dbench.report.J2DAnalyzer"/>
 103       </manifest>
 104     </jar>
 105   </target>
 106 
 107   <target name="clean"
 108         description="clean up" >
 109     <!-- Delete the ${build} and ${dist} directory trees -->
 110     <delete dir="${build}"/>
 111     <delete dir="${dist}"/>
 112   </target>
 113 </project>
--- EOF ---