jaxws/make/build.xml
author weijun
Tue, 10 Jun 2008 10:51:33 +0800
changeset 705 1db8adb3ea95
parent 8 474761f14bca
child 2678 57cf2a1c1a05
child 2839 668ff342c026
permissions -rw-r--r--
6711509: PolicyTool is misspelling Runtime permission - 'setSecurityManager' entry in the policy file Reviewed-by: wetmore, mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
474761f14bca Initial load
duke
parents:
diff changeset
     1
<?xml version="1.0"?>
474761f14bca Initial load
duke
parents:
diff changeset
     2
<!--
474761f14bca Initial load
duke
parents:
diff changeset
     3
 Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
474761f14bca Initial load
duke
parents:
diff changeset
     4
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
474761f14bca Initial load
duke
parents:
diff changeset
     5
474761f14bca Initial load
duke
parents:
diff changeset
     6
 This code is free software; you can redistribute it and/or modify it
474761f14bca Initial load
duke
parents:
diff changeset
     7
 under the terms of the GNU General Public License version 2 only, as
474761f14bca Initial load
duke
parents:
diff changeset
     8
 published by the Free Software Foundation.  Sun designates this
474761f14bca Initial load
duke
parents:
diff changeset
     9
 particular file as subject to the "Classpath" exception as provided
474761f14bca Initial load
duke
parents:
diff changeset
    10
 by Sun in the LICENSE file that accompanied this code.
474761f14bca Initial load
duke
parents:
diff changeset
    11
474761f14bca Initial load
duke
parents:
diff changeset
    12
 This code is distributed in the hope that it will be useful, but WITHOUT
474761f14bca Initial load
duke
parents:
diff changeset
    13
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
474761f14bca Initial load
duke
parents:
diff changeset
    14
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
474761f14bca Initial load
duke
parents:
diff changeset
    15
 version 2 for more details (a copy is included in the LICENSE file that
474761f14bca Initial load
duke
parents:
diff changeset
    16
 accompanied this code).
474761f14bca Initial load
duke
parents:
diff changeset
    17
474761f14bca Initial load
duke
parents:
diff changeset
    18
 You should have received a copy of the GNU General Public License version
474761f14bca Initial load
duke
parents:
diff changeset
    19
 2 along with this work; if not, write to the Free Software Foundation,
474761f14bca Initial load
duke
parents:
diff changeset
    20
 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
474761f14bca Initial load
duke
parents:
diff changeset
    21
474761f14bca Initial load
duke
parents:
diff changeset
    22
 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
474761f14bca Initial load
duke
parents:
diff changeset
    23
 CA 95054 USA or visit www.sun.com if you need additional information or
474761f14bca Initial load
duke
parents:
diff changeset
    24
 have any questions.
474761f14bca Initial load
duke
parents:
diff changeset
    25
-->
474761f14bca Initial load
duke
parents:
diff changeset
    26
474761f14bca Initial load
duke
parents:
diff changeset
    27
<!--
474761f14bca Initial load
duke
parents:
diff changeset
    28
 This is the main build file for the jaxws workspace.
474761f14bca Initial load
duke
parents:
diff changeset
    29
 -->
474761f14bca Initial load
duke
parents:
diff changeset
    30
474761f14bca Initial load
duke
parents:
diff changeset
    31
<project name="jaxws" default="all" basedir=".">
474761f14bca Initial load
duke
parents:
diff changeset
    32
474761f14bca Initial load
duke
parents:
diff changeset
    33
    <!-- Convenient shorthands for standard locations within the workspace. -->
474761f14bca Initial load
duke
parents:
diff changeset
    34
    <property file="build.properties"/>
474761f14bca Initial load
duke
parents:
diff changeset
    35
    <property name="topdir" value=".."/>
474761f14bca Initial load
duke
parents:
diff changeset
    36
    <property name="build.dir" location="${topdir}/build"/>
474761f14bca Initial load
duke
parents:
diff changeset
    37
    <property name="build.classes.dir" location="${build.dir}/classes"/>
474761f14bca Initial load
duke
parents:
diff changeset
    38
    <property name="build.gensrc.dir" location="${build.dir}/gensrc"/>
474761f14bca Initial load
duke
parents:
diff changeset
    39
    <property name="build.toolclasses.dir" location="${build.dir}/toolclasses"/>
474761f14bca Initial load
duke
parents:
diff changeset
    40
    <property name="dist.dir" location="${topdir}/dist"/>
