aboutsummaryrefslogtreecommitdiff
path: root/make/build.xml
blob: e27bca5429f1cc570bee46a4570096216feeb7fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?xml version="1.0"?>
<!--
 Copyright 2007 Sun Microsystems, Inc.  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.  Sun designates this
 particular file as subject to the "Classpath" exception as provided
 by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
 CA 95054 USA or visit www.sun.com if you need additional information or
 have any questions.
-->

<!--
 This is the main build file for the jaxws workspace.
 -->

<project name="jaxws" default="all" basedir=".">

    <!-- Convenient shorthands for standard locations within the workspace. -->
    <property file="build.properties"/>
    <property name="topdir" value=".."/>
    <property name="build.dir" location="${topdir}/build"/>
    <property name="build.classes.dir" location="${build.dir}/classes"/>
    <property name="build.gensrc.dir" location="${build.dir}/gensrc"/>
    <property name="build.toolclasses.dir" location="${build.dir}/toolclasses"/>
    <property name="dist.dir" location="${topdir}/dist"/>
    <property name="dist.lib.dir" location="${dist.dir}/lib"/>
    <property name="make.dir" location="${topdir}/make"/>
    <property name="make.tools.dir" location="${make.dir}/tools"/>
    <property name="src.dir" location="${topdir}/src"/>
    <property name="src.classes.dir" location="${src.dir}/share/classes"/>
    <property environment="env"/>

    <target name="build" depends="banner, build-classes, build-tools, build-binaries">
	<mkdir dir="${dist.lib.dir}"/>
	<jar file="${dist.lib.dir}/classes.jar" basedir="${build.classes.dir}"/>
	<zip file="${dist.lib.dir}/src.zip" basedir="${src.classes.dir}"/>
    </target>

    <!-- Debug information -->
    <target name="sanity"
        description="display settings of configuration values">
        <echo level="info">ant.home = ${ant.home}</echo>
        <echo level="info">java.home = ${env.JAVA_HOME}</echo>
        <echo level="info">bootstrap.dir = ${bootstrap.dir}</echo>
    </target>

    <target name="build-tools" depends="-defs-pstrip">
        <mkdir dir="${build.dir}"/>
        <mkdir dir="${build.classes.dir}"/>
	    <pstrip srcdir="${src.classes.dir}"
                    destdir="${build.classes.dir}"
		    includes="**/*.properties"/>
    </target>

    <target name="build-binaries">
        <mkdir dir="${build.dir}"/>
        <mkdir dir="${build.classes.dir}"/>
            <copy todir="${build.classes.dir}">
                 <fileset dir="${src.classes.dir}"
                     includes="**/*.xsd, **/*.default"
                     excludes="**/*.java, **/*.package.html, **/*.properties"/>
            </copy>
        <mkdir dir="${build.classes.dir}/META-INF/services"/>
            <copy todir="${build.classes.dir}/META-INF/services"
                  file="${src.classes.dir}/com/sun/tools/etc/META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory"/>
            <copy todir="${build.classes.dir}/META-INF/services"
                  file="${src.classes.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin"/>
 	    <!-- copy jaxb sources files required for jaxb tool time -->	
           <mkdir dir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime"/>
            <copy todir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime">
                 <fileset dir="${src.classes.dir}/com/sun/tools/internal/xjc/runtime"
                     includes="**/*.java"
                     excludes="**/*.package.html"/>
            </copy>
    </target>

    <target name="-defs-pstrip">
      <mkdir dir="${build.toolclasses.dir}"/>
      <javac srcdir="${make.tools.dir}/StripProperties"
		destdir="${build.toolclasses.dir}/"
		classpath="${ant.home}/lib/ant.jar"/>
      <taskdef name="pstrip"
		 classname="StripPropertiesTask"
		 classpath="${build.toolclasses.dir}/"/>
    </target>

    <target name="build-classes" depends="sanity">
      <mkdir dir="${build.dir}"/>
      <mkdir dir="${build.classes.dir}"/>
      <javac fork="true"
             srcdir="${src.classes.dir}"
             destdir="${build.classes.dir}"
             memoryInitialSize="${javac.memoryInitialSize}"
             memoryMaximumSize="${javac.memoryMaximumSize}"
	     debug="${javac.debug}"
             target="${javac.target}"
             excludes="com/sun/tools/internal/txw2/**">
         <compilerarg value="-J-Xbootclasspath/p:${bootstrap.dir}/lib/javac.jar"/>
         <compilerarg line="${javac.version.opt}"/>
         <compilerarg line="${javac.no.jdk.warnings}"/>
      </javac>
    </target>

    <target name="clean" description="Delete all generated files">
	<delete dir="${build.dir}"/>
	<delete dir="${dist.dir}"/>
    </target>

    <target name="banner">
      <echo>+---------------------------------------+</echo>
      <echo>+    Building JAX-WS Component          +</echo>
      <echo>+---------------------------------------+</echo>
    </target>

</project>