1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="modularize" default="all" basedir=".">
3 <description>Scripts to build JDK Java sources in modularized way</description>
6 <antcall target="base"/>
7 <antcall target="corba"/>
10 <!-- basic parameters -->
11 <property name="plugs" value="../../plugs"/>
12 <fail message="You need to provide location of plugs">
13 <condition><not><available file="${plugs}/jre/lib/rt-closed.jar"/></not></condition>
15 <pathconvert property="gensrc">
16 <path><dirset dir="../build"><include name="*/gensrc"/></dirset></path>
18 <fail message="You need to provide location of JDK's generated sources via -Dgensrc=...">
19 <condition><not><available file="${gensrc}"/></not></condition>
22 <target name="merge-sources"
23 description="Copies sources from all over the JDK tree into one place"
25 <mkdir dir="build/sources"/>
26 <copy todir="build/sources">
27 <fileset dir="${gensrc}"/>
28 <fileset dir="${gensrc}/../impsrc">
29 <exclude name="org/relaxng/datatype/**"/>
31 <fileset dir="../jaxp/src/share/classes/">
32 <exclude name="org/relaxng/datatype/**"/>
34 <fileset dir="../langtools/src/share/classes/">
35 <exclude name="org/relaxng/datatype/**"/>
37 <fileset dir="../jaxws/src/share/classes/">
38 <exclude name="org/relaxng/datatype/**"/>
40 <fileset dir="../corba/src/share/classes/"/>
45 <pathelement location="src/share/classes"/>
46 <pathelement location="build/sources"/>
47 <pathelement location="src/solaris/classes"/>
48 <!-- <pathelement location="src/windows/classes"/> -->
50 <property name="build.dir" location="build/modularize"/>
52 <!-- this is the core of the separation - definition
53 of what classes belong into what compilation group.
55 <selector id="applet">
57 <filename name="java/beans/AppletInitializer*"/>
58 <filename name="java/applet/**"/>
59 <filename name="sun/applet/**"/>
60 <filename name="META-INF/services/sun.beans.AppletProxy"/>
65 <filename name="org/omg/**"/>
66 <filename name="com/sun/corba/**"/>
67 <filename name="com/sun/jmx/remote/internal/ProxyInputStream.java"/>
68 <filename name="com/sun/jndi/cosnaming/**"/>
69 <filename name="com/sun/jndi/toolkit/corba/**"/>
70 <filename name="com/sun/jndi/url/iiop/**"/>
71 <filename name="com/sun/jndi/url/iiopname/**"/>
72 <filename name="com/sun/jndi/url/corbaname/**"/>
73 <filename name="javax/management/remote/rmi/RMIConnector.java"/>
74 <filename name="javax/management/remote/rmi/RMIConnectorServer.java"/>
75 <filename name="javax/management/remote/rmi/RMIServerImpl.java"/>
76 <filename name="javax/management/remote/rmi/RMIIIOPServerImpl.java"/>
77 <filename name="javax/management/remote/rmi/RMIConnectionImpl.java"/>
78 <filename name="javax/management/remote/rmi/RMIJRMPServerImpl.java"/>
79 <filename name="javax/rmi/PortableRemoteObject.java"/>
80 <filename name="com/sun/jmx/remote/security/FileLoginModule.java"/>
81 <filename name="com/sun/jmx/remote/security/JMXPluggableAuthenticator.java"/>
82 <filename name="com/sun/jmx/remote/protocol/rmi/ClientProvider.java"/>
83 <filename name="com/sun/jmx/remote/protocol/rmi/ClientProvider.java"/>
84 <filename name="com/sun/jmx/remote/protocol/iiop/ClientProvider.java"/>
85 <filename name="com/sun/jmx/remote/protocol/iiop/ServerProvider.java"/>
86 <filename name="com/sun/jmx/remote/protocol/rmi/ServerProvider.java"/>
87 <filename name="com/sun/jndi/url/iiop/iiopURLContextFactory.java"/>
88 <filename name="sun/rmi/rmic/RMIGenerator.java"/>
89 <filename name="sun/management/jmxremote/ConnectorBootstrap.java"/>
90 <filename name="sun/management/Agent.java"/>
91 <filename name="sun/management/snmp/AdaptorBootstrap.java"/>
92 <filename name="javax/rmi/CORBA/**"/>
93 <filename name="com/sun/org/omg/**"/>
94 <filename name="javax/management/remote/rmi/RMIConnectorServer.java"/>
95 <filename name="com/sun/jndi/url/iiop/iiopURLContext.java"/>
96 <filename name="sun/rmi/rmic/iiop/**"/>
98 <!-- this actually does not depend on corba, but probably
99 does not belong to base either -->
100 <filename name="com/sun/tools/corba/**"/>
101 <!-- now there are just two references in jconsole -->
102 <filename name="sun/tools/jconsole/**"/>
105 <selector id="beans">
108 <filename name="java/beans/**"/>
109 <filename name="sun/beans/**"/>
110 <filename name="com/sun/beans/**"/>
113 <selector refid="applet"/>
114 <selector refid="deprecated7"/>
119 <selector id="deprecated7">
121 <filename name="java/beans/Beans*"/>
127 <!-- exclude classes from other modules -->
128 <selector refid="corba"/>
130 <selector refid="beans"/>
131 <selector refid="client"/>
132 <selector refid="enterprise"/>
133 <selector refid="deprecated7"/>
137 <!-- non-important non-API things
138 which cannot be compiled easily
140 <filename name="**/*-*"/>
141 <filename name="java/dyn/**"/>
142 <filename name="sun/dyn/**"/>
144 <filename name="com/sun/script/javascript/**"/>
145 <filename name="sun/dc/**"/>
146 <filename name="sun/nio/fs/Solaris**"/>
147 <filename name="sun/tracing/**"/>
148 <filename name="com/sun/tracing/ProviderFactory*"/>
152 <!-- individual compilation tasks -->
154 <target name="deprecated7">
155 <antcall target="-compile-one-module">
156 <param name="module" value="deprecated7"/>
157 <param name="depends" value="beans:applet"/>
160 <target name="applet">
161 <antcall target="-compile-one-module">
162 <param name="module" value="applet"/>
163 <param name="depends" value="beans"/>
166 <target name="beans">
167 <antcall target="-compile-one-module">
168 <param name="module" value="beans"/>
171 <target name="corba">
172 <antcall target="-compile-one-module">
173 <param name="module" value="corba"/>
174 <param name="depends" value="base"/>
180 <antcall target="-compile-one-module">
181 <param name="module" value="base"/>
185 <!-- shared routine to compile one of the modules -->
186 <target name="-compile-one-module">
187 <mkdir dir="${build.dir}/classes/${module}"/>
188 <pathconvert pathsep=":" property="module.cp">
189 <path path="${depends}"/>
190 <mapper type="regexp" from=".*[/\\]([^/\\]*)" to="${build.dir}/\1.jar"/>
193 basedir="${build.dir}/classes/${module}"
194 destfile="${build.dir}/empty.jar"
200 bootclasspath="${build.dir}/empty.jar"
202 destdir="${build.dir}/classes/${module}"
203 includejavaruntime="false"
204 includeantruntime="false"
205 classpath="${module.cp}:${plugs}/jre/lib/rt-closed.jar"
207 <src refid="src.path"/>
209 <selector refid="${module}"/>
210 <not><filename name="**/*-template.java"/></not>
213 <copy todir="${build.dir}/classes/${module}">
214 <fileset dir="src/share/classes">
216 <selector refid="${module}"/>
218 <filename name="**/*.java"/>
225 basedir="${build.dir}/classes/${module}"
226 destfile="${build.dir}/${module}.jar"
231 <!-- clean everything -->
232 <target name="clean">
233 <delete dir="${build.dir}"/>