Skip to content

Commit dc3eadf

Browse files
author
ohair
committed
6856630: Restructure jaxp/jaxws repositories
Reviewed-by: darcy, tbell
1 parent 91babbb commit dc3eadf

15 files changed

+784
-619
lines changed

jaxws/README

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
README:
2-
This file should be located at the top of the jaxws Mercurial repository.
2+
3+
This file should be located at the top of the Mercurial repository.
34

45
See http://openjdk.java.net/ for more information about the OpenJDK.
56

67
See ../README-builds.html for complete details on build machine requirements.
78

89
Simple Build Instructions:
9-
10+
This repository can be loaded as a NetBeans project, built with ant, or
11+
built with GNU make, e.g.
12+
ant
13+
-OR-
1014
cd make && gnumake
1115

12-
The files that will be imported into the jdk build will be in the "dist"
13-
directory.
16+
The built files that will be imported into the jdk build will be in the
17+
"dist" directory.
18+
Help information is available by running "ant -projecthelp" or "make help".
19+
20+
Drop Repository:
21+
This repository builds sources from a created "drop" source directory.
22+
These files will normally be copied from a shared directory area or
23+
downloaded from a public website.
24+
See the ant build script (build.xml) for more details.
1425

jaxws/build-defs.xml

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
4+
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5+
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.
11+
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).
17+
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.
21+
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+
-->
26+
27+
<project name="jaxws_defs" default="all" basedir=".">
28+
29+
<!-- Specific build properties. -->
30+
<property file="jaxws.properties"/>
31+
32+
<!-- Where generated xml files will stay. -->
33+
<property name="xml.gen.dir" value="${build.dir}/xml_generated"/>
34+
<property name="xml.template" value="build-drop-template.xml"/>
35+
36+
<!-- ############### -->
37+
<!-- Begin Macrodefs -->
38+
39+
<!-- Copies template file, replaces @DROP@ pattern, and imports it. -->
40+
<macrodef name="drop-import">
41+
<attribute name="name"/>
42+
<sequential>
43+
<property name="xml.gen.@{name}" value="${xml.gen.dir}/build-drop-@{name}.xml"/>
44+
<mkdir dir="${xml.gen.dir}"/>
45+
<copy file="${xml.template}" tofile="${xml.gen.@{name}}"/>
46+
<replace file="${xml.gen.@{name}}" token="@DROP@" value="@{name}"/>
47+
<import file="${xml.gen.@{name}}"/>
48+
</sequential>
49+
</macrodef>
50+
51+
<!-- End of Macrodefs -->
52+
<!-- ############### -->
53+
54+
<!-- Create xml file and import it for these drops. -->
55+
<drop-import name="jaxws_src"/>
56+
<drop-import name="jaf_src"/>
57+
<!-- <drop-import name="jaxws_tests"/> -->
58+
59+
<!-- Special build area preparation. -->
60+
<target name="-drop-build-prep" depends="init, -init-src-dirs">
61+
<mkdir dir="${build.classes.dir}"/>
62+
<copy todir="${build.classes.dir}">
63+
<fileset dir="${primary.src.dir}"
64+
includes="**/*.xsd, **/*.default"
65+
excludes="**/*.java, **/*.package.html, **/*.properties"/>
66+
</copy>
67+
<mkdir dir="${build.classes.dir}/META-INF/services"/>
68+
<copy todir="${build.classes.dir}/META-INF/services"
69+
file="${primary.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory"/>
70+
<copy todir="${build.classes.dir}/META-INF/services"
71+
file="${primary.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin"/>
72+
<mkdir dir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime"/>
73+
<copy todir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime">
74+
<fileset dir="${primary.src.dir}/com/sun/tools/internal/xjc/runtime"
75+
includes="**/*.java"
76+
excludes="**/*.package.html"/>
77+
</copy>
78+
</target>
79+
80+
<!-- Try to get drop sources, set property use.orig.src.dir if no drops. -->
81+
<target name="-set-props"
82+
depends="init,
83+
jaxws_src-update,
84+
jaf_src-update">
85+
<condition property="use.orig.src.dir">
86+
<and>
87+
<available file="${orig.src.dir}" type="dir"/>
88+
<not>
89+
<and>
90+
<available file="${jaxws_src.src.dir}" type="dir"/>
91+
<available file="${jaf_src.src.dir}" type="dir"/>
92+
</and>
93+
</not>
94+
</and>
95+
</condition>
96+
</target>
97+
98+
<!-- Set up source to use orig.src.dir, if use.orig.src.dir defined. -->
99+
<target name="-use-orig" depends="-set-props" if="use.orig.src.dir">
100+
<property name="primary.src.dir" value="${orig.src.dir}"/>
101+
<path id="src.dir.id">
102+
<pathelement path="${primary.src.dir}"/>
103+
</path>
104+
</target>
105+
106+
<!-- Set up source to use drop.dir, if use.orig.src.dir not defined. -->
107+
<target name="-use-drop" depends="-set-props" unless="use.orig.src.dir">
108+
<property name="primary.src.dir" value="${jaxws_src.src.dir}"/>
109+
<path id="src.dir.id">
110+
<pathelement path="${primary.src.dir}"/>
111+
<pathelement path="${jaf_src.src.dir}"/>
112+
</path>
113+
</target>
114+
115+
<!-- Source directory selection. -->
116+
<target name="-init-src-dirs"
117+
depends="init, -use-orig, -use-drop">
118+
<echo message="Using primary.src.dir=${primary.src.dir}"/>
119+
<pathconvert property="src.list.id" refid="src.dir.id"/>
120+
<echo message="Using src.dir.id=${src.list.id}"/>
121+
</target>
122+
123+
<!-- Create orig src.zip. -->
124+
<target name="-orig-src-zip" depends="init, -set-props" if="use.orig.src.dir">
125+
<zip file="${dist.src.zip}" basedir="${primary.src.dir}"/>
126+
</target>
127+
128+
<!-- Create drop src.zip. -->
129+
<target name="-drop-src-zip" depends="init, -set-props" unless="use.orig.src.dir">
130+
<zip file="${dist.src.zip}" basedir="${primary.src.dir}"/>
131+
<zip file="${dist.src.zip}" basedir="${jaf_src.src.dir}" update="true"/>
132+
</target>
133+
134+
<!-- Create src.zip. -->
135+
<target name="-dist-src-zip" depends="init, -orig-src-zip, -drop-src-zip">
136+
</target>
137+
138+
</project>

