jaxp/build.xml
author tbell
Fri, 30 Oct 2009 09:06:38 -0700
changeset 4179 0800b2aa9c52
parent 3879 0d9209bdf36c
child 4131 c5661b1a888f
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     1
<?xml version="1.0"?>
7f561c08de6b Initial load
duke
parents:
diff changeset
     2
<!--
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
     3
 Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     4
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7f561c08de6b Initial load
duke
parents:
diff changeset
     5
7f561c08de6b Initial load
duke
parents:
diff changeset
     6
 This code is free software; you can redistribute it and/or modify it
7f561c08de6b Initial load
duke
parents:
diff changeset
     7
 under the terms of the GNU General Public License version 2 only, as
7f561c08de6b Initial load
duke
parents:
diff changeset
     8
 published by the Free Software Foundation.  Sun designates this
7f561c08de6b Initial load
duke
parents:
diff changeset
     9
 particular file as subject to the "Classpath" exception as provided
7f561c08de6b Initial load
duke
parents:
diff changeset
    10
 by Sun in the LICENSE file that accompanied this code.
7f561c08de6b Initial load
duke
parents:
diff changeset
    11
7f561c08de6b Initial load
duke
parents:
diff changeset
    12
 This code is distributed in the hope that it will be useful, but WITHOUT
7f561c08de6b Initial load
duke
parents:
diff changeset
    13
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7f561c08de6b Initial load
duke
parents:
diff changeset
    14
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7f561c08de6b Initial load
duke
parents:
diff changeset
    15
 version 2 for more details (a copy is included in the LICENSE file that
7f561c08de6b Initial load
duke
parents:
diff changeset
    16
 accompanied this code).
7f561c08de6b Initial load
duke
parents:
diff changeset
    17
7f561c08de6b Initial load
duke
parents:
diff changeset
    18
 You should have received a copy of the GNU General Public License version
7f561c08de6b Initial load
duke
parents:
diff changeset
    19
 2 along with this work; if not, write to the Free Software Foundation,
7f561c08de6b Initial load
duke
parents:
diff changeset
    20
 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7f561c08de6b Initial load
duke
parents:
diff changeset
    21
7f561c08de6b Initial load
duke
parents:
diff changeset
    22
 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
7f561c08de6b Initial load
duke
parents:
diff changeset
    23
 CA 95054 USA or visit www.sun.com if you need additional information or
7f561c08de6b Initial load
duke
parents:
diff changeset
    24
 have any questions.
7f561c08de6b Initial load
duke
parents:
diff changeset
    25
