aboutsummaryrefslogtreecommitdiff
path: root/src/share/classes/javax/management/build.xml
blob: 24357d694af18828523afdff2446903253aa7648 (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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<?xml version="1.0"?>

<!--
 Copyright (c) 2005, 2006, 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.
-->



<!-- README - HOW TO USE THIS BUILD FILE
     . You need Ant 1.5 or higher available in your path
     . You need a build of Java SE 6 available in your path, or JAVA_HOME set to such a build
     . cd to the directory containing this build.xml file
     . Launch the build by typing: ant
     . Please also read the important comment on basedir definition below.
 -->

<project name="JMX API Version 1.4 - Java SE 6 implementation" 
	 default="jar" 
	 basedir="../../../../.." 
	 >

    <!-- IMPORTANT: BASEDIR DEFINITION  
         This file is assumed to be in: 
         <src_bundle_dir>/j2se/src/share/classes/javax/management 
         Thus the basedir for this project is defined above as: 
         basedir="../../../../.."  
         in order to be the parent dir of src subdir.
	 Result of the build will be placed in ${basedir}/build_jmx 
	 as defined by ${dir.build} property below.
     -->

    <description>
        Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.

        Description: JMX API Version 1.4 - Source Code from Java SE 6
    </description>


    <!-- build properties -->

    <property name="dir.src"
	      location="${basedir}/src/share/classes" />

    <property name="dir.build"
	      location="${basedir}/build_jmx" />

    <property name="dir.build.lib"
	      location="${dir.build}/lib" />

    <property name="dir.build.classes"
	      location="${dir.build}/classes" />

    <property name="dir.build.cache"
	      location="${dir.build}/cache" />

    <property name="flag.debug"
	      value="on" />

    <property name="flag.debug.level"
	      value="lines,source" />

    <property name="flag.optimize"
	      value="on" />

    <property name="flag.javac.source"
	      value="1.6" />

    <property name="flag.deprecation"
	      value="off" />

    <!-- ANT: when compiling, ignore the classpath in effect when Ant is run
	      and therefore use only the classpath specified in the javac tasks -->
    <property name="build.sysclasspath"
	      value="ignore" />



    <!-- Concatenated classpaths: one classpath for each build purpose -->

    <path id="classpath.tobuild.jmx">
	<!-- EMPTY, NO DEPENDENCY! -->
    </path>



    <!-- Convert path objects to string properties for display -->

    <property name="property.classpath.tobuild.jmx"	refid="classpath.tobuild.jmx" />




    <!-- ********************* -->
    <!-- *** BUILD TARGETS *** -->
    <!-- ********************* -->


    <!-- ~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Initialize the build -->

    <target name="init" >

        <!-- Set the values for build date and time -->
        <tstamp>
	    <format property="BUILD_DATE"        pattern="yyyy.MM.dd_HH:mm:ss_z" />
        </tstamp>

        <!-- Create the build directory -->
        <mkdir dir="${dir.build}" />

        <!-- Log the values of all properties to file -->
        <echoproperties destfile="${dir.build}/properties.log" />

        <!-- Display the values of most important properties -->
	<echo />
	<echo>See the contents of ${dir.build}/properties.log for all defined properties.</echo>
	<echo />
        <echo message="MAIN JVM DEFAULT SYSTEM PROPERTIES: " />
        <echo message="   java.runtime.version        = ${java.runtime.version}" />
        <echo message="   java.home                   = ${java.home}" />
        <echo message="   os.arch                     = ${os.arch}" />
        <echo message="   os.name                     = ${os.name}" />
        <echo message="   os.version                  = ${os.version}" />
        <echo message="   user.name                   = ${user.name}" />
	<echo />
        <echo message="ANT BUILT-IN PROPERTIES: " />
        <echo message="   basedir                     = ${basedir}" />
        <echo message="   ant.file                    = ${ant.file}" />
        <echo message="   ant.version                 = ${ant.version}" />
        <echo message="   ant.project.name            = ${ant.project.name}" />
        <echo message="   ant.java.version            = ${ant.java.version}" />
	<echo />
        <echo message="MAIN ANT BUILD-SET PROPERTIES: " />
        <echo message="   dir.src                     = ${dir.src}" />
        <echo message="   dir.build                   = ${dir.build}" />
        <echo message="   classpath.tobuild.jmx       = ${property.classpath.tobuild.jmx}" />
        <echo message="   flag.debug                  = ${flag.debug}" />
        <echo message="   flag.debug.level            = ${flag.debug.level}" />
        <echo message="   flag.optimize               = ${flag.optimize}" />
        <echo message="   flag.javac.source           = ${flag.javac.source}" />
        <echo message="   flag.deprecation            = ${flag.deprecation}" />
        <echo message="   BUILD_DATE                  = ${BUILD_DATE}" />

    </target>
    


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Call classes subtargets and rmic stubs generation -->

    <target name="classes" depends="init,classes-javac,classes-rmic" 
	    description="Call classes subtargets and rmic stubs generation" 
    />


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Build JMX java files                  -->

    <target name="classes-javac" depends="init"
	    description="Build JMX java files" >

        <mkdir dir="${dir.build.classes}" />

	<javac 	srcdir="${dir.src}"
		destdir="${dir.build.classes}" 
		source="${flag.javac.source}"
		debug="${flag.debug}"
		debuglevel="${flag.debug.level}"
		optimize="${flag.optimize}"
		includeAntRuntime="no"
		includeJavaRuntime="no"	
	        >
	    <include name="javax/management/**"/>
	    <include name="com/sun/jmx/**"/>
	</javac>

    </target>


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Generate RMI JRMP and IIOP stub class files for remote objects -->

    <target name="classes-rmic" depends="init,classes-javac"
            description="Generate RMI JRMP and IIOP stub class files for remote objects" >


	<!-- JRMP Stubs -->

        <rmic 	base="${dir.build.classes}"
		classname="javax.management.remote.rmi.RMIConnectionImpl"
		includeAntRuntime="no"
		includeJavaRuntime="no"
		stubversion="1.2"
		>
	</rmic>

	<rmic	base="${dir.build.classes}"
		classname="javax.management.remote.rmi.RMIServerImpl"
		includeAntRuntime="no"
		includeJavaRuntime="no"
		stubversion="1.2"
		>
        </rmic>


	<!-- IIOP Stubs -->

	<rmic 	base="${dir.build.classes}"
		classname="javax.management.remote.rmi.RMIConnectionImpl"
		includeAntRuntime="no"
		includeJavaRuntime="no"
		iiop="yes"
		>
	</rmic>

	<rmic	base="${dir.build.classes}"
		classname="javax.management.remote.rmi.RMIServerImpl"
		includeAntRuntime="no"
		includeJavaRuntime="no"
		iiop="yes"
		>
        </rmic>

    </target>


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Jar all JMX  classes                 -->

    <target name="jar" depends="init,classes"
            description="Jar all JMX classes" >

       <mkdir dir="${dir.build.lib}" />

       <jar jarfile="${dir.build.lib}/jmx.jar" 
	    update="true"
	    >

	    <fileset dir="${dir.build.classes}"
		includes="**/*.class"
	    />

	    <manifest >
		    <attribute name="Build-JDK"              value="${java.runtime.version}" />
		    <attribute name="Build-Platform"         value="${os.arch} ${os.name} ${os.version}" />
		    <attribute name="Build-User"             value="${user.name}" />
		<section name="common">
		    <attribute name="Sealed"                 value="true" />
		    <attribute name="Specification-Title"    value="JMX(TM) API" />
		    <attribute name="Specification-Version"  value="1.4" />
		    <attribute name="Specification-Vendor"   value="Sun Microsystems, Inc." />
		    <attribute name="Implementation-Title"   value="JMX(TM) API, Java SE 6 implementation" />
		    <attribute name="Implementation-Version" value="${BUILD_DATE} rebuild of Mustang JMX sources" /> 
		    <attribute name="Implementation-Vendor"  value="Source bundle from Sun Microsystems, Inc. - Customer rebuilt" />
		</section>
	    </manifest>
       </jar>

    </target>



    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Delete only all class files in build/classes directory hierarchy -->

    <target name="clean-classes"
            description="Delete only all *.class files in build_jmx/classes dir" >
        <delete>
           <fileset dir="${dir.build.classes}" includes="**/*.class" />
        </delete>
    </target>


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Delete build directory and all its contents -->

    <target name="clean-all" 
            description="Delete build directory and all its contents" >
        <delete dir="${dir.build}" />
    </target>               
        
  
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Clean all and build everything -->

    <target name="all" depends="clean-all,jar" 
	    description="Clean all and build everything" />


</project>