474761f14bca Initial load
duke
parents:
diff changeset
    41
    <property name="dist.lib.dir" location="${dist.dir}/lib"/>
474761f14bca Initial load
duke
parents:
diff changeset
    42
    <property name="make.dir" location="${topdir}/make"/>
474761f14bca Initial load
duke
parents:
diff changeset
    43
    <property name="make.tools.dir" location="${make.dir}/tools"/>
474761f14bca Initial load
duke
parents:
diff changeset
    44
    <property name="src.dir" location="${topdir}/src"/>
474761f14bca Initial load
duke
parents:
diff changeset
    45
    <property name="src.classes.dir" location="${src.dir}/share/classes"/>
474761f14bca Initial load
duke
parents:
diff changeset
    46
    <property environment="env"/>
474761f14bca Initial load
duke
parents:
diff changeset
    47
474761f14bca Initial load
duke
parents:
diff changeset
    48
    <target name="build" depends="banner, build-classes, build-tools, build-binaries">
474761f14bca Initial load
duke
parents:
diff changeset
    49
	<mkdir dir="${dist.lib.dir}"/>
474761f14bca Initial load
duke
parents:
diff changeset
    50
	<jar file="${dist.lib.dir}/classes.jar" basedir="${build.classes.dir}"/>
474761f14bca Initial load
duke
parents:
diff changeset
    51
	<zip file="${dist.lib.dir}/src.zip" basedir="${src.classes.dir}"/>
474761f14bca Initial load
duke
parents:
diff changeset
    52
    </target>
474761f14bca Initial load
duke
parents:
diff changeset
    53
474761f14bca Initial load
duke
parents:
diff changeset
    54
    <!-- Debug information -->
474761f14bca Initial load
duke
parents:
diff changeset
    55
    <target name="sanity"
474761f14bca Initial load
duke
parents:
diff changeset
    56
        description="display settings of configuration values">
474761f14bca Initial load
duke
parents:
diff changeset
    57
        <echo level="info">ant.home = ${ant.home}</echo>
474761f14bca Initial load
duke
parents:
diff changeset
    58
        <echo level="info">java.home = ${env.JAVA_HOME}</echo>
474761f14bca Initial load
duke
parents:
diff changeset
    59
        <echo level="info">bootstrap.dir = ${bootstrap.dir}</echo>
474761f14bca Initial load
duke
parents:
diff changeset
    60
    </target>
474761f14bca Initial load
duke
parents:
diff changeset
    61
474761f14bca Initial load
duke
parents:
diff changeset
    62
    <target name="build-tools" depends="-defs-pstrip">
474761f14bca Initial load
duke
parents:
diff changeset
    63
        <mkdir dir="${build.dir}"/>
474761f14bca Initial load
duke
parents:
diff changeset
    64
        <mkdir dir="${build.classes.dir}"/>
474761f14bca Initial load
duke
parents:
diff changeset
    65
	    <pstrip srcdir="${src.classes.dir}"
474761f14bca Initial load
duke
parents:
diff changeset
    66
                    destdir="${build.classes.dir}"
474761f14bca Initial load
duke
parents:
diff changeset
    67
		    includes="**/*.properties"/>
474761f14bca Initial load
duke
parents:
diff changeset
    68
    </target>
474761f14bca Initial load
duke
parents:
diff changeset
    69
474761f14bca Initial load
duke
parents:
diff changeset
    70
    <target name="build-binaries">
474761f14bca Initial load
duke
parents:
diff changeset
    71
        <mkdir dir="${build.dir}"/>
474761f14bca Initial load
duke
parents:
diff changeset
    72
        <mkdir dir="${build.classes.dir}"/>
474761f14bca Initial load
duke
parents:
diff changeset
    73
            <copy todir="${build.classes.dir}">
474761f14bca Initial load
duke
parents:
diff changeset
    74
                 <fileset dir="${src.classes.dir}"
474761f14bca Initial load
duke
parents:
diff changeset
    75
                     includes="**/*.xsd, **/*.default"
474761f14bca Initial load
duke
parents:
diff changeset
    76
                     excludes="**/*.java, **/*.package.html, **/*.properties"/>
474761f14bca Initial load
duke
parents:
diff changeset
    77
            </copy>
474761f14bca Initial load
duke
parents:
diff changeset
    78
        <mkdir dir="${build.classes.dir}/META-INF/services"/>
474761f14bca Initial load
duke
parents:
diff changeset
    79
            <copy todir="${build.classes.dir}/META-INF/services"