-->
7f561c08de6b Initial load
duke
parents:
diff changeset
    26
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    27
<project name="jaxp" default="all" basedir=".">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    28
   
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    29
    <!-- For 'ant -p' or 'ant -projecthelp' -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    30
    
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    31
    <description>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    32
    Ant build script for the ${ant.project.name} part of the jdk.
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    34
    Input Properties: (see build.properties for the ant defaults)
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    35
      bootstrap.dir        - dir with lib/javac.jar, added to javac bootclasspath
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    36
      javac.debug          - true or false for debug classfiles
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    37
      javac.target         - classfile version target
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    38
      javac.source         - source version
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    39
    </description>
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    41
    <!-- Mac is special, need to downgrade these before build.properties. -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    42
    <condition property="javac.source" value="1.5">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    43
        <os family="mac"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    44
    </condition>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    45
    <condition property="javac.target" value="1.5">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    46
        <os family="mac"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    47
    </condition>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    48
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    49
    <!-- Project build properties. -->
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
    <property file="build.properties"/>
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    51
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    52
    <!-- Get shared targets. -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    53
    <import file="build-defs.xml"/>
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    55
    <!-- Initialization of directories needed for build. -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    56
    <target name="init">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    57
        <mkdir dir="${build.dir}"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    58
        <mkdir dir="${build.classes.dir}"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    59
        <mkdir dir="${dist.dir}"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    60
        <mkdir dir="${dist.lib.dir}"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    61
    </target>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    62
    
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    63
    <!-- Sanity checks and settings -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    64
    <target name="sanity"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    65
	    depends="-javac-jar-exists"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    66
            description="Display settings of configuration values">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    67
        <echo message="${sanity.info}"/>
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
    </target>
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    70
     <!-- Check for bootstrap javac.jar file, warn if missing. -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    71
    <condition property="javac.jar.exists">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    72
        <available file="${javac.jar}" type="file"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    73
    </condition>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    74
    <target name="-javac-jar-exists"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    75
            unless="javac.jar.exists">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    76
        <echo message="WARNING: Cannot find ${javac.jar}"/>
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
    </target>
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    79
    <!-- Creation of distribution files to jdk build process. -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    80
    <target name="dist"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    81
	    depends="init, -init-src-dirs, build, -dist-classes-jar, -dist-src-zip"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    82
            description="Create all built distribution files.">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    83
    </target>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    84
    <target name="-dist-classes-jar-uptodate"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    85
	    depends="init, -init-src-dirs">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    86
        <condition property="dist.classes.jar.uptodate">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    87
            <and>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    88
                <available file="${dist.classes.jar}" type="file"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    89
                <uptodate targetfile="${dist.classes.jar}">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    90
                    <srcfiles dir="${build.classes.dir}" includes="**"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    91
                </uptodate>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    92
            </and>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    93
        </condition>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    94
    </target>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    95
    <target name="-dist-classes-jar"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    96
	    depends="init, -init-src-dirs, -dist-classes-jar-uptodate"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    97
            unless="dist.classes.jar.uptodate">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    98
        <delete file="${dist.classes.jar}"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
    99
        <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
    </target>
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   102
    <target name="-build-prep"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   103
	    depends="init, -init-src-dirs, -drop-build-prep">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   104
    </target>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   105
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   106
    <!-- Build (compilation) of sources to class files. -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   107
    <target name="build"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   108
	    depends="init, -init-src-dirs, -build-prep">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   109
        <javac fork="true"
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
             destdir="${build.classes.dir}"
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
             memoryInitialSize="${javac.memoryInitialSize}"
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
             memoryMaximumSize="${javac.memoryMaximumSize}"
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   113
             source="${javac.source}"
2830
2c7571fb9056 6829575: 100028: Debug information is incomplete or missing
aph
parents: 6
diff changeset
   114
	     debug="${javac.debug}"
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
             target="${javac.target}">
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   116
            <compilerarg value="-J-Xbootclasspath/p:${javac.jar}"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   117
            <compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   118
            <src refid="src.dir.id"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   119
        </javac>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   120
    </target>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   121
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   122
    <!-- Test. (FIXME: Need to know how to run tests.) -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   123
    <target name="test"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   124
	    depends="init, -init-src-dirs, dist">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   125
        <echo message="FIXME: How do you run the tests"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   126
    </target>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   127
    
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   128
    <!-- Populate source area if needed. -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   129
    <target name="source"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   130
            depends="init, -init-src-dirs"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   131
            description="Populate all source file directories">
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
    </target>
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   134
    <!-- Clean up compiled files. -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   135
    <target name="clean"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   136
            description="Delete all generated files">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   137
        <delete dir="${build.dir}"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   138
        <delete dir="${dist.dir}"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   139
    </target>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   140
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   141
    <!-- Clean up compiled files and all imported source files. -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   142
    <target name="clobber"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   143
	    depends="clean"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   144
            description="Delete all generated files, including imported sources">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   145
        <delete dir="${drop.dir}"/>
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   146
    </target>
7f561c08de6b Initial load
duke
parents:
diff changeset
   147
3879
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   148
    <target name="-banner">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   149
        <echo message="+---------------------------------------+"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   150
        <echo message="+ Starting ant project ${ant.project.name} +"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   151
        <echo message="+---------------------------------------+"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   152
    </target>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   153
   
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   154
    <!-- Do everything but test. -->
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   155
    <target name="all"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   156
	    depends="-banner, sanity, dist"
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   157
            description="Build everything.">
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   158
        <echo message="+---------------------------------------+"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   159
        <echo message="+ Finishing ant project ${ant.project.name}"/>
0d9209bdf36c 6856630: Restructure jaxp/jaxws repositories
ohair
parents: 3294
diff changeset
   160
        <echo message="+---------------------------------------+"/>
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   161
    </target>
7f561c08de6b Initial load
duke
parents:
diff changeset
   162
7f561c08de6b Initial load
duke
parents:
diff changeset
   163
</project>