In order to make javabeans module independent on applet and yet allow Beans class to have a method which references AppletInitializer, I am creating new module: deprecated7. This one shall consist of all the garbage identified in JDK7 development which has so many dependencies that it does not fit anywhere else. Beans class is moved there and instead of it, there is new BeanFactory class with the same methods (expect the one with AppletInitializer parameter).
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="beans"/>
8 <antcall target="applet"/>
9 <antcall target="deprecated7"/>
11 <!-- basic parameters -->
13 <pathelement location="src/share/classes"/>
14 <pathelement location="src/windows/classes"/>
15 <pathelement location="src/solaris/classes"/>
17 <property name="build.dir" location="build/modularize"/>
19 <!-- this is the core of the separation - definition
20 of what classes belong into what compilation group.
22 <selector id="applet">
24 <filename name="java/beans/AppletInitializer*"/>
25 <filename name="java/applet/**"/>
26 <filename name="sun/applet/**"/>
27 <filename name="META-INF/services/sun.beans.AppletProxy"/>
33 <filename name="java/beans/**"/>
34 <filename name="sun/beans/**"/>
35 <filename name="com/sun/beans/**"/>
38 <selector refid="applet"/>
39 <selector refid="deprecated7"/>
44 <selector id="deprecated7">
46 <filename name="java/beans/Beans*"/>
52 <filename name="org/omg/**"/>
53 <filename name="com/sun/corba/**"/>
59 <selector refid="applet"/>
60 <selector refid="beans"/>
61 <selector refid="corba"/>
62 <selector refid="deprecated7"/>
66 <!-- individual compilation tasks -->
68 <target name="deprecated7">
69 <antcall target="-compile-one-module">
70 <param name="module" value="deprecated7"/>
71 <param name="depends" value="beans:applet"/>
74 <target name="applet">
75 <antcall target="-compile-one-module">
76 <param name="module" value="applet"/>
77 <param name="depends" value="beans"/>
81 <antcall target="-compile-one-module">
82 <param name="module" value="beans"/>
87 <!-- as I am currently unable to build JDK myself, I'll start
88 the modularization by extracting the base module from an existing
92 <property name="rt.jar" location="${java.home}/lib/rt.jar"/>
93 <fail message="Cannot find rt.jar, specify with -Drt.jar=...">
94 <condition><not><available file="${rt.jar}"/></not></condition>
97 <mkdir dir="${build.dir}/rt"/>
98 <unzip src="${rt.jar}" dest="${build.dir}/rt"/>
99 <jar file="${build.dir}/base.jar" compress="false">
100 <fileset dir="${build.dir}/rt">
101 <selector refid="base"/>
106 <!-- shared routine to compile one of the modules -->
107 <target name="-compile-one-module">
108 <mkdir dir="${build.dir}/classes/${module}"/>
109 <pathconvert pathsep=":" property="module.cp">
110 <path path="${depends}"/>
111 <mapper type="regexp" from=".*[/\\]([^/\\]*)" to="${build.dir}/\1.jar"/>
114 bootclasspath="${build.dir}/base.jar"
116 destdir="${build.dir}/classes/${module}"
117 classpath="${module.cp}"
118 includejavaruntime="false"
119 includeantruntime="false"
121 <src refid="src.path"/>
122 <selector refid="${module}"/>
124 <copy todir="${build.dir}/classes/${module}">
125 <fileset dir="src/share/classes">
127 <selector refid="${module}"/>
129 <filename name="**/*.java"/>
136 basedir="${build.dir}/classes/${module}"
137 destfile="${build.dir}/${module}.jar"
142 <!-- clean everything -->
143 <target name="clean">
144 <delete dir="${build.dir}"/>