build.xml

Fri, 23 Oct 2009 11:06:56 -0700

author
ohair
date
Fri, 23 Oct 2009 11:06:56 -0700
changeset 91
cc35f0e129d2
parent 85
ae2bec597586
child 95
4023edcd8433
permissions
-rw-r--r--

6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
Reviewed-by: andrew

     1 <?xml version="1.0"?>
     2 <!--
     3  Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
     4  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     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.  Sun designates this
     9  particular file as subject to the "Classpath" exception as provided
    10  by Sun in the LICENSE file that accompanied this code.
    12  This code is distributed in the hope that it will be useful, but WITHOUT
    13  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    14  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    15  version 2 for more details (a copy is included in the LICENSE file that
    16  accompanied this code).
    18  You should have received a copy of the GNU General Public License version
    19  2 along with this work; if not, write to the Free Software Foundation,
    20  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    22  Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    23  CA 95054 USA or visit www.sun.com if you need additional information or
    24  have any questions.
    25 -->
    27 <project name="jaxws" default="all" basedir=".">
    29     <!-- For 'ant -p' or 'ant -projecthelp' -->
    31     <description>
    32     Ant build script for the ${ant.project.name} part of the jdk.
    34     Input Properties: (see build.properties for the ant defaults)
    35       bootstrap.dir        - dir with lib/javac.jar, added to javac bootclasspath
    36       javac.debug          - true or false for debug classfiles
    37       javac.target         - classfile version target
    38       javac.source         - source version
    39     </description>
    41     <!-- Mac is special, need to downgrade these before build.properties. -->
    42     <condition property="javac.source" value="1.5">
    43         <os family="mac"/>
    44     </condition>
    45     <condition property="javac.target" value="1.5">
    46         <os family="mac"/>
    47     </condition>
    49     <!-- Project build properties. -->
    50     <property file="build.properties"/>
    52     <!-- See if drop sources were included. -->
    53     <condition property="drop.dir" 
    54                value="${drop.included.dir}" 
    55                else="${drop.expanded.dir}">
    56         <available file="${drop.included.dir}" type="dir"/>
    57     </condition>
    59     <!-- Get shared targets. -->
    60     <import file="build-defs.xml"/>
    62     <!-- Initialization of directories needed for build. -->
    63     <target name="init">
    64         <mkdir dir="${build.dir}"/>
    65         <mkdir dir="${build.classes.dir}"/>
    66         <mkdir dir="${dist.dir}"/>
    67         <mkdir dir="${dist.lib.dir}"/>
    68     </target>
    70     <!-- Sanity checks and settings -->
    71     <target name="sanity"
    72 	    depends="-javac-jar-exists"
    73             description="Display settings of configuration values">
    74         <echo message="${sanity.info}"/>
    75     </target>
    77      <!-- Check for bootstrap javac.jar file, warn if missing. -->
    78     <condition property="javac.jar.exists">
    79         <available file="${javac.jar}" type="file"/>
    80     </condition>
    81     <target name="-javac-jar-exists"
    82             unless="javac.jar.exists">
    83         <echo message="WARNING: Cannot find ${javac.jar}"/>
    84     </target>
    86     <!-- Creation of distribution files to jdk build process. -->
    87     <target name="dist"
    88 	    depends="init, -init-src-dirs, build, -dist-classes-jar, -dist-src-zip"
    89             description="Create all built distribution files.">
    90     </target>
    91     <target name="-dist-classes-jar-uptodate"
    92 	    depends="init, -init-src-dirs">
    93         <condition property="dist.classes.jar.uptodate">
    94             <and>
    95                 <available file="${dist.classes.jar}" type="file"/>
    96                 <uptodate targetfile="${dist.classes.jar}">
    97                     <srcfiles dir="${build.classes.dir}" includes="**"/>
    98                 </uptodate>
    99             </and>
   100         </condition>
   101     </target>
   102     <target name="-dist-classes-jar"
   103 	    depends="init, -init-src-dirs, -dist-classes-jar-uptodate"
   104             unless="dist.classes.jar.uptodate">
   105         <delete file="${dist.classes.jar}"/>
   106         <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
   107     </target>
   109     <target name="-build-prep"
   110 	    depends="init, -init-src-dirs, -drop-build-prep">
   111     </target>
   113     <!-- Build (compilation) of sources to class files. -->
   114     <target name="build"
   115 	    depends="init, -init-src-dirs, -build-prep">
   116         <javac fork="true"
   117              destdir="${build.classes.dir}"
   118              memoryInitialSize="${javac.memoryInitialSize}"
   119              memoryMaximumSize="${javac.memoryMaximumSize}"
   120              source="${javac.source}"
   121 	     debug="${javac.debug}"
   122              target="${javac.target}">
   123             <compilerarg value="-J-Xbootclasspath/p:${javac.jar}"/>
   124             <compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/>
   125             <src refid="src.dir.id"/>
   126         </javac>
   127     </target>
   129     <!-- Test. (FIXME: Need to know how to run tests.) -->
   130     <target name="test"
   131 	    depends="init, -init-src-dirs, dist">
   132         <echo message="FIXME: How do you run the tests"/>
   133     </target>
   135     <!-- Populate source area if needed. -->
   136     <target name="source"
   137             depends="init, -init-src-dirs"
   138             description="Populate all source file directories">
   139     </target>
   141     <!-- Populate drop_included area. -->
   142     <target name="drop_included"
   143             depends="clobber"
   144             description="Populate all source file directories">
   145         <delete dir="${drop.included.dir}"/>
   146         <antcall target="source"/>
   147         <move file="${drop.expanded.dir}" tofile="${drop.included.dir}"/>
   148         <delete dir="${drop.included.dir}/bundles"/>
   149     </target>
   151     <!-- Clean up compiled files. -->
   152     <target name="clean"
   153             description="Delete all generated files">
   154         <delete dir="${build.dir}"/>
   155         <delete dir="${dist.dir}"/>
   156     </target>
   158     <!-- Clean up compiled files and all imported source files. -->
   159     <target name="clobber"
   160 	    depends="clean"
   161             description="Delete all generated files, including imported sources">
   162         <delete dir="${drop.expanded.dir}"/>
   163     </target>
   165     <target name="-banner">
   166         <echo message="+---------------------------------------+"/>
   167         <echo message="+ Starting ant project ${ant.project.name} +"/>
   168         <echo message="+---------------------------------------+"/>
   169     </target>
   171     <!-- Do everything but test. -->
   172     <target name="all"
   173 	    depends="-banner, sanity, dist"
   174             description="Build everything.">
   175         <echo message="+---------------------------------------+"/>
   176         <echo message="+ Finishing ant project ${ant.project.name}"/>
   177         <echo message="+---------------------------------------+"/>
   178     </target>
   180 </project>

mercurial