view build-defs.xml @ 293:1107cfa36f53 default tip

Added tag icedtea-2.0.1 for changeset a9dabe974227
author andrew
date Tue, 14 Feb 2012 14:05:31 +0000
parents de11bd049d6f
children
line wrap: on
line source

<?xml version="1.0"?>
<!--
 Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

 This code is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License version 2 only, as
 published by the Free Software Foundation.  Oracle designates this
 particular file as subject to the "Classpath" exception as provided
 by Oracle in the LICENSE file that accompanied this code.

 This code is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 version 2 for more details (a copy is included in the LICENSE file that
 accompanied this code).

 You should have received a copy of the GNU General Public License version
 2 along with this work; if not, write to the Free Software Foundation,
 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 or visit www.oracle.com if you need additional information or have any
 questions.
-->

<project name="jaxws_defs" default="all" basedir=".">
     
    <!-- Specific build properties. -->
    <property file="jaxws.properties"/>

    <!-- Where generated xml files will stay. -->
    <property name="xml.gen.dir" value="${build.dir}/xml_generated"/>
    <property name="xml.template" value="build-drop-template.xml"/>

    <!--  ############### -->
    <!--  Begin Macrodefs -->

    <!-- Copies template file, replaces @DROP@ pattern, and imports it. -->
    <macrodef name="drop-import">
        <attribute name="name"/>
        <sequential>
            <property name="xml.gen.@{name}" value="${xml.gen.dir}/build-drop-@{name}.xml"/>
            <mkdir dir="${xml.gen.dir}"/>
            <copy file="${xml.template}" tofile="${xml.gen.@{name}}"/>
            <replace file="${xml.gen.@{name}}" token="@DROP@" value="@{name}"/>
            <import file="${xml.gen.@{name}}"/>
        </sequential>
    </macrodef>

    <!--  End of Macrodefs -->
    <!--  ############### -->

    <!-- Create xml file and import it for these drops. -->
    <drop-import name="jaxws_src"/>
    <drop-import name="jaf_src"/>
    <!-- <drop-import name="jaxws_tests"/> -->
    
    <!-- Fail and print helpful messages if source does not exist. -->
    <target name="-src-help">
      <fail message="${failed.url.src.message}">
	<condition>
	    <and>
                <not>
                    <and>
	                <available file="${jaxws_src.src.dir}" type="dir"/>
                        <available file="${jaf_src.src.dir}" type="dir"/>
	            </and>
	        </not>
	        <istrue value="${allow.downloads}"/>
	    </and>
	</condition>
      </fail>
      <fail message="${failed.nourl.src.message}">
	<condition>
            <not>
                <and>
	            <available file="${jaxws_src.src.dir}" type="dir"/>
                    <available file="${jaf_src.src.dir}" type="dir"/>
	        </and>
	    </not>
	</condition>
      </fail>
    </target>

    <!-- Special build area setup. -->
    <target name="-drop-build-setup" depends="init, -init-src-dirs">
        <mkdir dir="${build.classes.dir}"/>
        <copy todir="${build.classes.dir}">
            <fileset dir="${primary.src.dir}"
                     includes="**/*.xsd, **/*.default, **/*.properties"
                     excludes="**/*.java, **/*.package.html"/>
        </copy>
        <replaceregexp match="#(.*)$" replace="#" flags="gm">
            <fileset dir="${build.classes.dir}" includes="**/*.properties"/>
        </replaceregexp>

        <mkdir dir="${build.classes.dir}/META-INF/services"/>
        <copy todir="${build.classes.dir}/META-INF/services"
              file="${primary.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory"/>
        <copy todir="${build.classes.dir}/META-INF/services"
              file="${primary.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin"/>
        <mkdir dir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime"/>
        <copy todir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime">
            <fileset dir="${primary.src.dir}/com/sun/tools/internal/xjc/runtime"
                     includes="**/*.java"
                     excludes="**/*.package.html"/>
        </copy>
    </target>

    <!-- Try to get drop sources. -->
    <target name="-set-props"
	    depends="init,
                     jaxws_src-update,
                     jaf_src-update">
    </target>

    <!-- Set up source to use drop.dir. -->
    <target name="-use-drop" depends="-set-props">
        <property name="primary.src.dir" value="${jaxws_src.src.dir}"/>
        <path id="src.dir.id">
            <pathelement path="${primary.src.dir}"/>
            <pathelement path="${jaf_src.src.dir}"/>
        </path>
    </target>

    <!-- Source directory selection. -->
    <target name="-init-src-dirs"
	    depends="init, -use-drop,-src-help">
        <echo message="Using primary.src.dir=${primary.src.dir}"/>
        <pathconvert property="src.list.id" refid="src.dir.id"/>
        <echo message="Using src.dir.id=${src.list.id}"/>
    </target>

    <!-- Create drop src.zip. -->
    <target name="-drop-src-zip" depends="init, -set-props">
        <zip file="${dist.src.zip}" basedir="${primary.src.dir}"/>
        <zip file="${dist.src.zip}" basedir="${jaf_src.src.dir}" update="true"/>
    </target>

    <!-- Create src.zip. -->
    <target name="-dist-src-zip" depends="init, -drop-src-zip">
    </target>
    
</project>