jaxws/build-drop-template.xml

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
4+
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5+
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.
11+
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).
17+
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.
21+
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+
-->
26+
27+
<project name="@DROP@-drop" default="all" basedir=".">
28+
29+
<!-- Locations of master drop bundles. -->
30+
<property name="@[email protected]"
31+
32+
<property name="@[email protected]"
33+
34+
35+
<!-- Location where the copied bundle lands. -->
36+
<property name="@[email protected]"
37+
value="${drop.dir}/bundles/${@[email protected]}"/>
38+
39+
<!-- Root of exploded area. -->
40+
<property name="@[email protected]" value="${drop.dir}/@DROP@"/>
41+
<property name="@[email protected]" value="${@[email protected]}/src"/>
42+
43+
<!-- To see if the drop areas are ready. (ignoring bundles) -->
44+
<target name="-@DROP@-ready">
45+
<condition property="@[email protected]">
46+
<and>
47+
<available file="${@[email protected]}" type="dir"/>
48+
<available file="${@[email protected]}/PATCHED" type="file"/>
49+
</and>
50+
</condition>
51+
</target>
52+
53+
<!-- Copy over bundles from some shared master area. -->
54+
<condition property="@[email protected]">
55+
<available file="${@[email protected]}" type="file"/>
56+
</condition>
57+
<target name="-@DROP@-copy-bundle"
58+
depends="init, -@DROP@-ready"
59+
60+
unless="@[email protected]">
61+
<echo message="Copying from ${@[email protected]}"/>
62+
<dirname property="@[email protected]" file="${@[email protected]}"/>
63+
<mkdir dir="${@[email protected]}"/>
64+
<delete file="${@[email protected]}.temp"/>
65+
<delete file="${@[email protected]}"/>
66+
<copy file="${@[email protected]}" tofile="${@[email protected]}.temp"/>
67+
<move file="${@[email protected]}.temp" tofile="${@[email protected]}"/>
68+
<property name="@[email protected]" value="true"/>
69+
</target>
70+
71+
<!-- Determine if the master url download should be used. -->
72+
<target name="-@DROP@-url-should-be-used" unless="@[email protected]">
73+
<condition property="@[email protected]">
74+
<and>
75+
<http url="${@[email protected]}"/>
76+
<not>
77+
<isset property="@[email protected]"/>
78+
</not>
79+
</and>
80+
</condition>
81+
</target>
82+
83+
<!-- Download bundles from a url. -->
84+
<target name="-@DROP@-url-bundle"
85+
depends="init, -@DROP@-ready, -@DROP@-url-should-be-used"
86+
87+
unless="@[email protected]">
88+
<echo message="Downloading from ${@[email protected]}"/>
89+
<dirname property="@[email protected]" file="${@[email protected]}"/>
90+
<mkdir dir="${@[email protected]}"/>
91+
<delete file="${@[email protected]}.temp"/>
92+
<delete file="${@[email protected]}"/>
93+
<get src="${@[email protected]}" dest="${@[email protected]}.temp"/>
94+
<move file="${@[email protected]}.temp" tofile="${@[email protected]}"/>
95+
<property name="@[email protected]" value="true"/>
96+
</target>
97+
98+
<!-- Fill in the drop zones, but just when needed. -->
99+
<target name="@DROP@-update"
100+
depends="init,
101+
-@DROP@-copy-bundle,
102+
-@DROP@-url-bundle,
103+
-@DROP@-ready"
104+
105+
unless="@[email protected]">
106+
<delete dir="${@[email protected]}"/>
107+
<delete dir="${@[email protected]}-temp"/>
108+
<mkdir dir="${@[email protected]}-temp"/>
109+
<unzip src="${@[email protected]}" dest="${@[email protected]}-temp"/>
110+
<move file="${@[email protected]}-temp" tofile="${@[email protected]}"/>
111+
<touch>
112+
<fileset dir="${@[email protected]}"/>
113+
</touch>
114+
<condition property="patch.utility" value="gpatch" else="patch">
115+
<os name="SunOS"/>
116+
</condition>
117+
<apply executable="${patch.utility}"
118+
119+
parallel="false"
120+
failonerror="true"
121+
verbose="true">
122+
<arg value="-l"/>
123+
<arg value="-p0"/>
124+
<arg value="-i"/>
125+
<filelist dir="${patches.dir}/@DROP@" files="${@[email protected]}"/>
126+
</apply>
127+
<echo file="${@[email protected]}/PATCHED"
128+
message="Patches have been applied."/>
129+
</target>
130+
131+
</project>

0 commit comments

Comments
 (0)