Path: blob/master/src/demo/share/java2d/J2DBench/build.xml
41149 views
<!--1Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.23Redistribution and use in source and binary forms, with or without4modification, are permitted provided that the following conditions5are met:67- Redistributions of source code must retain the above copyright8notice, this list of conditions and the following disclaimer.910- Redistributions in binary form must reproduce the above copyright11notice, this list of conditions and the following disclaimer in the12documentation and/or other materials provided with the distribution.1314- Neither the name of Oracle nor the names of its15contributors may be used to endorse or promote products derived16from this software without specific prior written permission.1718THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS19IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,20THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR21PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR22CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,23EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,24PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR25PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF26LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING27NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS28SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.29-->3031<project name="J2DBench" default="dist" basedir=".">32<description>33simple example build file34</description>35<!-- set global properties for this build -->36<property name="src" location="src"/>37<property name="build" location="build"/>38<property name="dist" location="dist"/>39<property name="resources" location="resources"/>4041<target name="init">42<!-- Create the time stamp -->43<tstamp/>44<!-- Create the build directory structure used by compile -->45<mkdir dir="${build}"/>46</target>4748<target name="compile" depends="init"49description="compile the source " >50<!-- Compile the java code from ${src} into ${build} -->51<javac debug="off" source="1.7" target="1.7" srcdir="${src}" destdir="${build}"/>52</target>5354<target name="run" depends="dist"55description="run J2DBench" >56<java jar="${dist}/J2DBench.jar"57fork="true"58>59</java>60</target>6162<target name="analyze" depends="dist"63description="run J2DAnalyzer" >64<java jar="${dist}/J2DAnalyzer.jar"65fork="true"66>67</java>68</target>6970<target name="resources" depends="init"71description="copy resources into build dir" >72<!-- Copy the resource files from ${resources} into ${build}/ -->73<mkdir dir="${dist}"/>74<mkdir dir="${build}/j2dbench/tests/text/textdata"/>75<copy todir="${build}/j2dbench/tests/text/textdata">76<fileset dir="${resources}/textdata" />77</copy>78<mkdir dir="${build}/j2dbench/tests/iio/images"/>79<copy todir="${build}/j2dbench/tests/iio/images">80<fileset dir="${resources}/images" />81</copy>82<mkdir dir="${build}/j2dbench/tests/cmm/images"/>83<copy todir="${build}/j2dbench/tests/cmm/images">84<fileset dir="${resources}/cmm_images" />85</copy>86</target>8788<target name="dist" depends="compile, resources"89description="generate the distribution" >90<!-- Create the distribution directory -->91<mkdir dir="${dist}"/>9293<!-- Put everything in ${build} into the J2DBench.jar file -->94<jar jarfile="${dist}/J2DBench.jar" basedir="${build}"95excludes="j2dbench/report/**" >96<manifest>97<attribute name="Built-By" value="${user.name}"/>98<attribute name="Main-Class" value="j2dbench.J2DBench"/>99</manifest>100</jar>101<jar jarfile="${dist}/J2DAnalyzer.jar" basedir="${build}"102includes="j2dbench/report/**" >103<manifest>104<attribute name="Built-By" value="${user.name}"/>105<attribute name="Main-Class" value="j2dbench.report.J2DAnalyzer"/>106</manifest>107</jar>108</target>109110<target name="clean"111description="clean up" >112<!-- Delete the ${build} and ${dist} directory trees -->113<delete dir="${build}"/>114<delete dir="${dist}"/>115</target>116</project>117118119