build.xml

Mon, 12 Dec 2011 08:13:22 -0800

author
ohair
date
Mon, 12 Dec 2011 08:13:22 -0800
changeset 262
6d622b1b4db0
parent 194
de11bd049d6f
child 286
f50545b5e2f1
permissions
-rw-r--r--

7117110: Remove target 1.5 from jaxp and jaxws repo builds for mac
Reviewed-by: alanb

duke@1 1 <?xml version="1.0"?>
duke@1 2 <!--
ohair@194 3 Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
duke@1 4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1 5
duke@1 6 This code is free software; you can redistribute it and/or modify it
duke@1 7 under the terms of the GNU General Public License version 2 only, as
ohair@116 8 published by the Free Software Foundation. Oracle designates this
duke@1 9 particular file as subject to the "Classpath" exception as provided
ohair@116 10 by Oracle in the LICENSE file that accompanied this code.
duke@1 11
duke@1 12 This code is distributed in the hope that it will be useful, but WITHOUT
duke@1 13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1 14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1 15 version 2 for more details (a copy is included in the LICENSE file that
duke@1 16 accompanied this code).
duke@1 17
duke@1 18 You should have received a copy of the GNU General Public License version
duke@1 19 2 along with this work; if not, write to the Free Software Foundation,
duke@1 20 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1 21
ohair@116 22 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@116 23 or visit www.oracle.com if you need additional information or have any
ohair@116 24 questions.
duke@1 25 -->
duke@1 26
ohair@85 27 <project name="jaxws" default="all" basedir=".">
ohair@85 28
ohair@85 29 <!-- For 'ant -p' or 'ant -projecthelp' -->
ohair@85 30
ohair@85 31 <description>
ohair@85 32 Ant build script for the ${ant.project.name} part of the jdk.
duke@1 33
ohair@85 34 Input Properties: (see build.properties for the ant defaults)
ohair@85 35 bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath
ohair@85 36 javac.debug - true or false for debug classfiles
ohair@85 37 javac.target - classfile version target
ohair@85 38 javac.source - source version
ohair@124 39 drops.dir - directory that holds source drop bundles
ohair@124 40 allow.download - permit downloads from public url (default is false)
ohair@124 41 (used if bundles not found in drops.dir)
ohair@124 42
ohair@124 43 Run 'make help' for help using the Makefile.
ohair@85 44 </description>
duke@1 45
ohair@85 46 <!-- Project build properties. -->
duke@1 47 <property file="build.properties"/>
duke@1 48
ohair@91 49 <!-- See if drop sources were included. -->
ohair@91 50 <condition property="drop.dir"
ohair@91 51 value="${drop.included.dir}"
ohair@91 52 else="${drop.expanded.dir}">
ohair@91 53 <available file="${drop.included.dir}" type="dir"/>
ohair@91 54 </condition>
ohair@91 55
ohair@85 56 <!-- Get shared targets. -->
ohair@85 57 <import file="build-defs.xml"/>
ohair@85 58
ohair@85 59 <!-- Initialization of directories needed for build. -->
ohair@85 60 <target name="init">
ohair@85 61 <mkdir dir="${build.dir}"/>
ohair@85 62 <mkdir dir="${build.classes.dir}"/>
ohair@85 63 <mkdir dir="${dist.dir}"/>
ohair@85 64 <mkdir dir="${dist.lib.dir}"/>
ohair@85 65 </target>
ohair@85 66
ohair@85 67 <!-- Sanity checks and settings -->
ohair@85 68 <target name="sanity"
ohair@85 69 depends="-javac-jar-exists"
ohair@85 70 description="Display settings of configuration values">
ohair@85 71 <echo message="${sanity.info}"/>
duke@1 72 </target>
duke@1 73
ohair@85 74 <!-- Check for bootstrap javac.jar file, warn if missing. -->
ohair@85 75 <condition property="javac.jar.exists">
ohair@85 76 <available file="${javac.jar}" type="file"/>
ohair@85 77 </condition>
ohair@85 78 <target name="-javac-jar-exists"
ohair@85 79 unless="javac.jar.exists">
ohair@85 80 <echo message="WARNING: Cannot find ${javac.jar}"/>
duke@1 81 </target>
duke@1 82
ohair@85 83 <!-- Creation of distribution files to jdk build process. -->
ohair@85 84 <target name="dist"
ohair@85 85 depends="init, -init-src-dirs, build, -dist-classes-jar, -dist-src-zip"
ohair@85 86 description="Create all built distribution files.">
ohair@85 87 </target>
ohair@85 88 <target name="-dist-classes-jar-uptodate"
ohair@85 89 depends="init, -init-src-dirs">
ohair@85 90 <condition property="dist.classes.jar.uptodate">
ohair@85 91 <and>
ohair@85 92 <available file="${dist.classes.jar}" type="file"/>
ohair@85 93 <uptodate targetfile="${dist.classes.jar}">
ohair@85 94 <srcfiles dir="${build.classes.dir}" includes="**"/>
ohair@85 95 </uptodate>
ohair@85 96 </and>
ohair@85 97 </condition>
ohair@85 98 </target>
ohair@85 99 <target name="-dist-classes-jar"
ohair@85 100 depends="init, -init-src-dirs, -dist-classes-jar-uptodate"
ohair@85 101 unless="dist.classes.jar.uptodate">
ohair@85 102 <delete file="${dist.classes.jar}"/>
ohair@85 103 <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
duke@1 104 </target>
duke@1 105
ohair@124 106 <target name="-build-setup"
ohair@124 107 depends="init, -init-src-dirs, -drop-build-setup">
duke@1 108 </target>
duke@1 109
ohair@85 110 <!-- Build (compilation) of sources to class files. -->
ohair@85 111 <target name="build"
ohair@124 112 depends="compile, -build-setup">
ohair@124 113 </target>
ohair@124 114 <target name="compile"
ohair@124 115 depends="init, -init-src-dirs">
ohair@124 116 <mkdir dir="${build.classes.dir}"/>
ohair@95 117 <javac
ohair@95 118 includeAntRuntime="false"
ohair@95 119 classpath="${build.classes.dir}:${tools.jar}"
ohair@95 120 fork="true"
duke@1 121 destdir="${build.classes.dir}"
duke@1 122 memoryInitialSize="${javac.memoryInitialSize}"
duke@1 123 memoryMaximumSize="${javac.memoryMaximumSize}"
jjg@63 124 source="${javac.source}"
aph@54 125 debug="${javac.debug}"
ohair@85 126 target="${javac.target}">
ohair@85 127 <compilerarg value="-J-Xbootclasspath/p:${javac.jar}"/>
ohair@85 128 <compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/>
ohair@85 129 <src refid="src.dir.id"/>
ohair@85 130 </javac>
duke@1 131 </target>
duke@1 132
ohair@85 133 <!-- Test. (FIXME: Need to know how to run tests.) -->
ohair@85 134 <target name="test"
ohair@85 135 depends="init, -init-src-dirs, dist">
ohair@85 136 <echo message="FIXME: How do you run the tests"/>
ohair@85 137 </target>
ohair@85 138
ohair@85 139 <!-- Populate source area if needed. -->
ohair@85 140 <target name="source"
ohair@85 141 depends="init, -init-src-dirs"
ohair@85 142 description="Populate all source file directories">
duke@1 143 </target>
duke@1 144
ohair@91 145 <!-- Populate drop_included area. -->
ohair@91 146 <target name="drop_included"
ohair@91 147 depends="clobber"
ohair@91 148 description="Populate all source file directories">
ohair@91 149 <delete dir="${drop.included.dir}"/>
ohair@91 150 <antcall target="source"/>
ohair@91 151 <move file="${drop.expanded.dir}" tofile="${drop.included.dir}"/>
ohair@91 152 <delete dir="${drop.included.dir}/bundles"/>
ohair@91 153 </target>
ohair@91 154
ohair@85 155 <!-- Clean up compiled files. -->
ohair@85 156 <target name="clean"
ohair@85 157 description="Delete all generated files">
ohair@85 158 <delete dir="${build.dir}"/>
ohair@85 159 <delete dir="${dist.dir}"/>
ohair@85 160 </target>
ohair@85 161
ohair@85 162 <!-- Clean up compiled files and all imported source files. -->
ohair@85 163 <target name="clobber"
ohair@85 164 depends="clean"
ohair@85 165 description="Delete all generated files, including imported sources">
ohair@91 166 <delete dir="${drop.expanded.dir}"/>
ohair@85 167 </target>
ohair@85 168
ohair@85 169 <target name="-banner">
ohair@85 170 <echo message="+---------------------------------------+"/>
ohair@85 171 <echo message="+ Starting ant project ${ant.project.name} +"/>
ohair@85 172 <echo message="+---------------------------------------+"/>
ohair@85 173 </target>
ohair@85 174
ohair@85 175 <!-- Do everything but test. -->
ohair@85 176 <target name="all"
ohair@85 177 depends="-banner, sanity, dist"
ohair@85 178 description="Build everything.">
ohair@85 179 <echo message="+---------------------------------------+"/>
ohair@85 180 <echo message="+ Finishing ant project ${ant.project.name}"/>
ohair@85 181 <echo message="+---------------------------------------+"/>
duke@1 182 </target>
duke@1 183
duke@1 184 </project>

mercurial