make/build.xml

Wed, 06 May 2009 11:29:11 -0700

author
ohair
date
Wed, 06 May 2009 11:29:11 -0700
changeset 56
35c29ff8d904
parent 54
a92183572d99
child 57
d95fec0fa489
permissions
-rw-r--r--

6837665: Deal with windows ant problem where commas in -D options do not work
Reviewed-by: xdono

     1 <?xml version="1.0"?>
     2 <!--
     3  Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
     4  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     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
     8  published by the Free Software Foundation.  Sun designates this
     9  particular file as subject to the "Classpath" exception as provided
    10  by Sun in the LICENSE file that accompanied this code.
    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).
    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.
    22  Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    23  CA 95054 USA or visit www.sun.com if you need additional information or
    24  have any questions.
    25 -->
    27 <!--
    28  This is the main build file for the jaxws workspace.
    29  -->
    31 <project name="jaxws" default="all" basedir=".">
    33     <!-- Convenient shorthands for standard locations within the workspace. -->
    34     <property file="build.properties"/>
    35     <property name="topdir" value=".."/>
    36     <property name="build.dir" location="${topdir}/build"/>
    37     <property name="build.classes.dir" location="${build.dir}/classes"/>
    38     <property name="build.gensrc.dir" location="${build.dir}/gensrc"/>
    39     <property name="build.toolclasses.dir" location="${build.dir}/toolclasses"/>
    40     <property name="dist.dir" location="${topdir}/dist"/>
    41     <property name="dist.lib.dir" location="${dist.dir}/lib"/>
    42     <property name="make.dir" location="${topdir}/make"/>
    43     <property name="make.tools.dir" location="${make.dir}/tools"/>
    44     <property name="src.dir" location="${topdir}/src"/>
    45     <property name="src.classes.dir" location="${src.dir}/share/classes"/>
    46     <property environment="env"/>
    48     <target name="build" depends="banner, build-classes, build-tools, build-binaries">
    49 	<mkdir dir="${dist.lib.dir}"/>
    50 	<jar file="${dist.lib.dir}/classes.jar" basedir="${build.classes.dir}"/>
    51 	<zip file="${dist.lib.dir}/src.zip" basedir="${src.classes.dir}"/>
    52     </target>
    54     <!-- Debug information -->
    55     <target name="sanity"
    56         description="display settings of configuration values">
    57         <echo level="info">ant.home = ${ant.home}</echo>
    58         <echo level="info">java.home = ${env.JAVA_HOME}</echo>
    59         <echo level="info">bootstrap.dir = ${bootstrap.dir}</echo>
    60     </target>
    62     <target name="build-tools" depends="-defs-pstrip">
    63         <mkdir dir="${build.dir}"/>
    64         <mkdir dir="${build.classes.dir}"/>
    65 	    <pstrip srcdir="${src.classes.dir}"
    66                     destdir="${build.classes.dir}"
    67 		    includes="**/*.properties"/>
    68     </target>
    70     <target name="build-binaries">
    71         <mkdir dir="${build.dir}"/>
    72         <mkdir dir="${build.classes.dir}"/>
    73             <copy todir="${build.classes.dir}">
    74                  <fileset dir="${src.classes.dir}"
    75                      includes="**/*.xsd, **/*.default"
    76                      excludes="**/*.java, **/*.package.html, **/*.properties"/>
    77             </copy>
    78         <mkdir dir="${build.classes.dir}/META-INF/services"/>
    79             <copy todir="${build.classes.dir}/META-INF/services"
    80                   file="${src.classes.dir}/com/sun/tools/etc/META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory"/>
    81     </target>
    83     <target name="-defs-pstrip">
    84       <mkdir dir="${build.toolclasses.dir}"/>
    85       <javac srcdir="${make.tools.dir}/StripProperties"
    86 		destdir="${build.toolclasses.dir}/"
    87 		classpath="${ant.home}/lib/ant.jar"/>
    88       <taskdef name="pstrip"
    89 		 classname="StripPropertiesTask"
    90 		 classpath="${build.toolclasses.dir}/"/>
    91     </target>
    93     <target name="build-classes" depends="sanity">
    94       <mkdir dir="${build.dir}"/>
    95       <mkdir dir="${build.classes.dir}"/>
    96       <javac fork="true"
    97              srcdir="${src.classes.dir}"
    98              destdir="${build.classes.dir}"
    99              memoryInitialSize="${javac.memoryInitialSize}"
   100              memoryMaximumSize="${javac.memoryMaximumSize}"
   101 	     debug="${javac.debug}"
   102              target="${javac.target}"
   103              excludes="com/sun/tools/internal/txw2/**">
   104          <compilerarg value="-J-Xbootclasspath/p:${bootstrap.dir}/lib/javac.jar"/>
   105          <compilerarg line="${javac.version.opt}"/>
   106          <compilerarg line="${javac.no.jdk.warnings}"/>
   107       </javac>
   108     </target>
   110     <target name="clean" description="Delete all generated files">
   111 	<delete dir="${build.dir}"/>
   112 	<delete dir="${dist.dir}"/>
   113     </target>
   115     <target name="banner">
   116       <echo>+---------------------------------------+</echo>
   117       <echo>+    Building JAX-WS Component          +</echo>
   118       <echo>+---------------------------------------+</echo>
   119     </target>
   121 </project>

mercurial