build.xml revision 193
0N/A<?xml version="1.0"?>
0N/A<!--
193N/A Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A
0N/A This code is free software; you can redistribute it and/or modify it
0N/A under the terms of the GNU General Public License version 2 only, as
115N/A published by the Free Software Foundation. Oracle designates this
0N/A particular file as subject to the "Classpath" exception as provided
115N/A by Oracle in the LICENSE file that accompanied this code.
0N/A
0N/A This code is distributed in the hope that it will be useful, but WITHOUT
0N/A ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A version 2 for more details (a copy is included in the LICENSE file that
0N/A accompanied this code).
0N/A
0N/A You should have received a copy of the GNU General Public License version
0N/A 2 along with this work; if not, write to the Free Software Foundation,
0N/A Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A
115N/A Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
115N/A or visit www.oracle.com if you need additional information or have any
115N/A questions.
0N/A-->
0N/A
84N/A<project name="jaxws" default="all" basedir=".">
84N/A
84N/A <!-- For 'ant -p' or 'ant -projecthelp' -->
84N/A
84N/A <description>
84N/A Ant build script for the ${ant.project.name} part of the jdk.
0N/A
84N/A Input Properties: (see build.properties for the ant defaults)
84N/A bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath
84N/A javac.debug - true or false for debug classfiles
84N/A javac.target - classfile version target
84N/A javac.source - source version
123N/A drops.dir - directory that holds source drop bundles
123N/A allow.download - permit downloads from public url (default is false)
123N/A (used if bundles not found in drops.dir)
123N/A
123N/A Run 'make help' for help using the Makefile.
84N/A </description>
0N/A
84N/A <!-- Mac is special, need to downgrade these before build.properties. -->
84N/A <condition property="javac.source" value="1.5">
84N/A <os family="mac"/>
84N/A </condition>
84N/A <condition property="javac.target" value="1.5">
84N/A <os family="mac"/>
84N/A </condition>
84N/A
84N/A <!-- Project build properties. -->
0N/A <property file="build.properties"/>
0N/A
90N/A <!-- See if drop sources were included. -->
90N/A <condition property="drop.dir"
90N/A value="${drop.included.dir}"
90N/A else="${drop.expanded.dir}">
90N/A <available file="${drop.included.dir}" type="dir"/>
90N/A </condition>
90N/A
84N/A <!-- Get shared targets. -->
84N/A <import file="build-defs.xml"/>
0N/A
84N/A <!-- Initialization of directories needed for build. -->
84N/A <target name="init">
0N/A <mkdir dir="${build.dir}"/>
0N/A <mkdir dir="${build.classes.dir}"/>
84N/A <mkdir dir="${dist.dir}"/>
84N/A <mkdir dir="${dist.lib.dir}"/>
84N/A </target>
84N/A
84N/A <!-- Sanity checks and settings -->
84N/A <target name="sanity"
84N/A depends="-javac-jar-exists"
84N/A description="Display settings of configuration values">
84N/A <echo message="${sanity.info}"/>
84N/A </target>
84N/A
84N/A <!-- Check for bootstrap javac.jar file, warn if missing. -->
84N/A <condition property="javac.jar.exists">
84N/A <available file="${javac.jar}" type="file"/>
84N/A </condition>
84N/A <target name="-javac-jar-exists"
84N/A unless="javac.jar.exists">
84N/A <echo message="WARNING: Cannot find ${javac.jar}"/>
0N/A </target>
0N/A
84N/A <!-- Creation of distribution files to jdk build process. -->
84N/A <target name="dist"
84N/A depends="init, -init-src-dirs, build, -dist-classes-jar, -dist-src-zip"
84N/A description="Create all built distribution files.">
84N/A </target>
84N/A <target name="-dist-classes-jar-uptodate"
84N/A depends="init, -init-src-dirs">
84N/A <condition property="dist.classes.jar.uptodate">
84N/A <and>
84N/A <available file="${dist.classes.jar}" type="file"/>
84N/A <uptodate targetfile="${dist.classes.jar}">
84N/A <srcfiles dir="${build.classes.dir}" includes="**"/>
84N/A </uptodate>
84N/A </and>
84N/A </condition>
84N/A </target>
84N/A <target name="-dist-classes-jar"
84N/A depends="init, -init-src-dirs, -dist-classes-jar-uptodate"
84N/A unless="dist.classes.jar.uptodate">
84N/A <delete file="${dist.classes.jar}"/>
84N/A <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
0N/A </target>
0N/A
123N/A <target name="-build-setup"
123N/A depends="init, -init-src-dirs, -drop-build-setup">
0N/A </target>
0N/A
84N/A <!-- Build (compilation) of sources to class files. -->
84N/A <target name="build"
123N/A depends="compile, -build-setup">
123N/A </target>
123N/A <target name="compile"
123N/A depends="init, -init-src-dirs">
123N/A <mkdir dir="${build.classes.dir}"/>
94N/A <javac
94N/A includeAntRuntime="false"
94N/A classpath="${build.classes.dir}:${tools.jar}"
94N/A fork="true"
0N/A destdir="${build.classes.dir}"
0N/A memoryInitialSize="${javac.memoryInitialSize}"
0N/A memoryMaximumSize="${javac.memoryMaximumSize}"
62N/A source="${javac.source}"
53N/A debug="${javac.debug}"
84N/A target="${javac.target}">
84N/A <compilerarg value="-J-Xbootclasspath/p:${javac.jar}"/>
84N/A <compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/>
84N/A <src refid="src.dir.id"/>
84N/A </javac>
84N/A </target>
84N/A
84N/A <!-- Test. (FIXME: Need to know how to run tests.) -->
84N/A <target name="test"
84N/A depends="init, -init-src-dirs, dist">
84N/A <echo message="FIXME: How do you run the tests"/>
84N/A </target>
84N/A
84N/A <!-- Populate source area if needed. -->
84N/A <target name="source"
84N/A depends="init, -init-src-dirs"
84N/A description="Populate all source file directories">
0N/A </target>
0N/A
90N/A <!-- Populate drop_included area. -->
90N/A <target name="drop_included"
90N/A depends="clobber"
90N/A description="Populate all source file directories">
90N/A <delete dir="${drop.included.dir}"/>
90N/A <antcall target="source"/>
90N/A <move file="${drop.expanded.dir}" tofile="${drop.included.dir}"/>
90N/A <delete dir="${drop.included.dir}/bundles"/>
90N/A </target>
90N/A
84N/A <!-- Clean up compiled files. -->
84N/A <target name="clean"
84N/A description="Delete all generated files">
84N/A <delete dir="${build.dir}"/>
84N/A <delete dir="${dist.dir}"/>
84N/A </target>
84N/A
84N/A <!-- Clean up compiled files and all imported source files. -->
84N/A <target name="clobber"
84N/A depends="clean"
84N/A description="Delete all generated files, including imported sources">
90N/A <delete dir="${drop.expanded.dir}"/>
0N/A </target>
0N/A
84N/A <target name="-banner">
84N/A <echo message="+---------------------------------------+"/>
84N/A <echo message="+ Starting ant project ${ant.project.name} +"/>
84N/A <echo message="+---------------------------------------+"/>
84N/A </target>
84N/A
84N/A <!-- Do everything but test. -->
84N/A <target name="all"
84N/A depends="-banner, sanity, dist"
84N/A description="Build everything.">
84N/A <echo message="+---------------------------------------+"/>
84N/A <echo message="+ Finishing ant project ${ant.project.name}"/>
84N/A <echo message="+---------------------------------------+"/>
0N/A </target>
0N/A
0N/A</project>