474761f14bca Initial load
duke
parents:
diff changeset
    80
                  file="${src.classes.dir}/com/sun/tools/etc/META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory"/>
474761f14bca Initial load
duke
parents:
diff changeset
    81
    </target>
474761f14bca Initial load
duke
parents:
diff changeset
    82
474761f14bca Initial load
duke
parents:
diff changeset
    83
    <target name="-defs-pstrip">
474761f14bca Initial load
duke
parents:
diff changeset
    84
      <mkdir dir="${build.toolclasses.dir}"/>
474761f14bca Initial load
duke
parents:
diff changeset
    85
      <javac srcdir="${make.tools.dir}/StripProperties"
474761f14bca Initial load
duke
parents:
diff changeset
    86
		destdir="${build.toolclasses.dir}/"
474761f14bca Initial load
duke
parents:
diff changeset
    87
		classpath="${ant.home}/lib/ant.jar"/>
474761f14bca Initial load
duke
parents:
diff changeset
    88
      <taskdef name="pstrip"
474761f14bca Initial load
duke
parents:
diff changeset
    89
		 classname="StripPropertiesTask"
474761f14bca Initial load
duke
parents:
diff changeset
    90
		 classpath="${build.toolclasses.dir}/"/>
474761f14bca Initial load
duke
parents:
diff changeset
    91
    </target>
474761f14bca Initial load
duke
parents:
diff changeset
    92
474761f14bca Initial load
duke
parents:
diff changeset
    93
    <target name="build-classes" depends="sanity">
474761f14bca Initial load
duke
parents:
diff changeset
    94
      <mkdir dir="${build.dir}"/>
474761f14bca Initial load
duke
parents:
diff changeset
    95
      <mkdir dir="${build.classes.dir}"/>
474761f14bca Initial load
duke
parents:
diff changeset
    96
      <javac fork="true"
474761f14bca Initial load
duke
parents:
diff changeset
    97
             srcdir="${src.classes.dir}"
474761f14bca Initial load
duke
parents:
diff changeset
    98
             destdir="${build.classes.dir}"
474761f14bca Initial load
duke
parents:
diff changeset
    99
             memoryInitialSize="${javac.memoryInitialSize}"
474761f14bca Initial load
duke
parents:
diff changeset
   100
             memoryMaximumSize="${javac.memoryMaximumSize}"
474761f14bca Initial load
duke
parents:
diff changeset
   101
             target="${javac.target}"
474761f14bca Initial load
duke
parents:
diff changeset
   102
             excludes="com/sun/tools/internal/txw2/**">
474761f14bca Initial load
duke
parents:
diff changeset
   103
         <compilerarg value="-J-Xbootclasspath/p:${bootstrap.dir}/lib/javac.jar"/>
474761f14bca Initial load
duke
parents:
diff changeset
   104
         <compilerarg line="${javac.version.opt}"/>
474761f14bca Initial load
duke
parents:
diff changeset
   105
         <compilerarg line="${javac.no.jdk.warnings}"/>
474761f14bca Initial load
duke
parents:
diff changeset
   106
      </javac>
474761f14bca Initial load
duke
parents:
diff changeset
   107
    </target>
474761f14bca Initial load
duke
parents:
diff changeset
   108
474761f14bca Initial load
duke
parents:
diff changeset
   109
    <target name="clean" description="Delete all generated files">
474761f14bca Initial load
duke
parents:
diff changeset
   110
	<delete dir="${build.dir}"/>
474761f14bca Initial load
duke
parents:
diff changeset
   111
	<delete dir="${dist.dir}"/>
474761f14bca Initial load
duke
parents:
diff changeset
   112
    </target>
474761f14bca Initial load
duke
parents:
diff changeset
   113
474761f14bca Initial load
duke
parents:
diff changeset
   114
    <target name="banner">
474761f14bca Initial load
duke
parents:
diff changeset
   115
      <echo>+---------------------------------------+</echo>
474761f14bca Initial load
duke
parents:
diff changeset
   116
      <echo>+    Building JAX-WS Component          +</echo>
474761f14bca Initial load
duke
parents:
diff changeset
   117
      <echo>+---------------------------------------+</echo>
474761f14bca Initial load
duke
parents:
diff changeset
   118
    </target>
474761f14bca Initial load
duke
parents:
diff changeset
   119
474761f14bca Initial load
duke
parents:
diff changeset
   120
</project>