Thu, 16 Sep 2010 11:18:41 -0700
Merge
ohair@85 | 1 | <?xml version="1.0"?> |
ohair@85 | 2 | <!-- |
ohair@116 | 3 | Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. |
ohair@85 | 4 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ohair@85 | 5 | |
ohair@85 | 6 | This code is free software; you can redistribute it and/or modify it |
ohair@85 | 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 |
ohair@85 | 9 | particular file as subject to the "Classpath" exception as provided |
ohair@116 | 10 | by Oracle in the LICENSE file that accompanied this code. |
ohair@85 | 11 | |
ohair@85 | 12 | This code is distributed in the hope that it will be useful, but WITHOUT |
ohair@85 | 13 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ohair@85 | 14 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ohair@85 | 15 | version 2 for more details (a copy is included in the LICENSE file that |
ohair@85 | 16 | accompanied this code). |
ohair@85 | 17 | |
ohair@85 | 18 | You should have received a copy of the GNU General Public License version |
ohair@85 | 19 | 2 along with this work; if not, write to the Free Software Foundation, |
ohair@85 | 20 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ohair@85 | 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. |
ohair@85 | 25 | --> |
ohair@85 | 26 | |
ohair@85 | 27 | <project name="jaxws_defs" default="all" basedir="."> |
ohair@85 | 28 | |
ohair@85 | 29 | <!-- Specific build properties. --> |
ohair@85 | 30 | <property file="jaxws.properties"/> |
ohair@85 | 31 | |
ohair@85 | 32 | <!-- Where generated xml files will stay. --> |
ohair@85 | 33 | <property name="xml.gen.dir" value="${build.dir}/xml_generated"/> |
ohair@85 | 34 | <property name="xml.template" value="build-drop-template.xml"/> |
ohair@85 | 35 | |
ohair@85 | 36 | <!-- ############### --> |
ohair@85 | 37 | <!-- Begin Macrodefs --> |
ohair@85 | 38 | |
ohair@85 | 39 | <!-- Copies template file, replaces @DROP@ pattern, and imports it. --> |
ohair@85 | 40 | <macrodef name="drop-import"> |
ohair@85 | 41 | <attribute name="name"/> |
ohair@85 | 42 | <sequential> |
ohair@85 | 43 | <property name="xml.gen.@{name}" value="${xml.gen.dir}/build-drop-@{name}.xml"/> |
ohair@85 | 44 | <mkdir dir="${xml.gen.dir}"/> |
ohair@85 | 45 | <copy file="${xml.template}" tofile="${xml.gen.@{name}}"/> |
ohair@85 | 46 | <replace file="${xml.gen.@{name}}" token="@DROP@" value="@{name}"/> |
ohair@85 | 47 | <import file="${xml.gen.@{name}}"/> |
ohair@85 | 48 | </sequential> |
ohair@85 | 49 | </macrodef> |
ohair@85 | 50 | |
ohair@85 | 51 | <!-- End of Macrodefs --> |
ohair@85 | 52 | <!-- ############### --> |
ohair@85 | 53 | |
ohair@85 | 54 | <!-- Create xml file and import it for these drops. --> |
ohair@85 | 55 | <drop-import name="jaxws_src"/> |
ohair@85 | 56 | <drop-import name="jaf_src"/> |
ohair@85 | 57 | <!-- <drop-import name="jaxws_tests"/> --> |
ohair@124 | 58 | |
ohair@124 | 59 | <!-- Fail and print helpful messages if source does not exist. --> |
ohair@124 | 60 | <target name="-src-help"> |
ohair@124 | 61 | <fail message="${failed.url.src.message}"> |
ohair@124 | 62 | <condition> |
ohair@124 | 63 | <and> |
ohair@124 | 64 | <not> |
ohair@124 | 65 | <and> |
ohair@124 | 66 | <available file="${jaxws_src.src.dir}" type="dir"/> |
ohair@124 | 67 | <available file="${jaf_src.src.dir}" type="dir"/> |
ohair@124 | 68 | </and> |
ohair@124 | 69 | </not> |
ohair@124 | 70 | <istrue value="${allow.downloads}"/> |
ohair@124 | 71 | </and> |
ohair@124 | 72 | </condition> |
ohair@124 | 73 | </fail> |
ohair@124 | 74 | <fail message="${failed.nourl.src.message}"> |
ohair@124 | 75 | <condition> |
ohair@124 | 76 | <not> |
ohair@124 | 77 | <and> |
ohair@124 | 78 | <available file="${jaxws_src.src.dir}" type="dir"/> |
ohair@124 | 79 | <available file="${jaf_src.src.dir}" type="dir"/> |
ohair@124 | 80 | </and> |
ohair@124 | 81 | </not> |
ohair@124 | 82 | </condition> |
ohair@124 | 83 | </fail> |
ohair@124 | 84 | </target> |
ohair@85 | 85 | |
ohair@124 | 86 | <!-- Special build area setup. --> |
ohair@124 | 87 | <target name="-drop-build-setup" depends="init, -init-src-dirs"> |
ohair@85 | 88 | <mkdir dir="${build.classes.dir}"/> |
ohair@85 | 89 | <copy todir="${build.classes.dir}"> |
ohair@85 | 90 | <fileset dir="${primary.src.dir}" |
ohair@87 | 91 | includes="**/*.xsd, **/*.default, **/*.properties" |
ohair@87 | 92 | excludes="**/*.java, **/*.package.html"/> |
ohair@85 | 93 | </copy> |
ohair@87 | 94 | <replaceregexp match="#(.*)$" replace="#" flags="gm"> |
ohair@87 | 95 | <fileset dir="${build.classes.dir}" includes="**/*.properties"/> |
ohair@87 | 96 | </replaceregexp> |
ohair@87 | 97 | |
ohair@85 | 98 | <mkdir dir="${build.classes.dir}/META-INF/services"/> |
ohair@85 | 99 | <copy todir="${build.classes.dir}/META-INF/services" |
ohair@85 | 100 | file="${primary.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory"/> |
ohair@85 | 101 | <copy todir="${build.classes.dir}/META-INF/services" |
ohair@85 | 102 | file="${primary.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin"/> |
ohair@85 | 103 | <mkdir dir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime"/> |
ohair@85 | 104 | <copy todir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime"> |
ohair@85 | 105 | <fileset dir="${primary.src.dir}/com/sun/tools/internal/xjc/runtime" |
ohair@85 | 106 | includes="**/*.java" |
ohair@85 | 107 | excludes="**/*.package.html"/> |
ohair@85 | 108 | </copy> |
ohair@85 | 109 | </target> |
ohair@85 | 110 | |
ohair@91 | 111 | <!-- Try to get drop sources. --> |
ohair@85 | 112 | <target name="-set-props" |
ohair@85 | 113 | depends="init, |
ohair@85 | 114 | jaxws_src-update, |
ohair@85 | 115 | jaf_src-update"> |
ohair@85 | 116 | </target> |
ohair@85 | 117 | |
ohair@91 | 118 | <!-- Set up source to use drop.dir. --> |
ohair@91 | 119 | <target name="-use-drop" depends="-set-props"> |
ohair@85 | 120 | <property name="primary.src.dir" value="${jaxws_src.src.dir}"/> |
ohair@85 | 121 | <path id="src.dir.id"> |
ohair@85 | 122 | <pathelement path="${primary.src.dir}"/> |
ohair@85 | 123 | <pathelement path="${jaf_src.src.dir}"/> |
ohair@85 | 124 | </path> |
ohair@85 | 125 | </target> |
ohair@85 | 126 | |
ohair@85 | 127 | <!-- Source directory selection. --> |
ohair@85 | 128 | <target name="-init-src-dirs" |
ohair@124 | 129 | depends="init, -use-drop,-src-help"> |
ohair@85 | 130 | <echo message="Using primary.src.dir=${primary.src.dir}"/> |
ohair@85 | 131 | <pathconvert property="src.list.id" refid="src.dir.id"/> |
ohair@85 | 132 | <echo message="Using src.dir.id=${src.list.id}"/> |
ohair@85 | 133 | </target> |
ohair@85 | 134 | |
ohair@85 | 135 | <!-- Create drop src.zip. --> |
ohair@91 | 136 | <target name="-drop-src-zip" depends="init, -set-props"> |
ohair@85 | 137 | <zip file="${dist.src.zip}" basedir="${primary.src.dir}"/> |
ohair@85 | 138 | <zip file="${dist.src.zip}" basedir="${jaf_src.src.dir}" update="true"/> |
ohair@85 | 139 | </target> |
ohair@85 | 140 | |
ohair@85 | 141 | <!-- Create src.zip. --> |
ohair@91 | 142 | <target name="-dist-src-zip" depends="init, -drop-src-zip"> |
ohair@85 | 143 | </target> |
ohair@85 | 144 | |
ohair@85 | 145 | </project> |