Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | <!-- |
Miroslav Kos | 9224d25 | 2012-12-30 00:00:00 +0100 | [diff] [blame] | 3 | Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 4 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 5 | |
| 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 |
Kelly O'Hair | 20b5f2a | 2010-05-25 15:53:08 -0700 | [diff] [blame] | 8 | published by the Free Software Foundation. Oracle designates this |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 9 | particular file as subject to the "Classpath" exception as provided |
Kelly O'Hair | 20b5f2a | 2010-05-25 15:53:08 -0700 | [diff] [blame] | 10 | by Oracle in the LICENSE file that accompanied this code. |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 11 | |
| 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). |
| 17 | |
| 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. |
| 21 | |
Kelly O'Hair | 20b5f2a | 2010-05-25 15:53:08 -0700 | [diff] [blame] | 22 | Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| 23 | or visit www.oracle.com if you need additional information or have any |
| 24 | questions. |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 25 | --> |
| 26 | |
| 27 | <project name="jaxws" default="all" basedir="."> |
| 28 | |
| 29 | <!-- For 'ant -p' or 'ant -projecthelp' --> |
| 30 | |
| 31 | <description> |
| 32 | Ant build script for the ${ant.project.name} part of the jdk. |
| 33 | |
| 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 |
Kelly O'Hair | 70d13b1 | 2010-06-17 17:19:58 -0700 | [diff] [blame] | 39 | |
| 40 | Run 'make help' for help using the Makefile. |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 41 | </description> |
| 42 | |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 43 | <!-- Project build properties. --> |
| 44 | <property file="build.properties"/> |
| 45 | |
Kelly O'Hair | bc113af | 2012-03-06 16:09:35 -0800 | [diff] [blame] | 46 | <property name="jaxws.src.dir" value="src/share/jaxws_classes"/> |
| 47 | <property name="jaf.src.dir" value="src/share/jaf_classes"/> |
| 48 | <path id="src.dir.id"> |
| 49 | <pathelement path="${jaxws.src.dir}"/> |
| 50 | <pathelement path="${jaf.src.dir}"/> |
| 51 | </path> |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 52 | |
| 53 | <!-- Initialization of directories needed for build. --> |
| 54 | <target name="init"> |
| 55 | <mkdir dir="${build.dir}"/> |
| 56 | <mkdir dir="${build.classes.dir}"/> |
| 57 | <mkdir dir="${dist.dir}"/> |
| 58 | <mkdir dir="${dist.lib.dir}"/> |
| 59 | </target> |
| 60 | |
| 61 | <!-- Sanity checks and settings --> |
| 62 | <target name="sanity" |
| 63 | depends="-javac-jar-exists" |
| 64 | description="Display settings of configuration values"> |
| 65 | <echo message="${sanity.info}"/> |
| 66 | </target> |
| 67 | |
| 68 | <!-- Check for bootstrap javac.jar file, warn if missing. --> |
| 69 | <condition property="javac.jar.exists"> |
| 70 | <available file="${javac.jar}" type="file"/> |
| 71 | </condition> |
| 72 | <target name="-javac-jar-exists" |
| 73 | unless="javac.jar.exists"> |
| 74 | <echo message="WARNING: Cannot find ${javac.jar}"/> |
| 75 | </target> |
Kelly O'Hair | bc113af | 2012-03-06 16:09:35 -0800 | [diff] [blame] | 76 | |
| 77 | <!-- Create src.zip. --> |
| 78 | <target name="-dist-src-zip" depends="init"> |
| 79 | <zip file="${dist.src.zip}" basedir="${jaxws.src.dir}"/> |
| 80 | <zip file="${dist.src.zip}" basedir="${jaf.src.dir}" update="true"/> |
| 81 | </target> |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 82 | |
| 83 | <!-- Creation of distribution files to jdk build process. --> |
| 84 | <target name="dist" |
Kelly O'Hair | bc113af | 2012-03-06 16:09:35 -0800 | [diff] [blame] | 85 | depends="init, build, -dist-classes-jar, -dist-src-zip" |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 86 | description="Create all built distribution files."> |
| 87 | </target> |
| 88 | <target name="-dist-classes-jar-uptodate" |
Kelly O'Hair | bc113af | 2012-03-06 16:09:35 -0800 | [diff] [blame] | 89 | depends="init"> |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 90 | <condition property="dist.classes.jar.uptodate"> |
| 91 | <and> |
| 92 | <available file="${dist.classes.jar}" type="file"/> |
| 93 | <uptodate targetfile="${dist.classes.jar}"> |
| 94 | <srcfiles dir="${build.classes.dir}" includes="**"/> |
| 95 | </uptodate> |
| 96 | </and> |
| 97 | </condition> |
| 98 | </target> |
| 99 | <target name="-dist-classes-jar" |
Kelly O'Hair | bc113af | 2012-03-06 16:09:35 -0800 | [diff] [blame] | 100 | depends="init, -dist-classes-jar-uptodate" |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 101 | unless="dist.classes.jar.uptodate"> |
| 102 | <delete file="${dist.classes.jar}"/> |
| 103 | <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/> |
| 104 | </target> |
| 105 | |
Kelly O'Hair | bc113af | 2012-03-06 16:09:35 -0800 | [diff] [blame] | 106 | <!-- Special build area setup. --> |
| 107 | <target name="-build-setup" depends="init"> |
| 108 | <mkdir dir="${build.classes.dir}"/> |
| 109 | <copy todir="${build.classes.dir}"> |
| 110 | <fileset dir="${jaxws.src.dir}" |
| 111 | includes="**/*.xsd, **/*.default, **/*.properties" |
| 112 | excludes="**/*.java, **/*.package.html"/> |
| 113 | </copy> |
| 114 | <replaceregexp match="#(.*)$" replace="#" flags="gm"> |
| 115 | <fileset dir="${build.classes.dir}" includes="**/*.properties"/> |
| 116 | </replaceregexp> |
| 117 | |
| 118 | <mkdir dir="${build.classes.dir}/META-INF/services"/> |
| 119 | <copy todir="${build.classes.dir}/META-INF" |
| 120 | file="${jaf.src.dir}/META-INF/mailcap.default"/> |
| 121 | <copy todir="${build.classes.dir}/META-INF" |
| 122 | file="${jaf.src.dir}/META-INF/mimetypes.default"/> |
| 123 | <copy todir="${build.classes.dir}/META-INF/services" |
| 124 | file="${jaxws.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin"/> |
| 125 | <copy todir="${build.classes.dir}/META-INF/services" |
| 126 | file="${jaxws.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin"/> |
| 127 | <mkdir dir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime"/> |
| 128 | <copy todir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime"> |
| 129 | <fileset dir="${jaxws.src.dir}/com/sun/tools/internal/xjc/runtime" |
| 130 | includes="**/*.java" |
| 131 | excludes="**/*.package.html"/> |
| 132 | </copy> |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 133 | </target> |
| 134 | |
| 135 | <!-- Build (compilation) of sources to class files. --> |
| 136 | <target name="build" |
Kelly O'Hair | 70d13b1 | 2010-06-17 17:19:58 -0700 | [diff] [blame] | 137 | depends="compile, -build-setup"> |
| 138 | </target> |
| 139 | <target name="compile" |
Kelly O'Hair | bc113af | 2012-03-06 16:09:35 -0800 | [diff] [blame] | 140 | depends="init"> |
Kelly O'Hair | 70d13b1 | 2010-06-17 17:19:58 -0700 | [diff] [blame] | 141 | <mkdir dir="${build.classes.dir}"/> |
Kelly O'Hair | 7a3e45c | 2009-11-11 11:19:10 -0800 | [diff] [blame] | 142 | <javac |
| 143 | includeAntRuntime="false" |
| 144 | classpath="${build.classes.dir}:${tools.jar}" |
| 145 | fork="true" |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 146 | destdir="${build.classes.dir}" |
| 147 | memoryInitialSize="${javac.memoryInitialSize}" |
| 148 | memoryMaximumSize="${javac.memoryMaximumSize}" |
| 149 | source="${javac.source}" |
| 150 | debug="${javac.debug}" |
| 151 | target="${javac.target}"> |
| 152 | <compilerarg value="-J-Xbootclasspath/p:${javac.jar}"/> |
| 153 | <compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/> |
| 154 | <src refid="src.dir.id"/> |
| 155 | </javac> |
| 156 | </target> |
| 157 | |
| 158 | <!-- Test. (FIXME: Need to know how to run tests.) --> |
| 159 | <target name="test" |
Kelly O'Hair | bc113af | 2012-03-06 16:09:35 -0800 | [diff] [blame] | 160 | depends="init, dist"> |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 161 | <echo message="FIXME: How do you run the tests"/> |
| 162 | </target> |
| 163 | |
| 164 | <!-- Populate source area if needed. --> |
| 165 | <target name="source" |
Kelly O'Hair | bc113af | 2012-03-06 16:09:35 -0800 | [diff] [blame] | 166 | depends="init" |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 167 | description="Populate all source file directories"> |
| 168 | </target> |
| 169 | |
| 170 | <!-- Clean up compiled files. --> |
| 171 | <target name="clean" |
| 172 | description="Delete all generated files"> |
| 173 | <delete dir="${build.dir}"/> |
| 174 | <delete dir="${dist.dir}"/> |
| 175 | </target> |
| 176 | |
| 177 | <!-- Clean up compiled files and all imported source files. --> |
| 178 | <target name="clobber" |
| 179 | depends="clean" |
| 180 | description="Delete all generated files, including imported sources"> |
Kelly O'Hair | 08094f7 | 2009-09-21 13:57:02 -0700 | [diff] [blame] | 181 | </target> |
| 182 | |
| 183 | <target name="-banner"> |
| 184 | <echo message="+---------------------------------------+"/> |
| 185 | <echo message="+ Starting ant project ${ant.project.name} +"/> |
| 186 | <echo message="+---------------------------------------+"/> |
| 187 | </target> |
| 188 | |
| 189 | <!-- Do everything but test. --> |
| 190 | <target name="all" |
| 191 | depends="-banner, sanity, dist" |
| 192 | description="Build everything."> |
| 193 | <echo message="+---------------------------------------+"/> |
| 194 | <echo message="+ Finishing ant project ${ant.project.name}"/> |
| 195 | <echo message="+---------------------------------------+"/> |
| 196 | </target> |
| 197 | |
| 198 | </project> |