You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2019/01/18 23:08:48 UTC

svn commit: r1851656 [2/28] - in /xmlbeans/trunk: ./ external/ lib/ resources/ resources/typeimpl/ resources/typeimpl/org/ resources/typeimpl/org/apache/ resources/typeimpl/org/apache/xmlbeans/ resources/typeimpl/org/apache/xmlbeans/impl/ resources/typ...

Modified: xmlbeans/trunk/build.xml
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/build.xml?rev=1851656&r1=1851655&r2=1851656&view=diff
==============================================================================
--- xmlbeans/trunk/build.xml (original)
+++ xmlbeans/trunk/build.xml Fri Jan 18 23:08:44 2019
@@ -13,1133 +13,527 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-<project name="Xbean" default="default" basedir=".">
+<project name="XMLBeans" default="process-resources" basedir="." xmlns:if="ant:if" xmlns:unless="ant:unless">
 
     <property name="build.compiler" value="javac1.6"/>
-    <property name="javac.source" value="1.6"/>
-    <property name="javac.target" value="1.6"/>
+    <property name="ant.build.javac.source" value="1.6"/>
+    <property name="ant.build.javac.target" value="1.6"/>
 
     <property name="version.base" value="3.0.3"/>
     <property name="version.rc" value=""/>
 
-    <!-- manifest entries -->
-    <property name="manifest.name" value="org/apache/xmlbeans/"/>
-    <property name="manifest.title" value="org.apache.xmlbeans"/>
-    <property name="manifest.vendor" value="Apache Software Foundation"/>
-    <property name="manifest.url" value="http://xmlbeans.apache.org/"/>
+    <property name="repository.m2" value="http://repo1.maven.org"/>
+    <property environment="ENV"/>
 
-    <property name="repository.m2" value="https://repo1.maven.org"/>
+    <property name="compile.lib" location="compile-lib"/>
 
     <!-- Apache RAT license check properties -->
     <property name="rat.reportdir" value="build/rat"/>
     <property name="rat.report" value="${rat.reportdir}/report.txt"/>
-    <property name="rat.jar" location="${rat.reportdir}/apache-rat-0.12.jar"/>
+    <property name="rat.jar" location="${compile.lib}/apache-rat-0.12.jar"/>
     <property name="rat.url" value="${repository.m2}/maven2/org/apache/rat/apache-rat/0.12/apache-rat-0.12.jar"/>
 
     <!-- api checks -->
-    <property name="forbidden.jar" location="build/forbiddenapis-2.5.jar"/>
+    <property name="forbidden.jar" location="${compile.lib}/forbiddenapis-2.5.jar"/>
     <property name="forbidden.url" value="${repository.m2}/maven2/de/thetaphi/forbiddenapis/2.5/forbiddenapis-2.5.jar"/>
 
+    <!-- dependencies -->
 
+    <!-- other saxon urls
+        http://voxel.dl.sourceforge.net/sourceforge/saxon/saxonb8-1.zip
+        http://easynews.dl.sourceforge.net/sourceforge/saxon/saxonb8-7-3j.zip
+        http://easynews.dl.sourceforge.net/sourceforge/saxon/saxonb8-8j.zip
+    -->
+    <property name="saxon.zip" location="${compile.lib}/saxonb9-0-0-4j.zip"/>
+    <property name="saxon.jar" location="${compile.lib}/saxon9.jar"/>
+    <property name="saxon-dom.jar" location="${compile.lib}/saxon9-dom.jar"/>
+    <property name="saxon.url" value="http://master.dl.sourceforge.net/project/saxon/OldFiles/9.0/9.0.0.4/saxonb9-0-0-4j.zip"/>
+
+    <property name="xcresolver.zip" location="${compile.lib}/xcresolver.zip"/>
+    <property name="xcresolver.jar" location="${compile.lib}/resolver.jar"/>
+    <property name="xcresolver.url" value="http://archive.apache.org/dist/xml/commons/binaries/xml-commons-resolver-1.1.zip"/>
+
+    <!-- test dependencies -->
+    <property name="junit.jar" location="${compile.lib}/junit-4.12.jar"/>
+    <property name="junit.url" value="${repository.m2}/maven2/junit/junit/4.12/junit-4.12.jar"/>
+    <property name="hamcrest.jar" location="${compile.lib}/hamcrest-core-1.3.jar"/>
+    <property name="hamcrest.url" value="${repository.m2}/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/>
+
+    <property name="xerces.jar" location="${compile.lib}/xercesImpl-2.11.0.jar"/>
+    <property name="xerces.url" value="${repository.m2}/maven2/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar"/>
+
+    <property name="xml-apis.jar" location="${compile.lib}/xml-apis-1.4.01.jar"/>
+    <property name="xml-apis.url" value="${repository.m2}/maven2/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar"/>
+
+    <path id="saxon">
+        <pathelement location="${saxon.jar}"/>
+        <pathelement location="${saxon-dom.jar}"/>
+    </path>
 
-    <target name="usage">
-        <echo message="The following ant targets are defined:"/>
-        <echo/>
-        <echo message="usage       - this help text"/>
-        <echo message="deploy      - builds our implementation jar (xbean.jar)"/>
-        <echo message="clean       - cleans out the xbeans directories"/>
-        <echo message="clean.jars  - cleans out any downloaded jars"/>
-        <echo message="docs        - builds the JavaDoc documentation in ./build/docs"/>
-        <echo message="xmlpublic.jar-builds xmlpublic.jar, containing just the public code"/>
-        <echo message="sources     - zips up the XmlBeans source code"/>
-        <echo/>
-        <echo message="testbuild   - builds, but does not run, the xbean drt"/>
-        <echo message="checkintest - runs the xbean tests"/>
-    </target>
+    <path id="xmlbeans-test">
+        <pathelement location="build/classes"/>
+        <pathelement location="build/generated-resources"/>
+        <dirset dir="resources" includes="*"/>
+        <path refid="saxon"/>
+        <pathelement location="${xcresolver.jar}"/>
+        <pathelement location="test/lib/w3c_domts.jar"/>
+        <pathelement location="${junit.jar}"/>
+        <pathelement location="${hamcrest.jar}"/>
+        <pathelement location="${xerces.jar}"/>
+        <pathelement location="${xml-apis.jar}"/>
+        <pathelement location="${ENV.JAVA_HOME}/lib/tools.jar"/>
+    </path>
+
+    <path id="sources">
+        <pathelement location="src/xmlinputstream"/>
+        <pathelement location="src/xmlpublic"/>
+        <pathelement location="src/common"/>
+        <pathelement location="src/typestore"/>
+        <pathelement location="src/saaj_api"/>
+        <pathelement location="src/store"/>
+        <pathelement location="src/xpath_xquery"/>
+        <!-- the next sources depend on the oldxbean.jar -->
+        <pathelement location="src/typeimpl"/>
+        <pathelement location="src/marshal"/>
+        <pathelement location="src/repackage"/>
+        <pathelement location="src/tools"/>
+        <pathelement location="src/toolschema"/>
+        <pathelement location="src/typestore"/>
+        <pathelement location="src/xmlcomp"/>
+        <pathelement location="src/xmlconfig"/>
+        <pathelement location="src/jamsupport"/>
+        <pathelement location="build/generated-sources"/>
+    </path>
 
-    <target name="java_version">
-        <echo message="${java.version}"/>
+
+    <target name="usage" description="Shows the projecthelp">
+        <java classname="org.apache.tools.ant.Main">
+            <arg value="-projecthelp" />
+        </java>
     </target>
 
-    <target name="clean">
+    <target name="clean" description="Cleans out the xbeans directories">
         <delete dir="build"/>
     </target>
 
-    <target name="clean.jars" description="Delete any downloaded jars and accompanying licenses">
+    <target name="-check-jars" description="Removes old dependencies and verifies downloaded ones">
+        <mkdir dir="${compile.lib}"/>
+        <!-- remove previous versions of third-party jars to prevent them from lingering around,
+            we often had hard-to-find build/CI-problems because of these! -->
         <delete>
-            <fileset dir="external/lib">
-                <include name="saxonb9-0-0-4j.zip"/>
+            <fileset dir="${compile.lib}">
                 <include name="saxonb8-8j.zip"/>
                 <include name="saxonb8-7-3j.zip"/>
                 <include name="saxonb8-6-1.zip"/>
                 <include name="saxonb8-2.zip"/>
                 <include name="saxonb8-1.zip"/>
-                <include name="saxon9.jar"/>
-                <include name="saxon9-dom.jar"/>
                 <include name="saxon8.jar"/>
                 <include name="saxon8-dom.jar"/>
-                <include name="xcresolver.zip"/>
             </fileset>
         </delete>
+        <condition property="jars.present">
+            <or>
+                <and>
+                    <available file="${saxon.jar}"/>
+                    <available file="${xcresolver.jar}"/>
+                    <available file="${junit.jar}"/>
+                    <available file="${hamcrest.jar}"/>
+                    <available file="${xerces.jar}"/>
+                    <available file="${xml-apis.jar}"/>
+                </and>
+                <isset property="disconnected"/>
+            </or>
+        </condition>
     </target>
 
-    <target name="deploy" depends="xbean"/>
-
-    <target name="sources" depends="dirs">
-        <zip destfile="build/ar/xbeansrc.zip"
-          basedir="."
-          excludes="build/**, test/perf/**, mytest/**"/>
-    </target>
-
-    <property environment="env"/>
-    <target name="saxon.find1" if="env.XMLBEANS_EXTERNALS">
-      <property name="saxon_jar" value="${env.XMLBEANS_EXTERNALS}/saxon9.jar"/>
-      <property name="saxon_dom_jar" value="${env.XMLBEANS_EXTERNALS}/saxon9-dom.jar"/>
-    </target>
-    <target name="saxon.find2">
-      <property name="saxon_jar" value="build/lib/saxon9.jar"/>
-      <property name="saxon_dom_jar" value="build/lib/saxon9-dom.jar"/>
-    </target>
-
-    <target name="check.saxon9.jar" depends="saxon.find1,saxon.find2">
-      <condition property="saxon9.jar.exists">
-        <or>
-          <available file="build/lib/saxon9.jar"/>
-          <available file="${env.XMLBEANS_EXTERNALS}/saxon9.jar"/>
-        </or>
-      </condition>
-    </target>
+    <macrodef name="downloadfile">
+        <attribute name="src"/>
+        <attribute name="dest"/>
+        <sequential>
+            <echo>src: @{src}</echo>
+            <echo>dest: @{dest}</echo>
+            <!--fail
+                message="Java version might be uncapable to download https URLs - see https://stackoverflow.com/questions/6851461/java-why-does-ssl-handshake-give-could-not-generate-dh-keypair-exception">
+                <condition>
+                    <and>
+                        <equals arg1="${ant.java.version}" arg2="1.6"/>
+                        <contains string="@{src}" substring="https"/>
+                    </and>
+                </condition>
+            </fail-->
+            <get src="@{src}" dest="@{dest}" skipexisting="true"/>
+        </sequential>
+    </macrodef>
 
-    <target name="saxon9.jar" depends="check.saxon9.jar, dirs"
-        unless="saxon9.jar.exists">
-        <!-- other saxon urls
-            http://voxel.dl.sourceforge.net/sourceforge/saxon/saxonb8-1.zip
-            http://easynews.dl.sourceforge.net/sourceforge/saxon/saxonb8-7-3j.zip
-            http://easynews.dl.sourceforge.net/sourceforge/saxon/saxonb8-8j.zip
-        -->
-        <get dest="external/lib/saxonb9-0-0-4j.zip"
-            src="http://master.dl.sourceforge.net/project/saxon/OldFiles/9.0/9.0.0.4/saxonb9-0-0-4j.zip"
-            verbose="true" usetimestamp="true" ignoreerrors="true"/>
-        <unzip src="external/lib/saxonb9-0-0-4j.zip" dest="external/lib/">
+    <target name="-fetch-jars" depends="-check-jars" unless="jars.present"
+            description="Fetches needed JAR files from the Internet">
+        <downloadfile dest="${saxon.zip}" src="${saxon.url}"/>
+        <unzip src="${saxon.zip}" dest="${compile.lib}">
             <patternset>
                 <include name="saxon9.jar"/>
                 <include name="saxon9-dom.jar"/>
             </patternset>
         </unzip>
-
-        <copy file="external/lib/saxon9.jar" tofile="build/lib/saxon9.jar"/>
-        <!-- saxon9-dom.jar is used to register DOMObjectModel -->
-        <copy file="external/lib/saxon9-dom.jar" tofile="build/lib/saxon9-dom.jar"/>
-    </target>
-
-    <!-- get resolver.jar -->
-    <target name="check.xcresolver.zip">
-        <condition property="xcresolver.zip.exists">
-            <available file="external/lib/xcresolver.zip"/>
-        </condition>
-    </target>
-
-    <target name="xcresolver.zip" depends="check.xcresolver.zip, dirs" unless="xcresolver.zip.exists">
-        <get dest="external/lib/xcresolver.zip"
-            src="http://archive.apache.org/dist/xml/commons/binaries/xml-commons-resolver-1.1.zip"
-            verbose="true" usetimestamp="true" ignoreerrors="true"/>
-    </target>
-
-    <target name="check.resolver.jar">
-        <condition property="resolver.jar.exists">
-            <available file="build/lib/resolver.jar"/>
-        </condition>
-    </target>
-
-    <target name="resolver.jar" depends="xcresolver.zip, check.resolver.jar" unless="resolver.jar.exists">
-        <unzip src="external/lib/xcresolver.zip" dest="external/lib/">
+        <downloadfile dest="${xcresolver.zip}" src="${xcresolver.url}"/>
+        <unzip src="${xcresolver.zip}" dest="${compile.lib}">
             <patternset>
                 <include name="*/resolver.jar"/>
             </patternset>
+            <mapper type="flatten"/>
         </unzip>
-        <copy file="external/lib/xml-commons-resolver-1.1/resolver.jar" tofile="build/lib/resolver.jar"/>
-        <delete dir="external/lib/xml-commons-resolver-1.1"/>
-    </target>
-
+        <downloadfile dest="${junit.jar}" src="${junit.url}"/>
+        <downloadfile dest="${hamcrest.jar}" src="${hamcrest.url}"/>
+        <downloadfile dest="${xerces.jar}" src="${xerces.url}"/>
+        <downloadfile dest="${xml-apis.jar}" src="${xml-apis.url}"/>
 
-    <target name="xbean" depends="xbean.jar,xmlpublic.jar">
-        <copy file="build/lib/xbean.jar" tofile="build/ar/xbean.jar"/>
     </target>
 
-    <target name="dirs">
-        <mkdir dir="build"/>
-        <mkdir dir="build/classes"/>
-        <mkdir dir="build/lib"/>
-        <mkdir dir="build/ar"/>
-        <mkdir dir="build/src"/>
-        <mkdir dir="build/private"/>
-        <mkdir dir="build/private/classes"/>
-        <mkdir dir="build/private/lib"/>
-        <mkdir dir="build/test/output"/>
-    </target>
+    <macrodef name="schemaComp">
+        <attribute name="schemaName"/>
+        <attribute name="src"/>
+        <attribute name="dest"/>
+        <attribute name="classpathref"/>
+        <sequential>
+            <local name="srcDir"/>
+            <local name="rscDir"/>
+            <local name="up2date"/>
+
+            <property name="srcDir" location="@{dest}/generated-sources"/>
+            <property name="rscDir" location="@{dest}/generated-resources"/>
+
+            <mkdir dir="${srcDir}"/>
+            <mkdir dir="${rscDir}"/>
+
+            <uptodate property="up2date" targetfile="${rscDir}/schemaorg_apache_xmlbeans/system/@{schemaName}/TypeSystemHolder.class">
+                <srcresources>
+                    <filelist dir="${basedir}" files="@{src}"/>
+                </srcresources>
+            </uptodate>
 
-    <target name="version">
-        <!-- svn must be on the path -->
-        <echo message="Trying to get revision number from Subversion..."/>
-        <exec executable="svn" output="build/private/svninfo.properties" failifexecutionfails="false">
-            <arg line="info ${basedir}"/>
-        </exec>
-        <replaceregexp file="build/private/svninfo.properties"
-            match="Last Changed Rev: (.*)"
-            replace="svn.last.rev=r\1"
-            byline="true"/>
-        <property file="build/private/svninfo.properties"/>
-
-        <!-- just in case svn info or regexp failed -->
-        <condition property="svn.last.rev" value="unknown">
-            <not><isset property="svn.last.rev"/></not>
-        </condition>
+            <java classname="org.apache.xmlbeans.impl.tool.SchemaCompiler" fork="true" failonerror="true" classpathref="@{classpathref}" unless:true="${up2date}">
+                <jvmarg value="-ea"/>
+                <arg line="-name @{schemaName} -srconly -noann -d ${rscDir} -src ${srcDir} @{src}"/>
+            </java>
+        </sequential>
+    </macrodef>
 
-        <property name="version.full" value="${version.base}-${svn.last.rev}"/>
-        <property name="manifest.comment" value="Apache XmlBeans version ${version.full}"/>
+    <macrodef name="schemaCompProd">
+        <attribute name="classpathref"/>
+        <attribute name="dest"/>
+        <sequential>
+            <schemaComp schemaName="sXMLLANG" src="src/xmlschema/schema" dest="@{dest}" classpathref="@{classpathref}" />
+            <schemaComp schemaName="sXMLSCHEMA" src="src/xsdschema/schema" dest="@{dest}" classpathref="@{classpathref}" />
+            <schemaComp schemaName="sXMLCONFIG" src="src/configschema/schema" dest="@{dest}" classpathref="@{classpathref}" />
+            <schemaComp schemaName="sXMLTOOLS" src="src/toolschema" dest="@{dest}" classpathref="@{classpathref}" />
+        </sequential>
+    </macrodef>
 
-        <echo message="${manifest.comment}"/>
-    </target>
 
+    <target name="process-resources" depends="-fetch-jars" description="Generate sources and resources based on schema files">
+        <mkdir dir="build/classes"/>
 
-    <target name="default" depends="deploy"/>
-    <target name="redeploy" depends="clean, deploy"/>
+        <copy todir="build/generated-sources/org/apache/xmlbeans/impl">
+            <zipfileset src="lib/jam-0.1.0-src.jar" includes="src/org/**"/>
+            <cutdirsmapper dirs="3"/>
+            <filterchain>
+                <replacestring from="org.codehaus.jam" to="org.apache.xmlbeans.impl.jam"/>
+            </filterchain>
+        </copy>
 
-    <!-- oldxbean.jar target =========================================== -->
+        <!-- Note that this is tricky because it bootstraps xmlbeans on itself. -->
+        <!-- The basic strategy is to rely on the oldxbeans.jar checked into lib -->
 
-    <target name="oldxbean.jar">
-        <copy file="external/lib/oldxbean.jar" tofile="build/private/lib/oldxbean.jar"/>
-    </target>
+        <path id="oldxbean">
+            <pathelement location="lib/oldxbean.jar"/>
+        </path>
 
-    <!-- bootstrap target ============================================== -->
+        <schemaCompProd classpathref="oldxbean" dest="build/bootstrap"/>
 
-    <target name="bootstrap" depends="xbean">
-        <subant target="bootstrappass" inheritAll="true" buildpath="." failonerror="false"/>
-        <subant target="bootstrappass" inheritAll="true" buildpath="." failonerror="true"/>
-    </target>
+        <javac destdir="build/classes" debug="on" includeantruntime="true">
+            <src refid="sources"/>
+            <src path="build/bootstrap/generated-sources"/>
+            <classpath>
+                <path refid="oldxbean"/>
+                <path refid="saxon"/>
+            </classpath>
+        </javac>
 
-    <target name="bootstrappass" depends="xbean">
-        <!-- after xbean.jar is built, move it out of the way and clean the project -->
-        <tempfile property="bootstrap.jarfile" prefix="oldxbean" suffix=".jar"/>
-        <move file="build/ar/xbean.jar" tofile="${bootstrap.jarfile}"/>
-        <antcall target="clean" inheritAll="false"/>
-
-        <!-- then move it back into place as oldxbean.jar and do another build -->
-        <move file="${bootstrap.jarfile}" tofile="build/private/lib/oldxbean.jar"/>
-        <antcall target="xbean" inheritAll="false"/>
-
-        <!-- compare the contents of the first jar to the contents of the second jar -->
-        <antcall target="zipcompare.classes" inheritAll="false"/>
-        <java classname="zipcompare.ZipCompare"
-            classpath="build/private/classes/zipcompare"
-            fork="true"
-            failonerror="true">
-            <arg line="build/ar/xbean.jar build/private/lib/oldxbean.jar"/>
-        </java>
+        <!-- now generate new xmlbeans re-/sources and remove the traces of the oldxbean generated re-/sources -->
+        <path id="oldschemas">
+            <pathelement location="build/classes"/>
+            <pathelement location="build/bootstrap/generated-resources"/>
+            <dirset dir="resources" includes="*"/>
+        </path>
 
-        <!-- when everything succeeds, check out oldxbean.jar from perforce -->
-        <echo message="==================================="/>
-        <echo message="Results match! Bootstrap succeeded."/>
-        <echo message="==================================="/>
-        <echo message="Attempting to copy oldxbean.jar"/>
-        <echo message="If the copy fails, you must check out oldxbean.jar"/>
-        <!-- copy oldxbean.jar whether or not perforce succeeded -->
-        <echo message="overwriting old external/lib/oldxbean.jar"/>
-        <copy file="build/private/lib/oldxbean.jar" tofile="external/lib/oldxbean.jar"/>
-    </target>
+        <schemaCompProd classpathref="oldschemas" dest="build"/>
 
-    <target name="quickbootstrap">
-        <echo message="=========================================================="/>
-        <echo message="Bootstrapping currently built xbean.jar without verifying."/>
-        <echo message="=========================================================="/>
-        <copy file="build/ar/xbean.jar" tofile="external/lib/oldxbean.jar"/>
+        <!-- delete old schema classes -->
+        <delete dir="build/classes/org/apache/xmlbeans/impl/xb"/>
     </target>
 
+    <target name="compile" depends="process-resources" description="Compile sources and resources">
+        <!-- delete old schema classes -->
+        <delete dir="build/classes/org/apache/xmlbeans/impl/xb"/>
+
+        <javac destdir="build/classes" debug="on" includeantruntime="true" classpathref="saxon">
+            <src refid="sources"/>
+        </javac>
+    </target>
 
-    <!-- zipcompare (for checking bootstrap) ============================ -->
+    <!-- Run this target before you open the project in an IDE. -->
+    <target name="process-test-resources" depends="compile"
+        description="Generate test sources and resources based on schema files.">
+        <mkdir dir="build/tmp"/>
+        <mkdir dir="build/test-classes"/>
+        <mkdir dir="build/test-results"/>
+
+        <!-- extensions currently deactivated - it generates duplicated methods -->
+        <!--
+        <pathconvert property="extensions-dir" pathsep=" ">
+            <path>
+                <dirset dir="test/src/xmlobject/extensions/" includes="interfaceFeature/*,prePostFeature/readOnlyBean"/>
+                <dirset dir="test/cases/xbean/extensions/" includes="interfaceFeature/*,prePostFeature/readOnlyBean"/>
+            </path>
+        </pathconvert>
+        <schemaComp schemaName="sEXTENSIONS" src="${extensions-dir}" dest="build/test-extensions" classpathref="xmlbeans-test"/>
+        <schemaComp schemaName="sEXTENSIONS2" src="test/cases/xbean/extensions/prePostFeature/ValueRestriction test/src/xmlobject/extensions/prePostFeature/ValueRestriction" dest="build/test-extensions" classpathref="xmlbeans-test"/>
+        -->
 
-    <target name="zipcompare.classes">
-        <mkdir dir="build/private/classes/zipcompare"/>
-        <javac srcdir="src/zipcompare"
-            source="${javac.source}" target="${javac.target}"
-            destdir="build/private/classes/zipcompare"
-            debug="on"
-            includeantruntime="false"/>
-    </target>
+        <untar src="test/cases/xbean/tranxml.tar.bz2" dest="build/test-tranxml/schemas" compression="bzip2" overwrite="false">
+            <patternset>
+                <include name="tranxml/Version4.0/schemas/StandAlone/CarLocationMessage_40_LX.xsd"/>
+            </patternset>
+            <mapper type="flatten"/>
+        </untar>
+        <schemaComp schemaName="sTRAN" src="build/test-tranxml/schemas" dest="build/test-tranxml" classpathref="xmlbeans-test"/>
+        <schemaComp schemaName="sTOOLS" src="test/tools/lib/xsl" dest="build/test-tools" classpathref="xmlbeans-test"/>
+        <schemaComp schemaName="sXMLCURSOR" src="test/cases/xbean/xmlcursor" dest="build/test-xmlcursor" classpathref="xmlbeans-test"/>
+        <schemaComp schemaName="sDOM" src="test/cases/xbean/dom" dest="build/test-dom" classpathref="xmlbeans-test"/>
+        <schemaComp schemaName="sSCOMP" src="test/cases/xbean/scomp" dest="build/test-scomp" classpathref="xmlbeans-test"/>
+        <schemaComp schemaName="sSIMPLE" src="test/cases/xbean/simple" dest="build/test-simple" classpathref="xmlbeans-test"/>
+        <schemaComp schemaName="sVALIDATE" src="test/cases/xbean/ValidatingStream" dest="build/test-validate" classpathref="xmlbeans-test"/>
+        <schemaComp schemaName="sUSERTYPE" src="test/cases/xbean/usertype" dest="build/test-usertype" classpathref="xmlbeans-test"/>
+        <schemaComp schemaName="sLAX" src="test/cases/xbean/compile/scomp/detailed" dest="build/test-lax" classpathref="xmlbeans-test"/>
+
+        <pathconvert property="xmlobjects" pathsep=" ">
+            <path>
+                <fileset dir="test/cases/xbean/xmlobject">
+                    <include name="CR192525.xsd"/>
+                    <include name="defaults.xsd"/>
+                    <include name="easypo.xsd*"/>
+                    <include name="enumtest.xsd*"/>
+                    <include name="inttest.xsd"/>
+                    <include name="listandunion.xsd"/>
+                    <include name="nameworld.xsd"/>
+                    <include name="numerals.xsd"/>
+                    <include name="redefine2.xsd"/>
+                    <include name="SelectAttribute.xsd"/>
+                    <include name="SelectChildren.xsd"/>
+                    <include name="selectChldAttTest.xsd"/>
+                    <include name="soap-envelope.xsd"/>
+                    <include name="soapfaults.xsd"/>
+                    <include name="substgroup.xsd"/>
+                    <include name="substgroup2.xsd"/>
+                    <include name="Test.xsd"/>
+                    <include name="Test36510.xsd"/>
+                    <include name="Test40907.xsd"/>
+                    <include name="version3.xsd"/>
+                </fileset>
+            </path>
+        </pathconvert>
+        <schemaComp schemaName="sXMLOBJECT" src="${xmlobjects}" dest="build/test-xmlobject" classpathref="xmlbeans-test"/>
+
+        <pathconvert property="miscs" pathsep=" ">
+            <path>
+                <fileset dir="test/cases/xbean/misc/jira">
+                    <include name="xmlbeans_33b.xsd"/>
+                    <include name="xmlbeans_46.xsd"/>
+                    <include name="xmlbeans_48.xsd"/>
+                    <include name="xmlbeans_64.xsd"/>
+                    <include name="xmlbeans_68.xsd"/>
+                    <include name="xmlbeans_71.xsd"/>
+                    <include name="xmlbeans_98.xsd"/>
+                    <include name="xmlbeans_99*.xsd"/>
+                    <include name="xmlbeans_105.xsd"/>
+                    <include name="xmlbeans_175.xsd"/>
+                    <include name="xmlbeans_177*.xsd"/>
+                    <include name="xmlbeans_208.xsd"/>
+                    <include name="xmlbeans_228.xsd"/>
+                    <include name="xmlbeans_307_maxallowedenum.xsd"/>
+                    <include name="xmlbeans_307_morethanallowedenum.xsd"/>
+                </fileset>
+                <pathelement location="test/cases/xbean/xmltokensource"/>
+            </path>
+        </pathconvert>
+        <schemaComp schemaName="sMISC" src="${miscs}" dest="build/test-misc" classpathref="xmlbeans-test"/>
+
+        <!-- don't include in normal test classpath -->
+        <schemaComp schemaName="sSYSCACHE" src="test/cases/xbean/misc/syscachetest1.xsd" dest="build/test-syscache/1" classpathref="xmlbeans-test"/>
+        <schemaComp schemaName="sSYSCACHE" src="test/cases/xbean/misc/syscachetest2.xsd" dest="build/test-syscache/2" classpathref="xmlbeans-test"/>
+    </target>
+
+
+
+    <target name="test-compile" depends="process-test-resources" description="Compile test sources and resources">
+        <javac destdir="build/test-classes" debug="on" includeantruntime="true" classpathref="xmlbeans-test">
+            <src path="test/src"/>
+            <src path="test/tools/src"/>
+            <src>
+                <dirset dir="build" includes="test-*/generated-sources"/>
+            </src>
+            <exclude name="**/extensions/**"/>
+            <exclude name="**/drt/**"/>
+        </javac>
+
+        <mkdir dir="build/test-syscache/1/classes"/>
+        <javac destdir="build/test-syscache/1/classes" debug="on" includeantruntime="true" classpathref="xmlbeans-test"
+               srcdir="build/test-syscache/1/generated-sources"/>
+        <mkdir dir="build/test-syscache/2/classes"/>
+        <javac destdir="build/test-syscache/2/classes" debug="on" includeantruntime="true" classpathref="xmlbeans-test"
+               srcdir="build/test-syscache/2/generated-sources"/>
+    </target>
+
+    <target name="test" depends="test-compile" description="Run the tests">
+        <junit printsummary="yes" showoutput="no" haltonerror="true" haltonfailure="true">
+            <classpath refid="xmlbeans-test"/>
+            <classpath>
+                <pathelement location="test/cases"/>
+                <pathelement location="build/test-classes"/>
+                <dirset dir="build" includes="test-*/generated-resources"/>
+            </classpath>
 
-    <!-- javadocs ====================================================== -->
+            <formatter type="plain"/>
+            <formatter type="xml"/>
 
-    <!-- All docs to build/docs, including guide and javadocs. -->
+            <jvmarg value="-ea"/>
+            <jvmarg value="-Xmx256m"/>
+            <jvmarg value="-Djava.io.tmpdir=${basedir}/build/tmp"/>
 
-    <target name="docs" depends="xbean">
-        <property name="docs.dir" value="build/docs"/>
-        <delete dir="${docs.dir}"/>
-        <mkdir dir="${docs.dir}"/>
-        <javadoc packagenames="*" sourcepath="src/xmlpublic"
-            classpath="${javadoc.path}" destdir="${docs.dir}/reference"
-            windowtitle="XMLBeans ${version.base} Documentation" source="${javac.source}" stylesheetfile="docs/stylesheet.css">
+            <!-- For tests that need to access case files directly -->
+            <sysproperty key="cases.location" path="${basedir}/test/cases"/>
+            <sysproperty key="xbean.rootdir" path="${basedir}"/>
+
+            <batchtest fork="yes" todir="build/test-results">
+                <fileset dir="test/src">
+                    <include name="**/*Tests.java"/>
+                    <include name="**/*Test.java"/>
+                    <exclude name="**/extensions/**"/>
+                    <exclude name="**/drt/**"/>
+                </fileset>
+            </batchtest>
+        </junit>
+    </target>
+
+    <target name="javadocs" description="Build the javadocs.">
+        <property name="javadocs.dir" value="build/javadocs"/>
+        <delete dir="${javadocs.dir}"/>
+        <mkdir dir="${javadocs.dir}"/>
+
+        <javadoc sourcepathref="sources"
+                 destdir="${javadocs.dir}"
+                 windowtitle="XMLBeans ${version.base} Documentation">
+            <classpath>
+                <path refid="xmlbeans-test"/>
+                <pathelement location="${ENV.ANT_HOME}/lib/ant.jar"/>
+            </classpath>
+            <excludepackage name="repackage.*"/>
+            <excludepackage name="org.apache.xmlbeans.impl.xb.*"/>
+            <excludepackage name="org.apache.xmlbeans.impl.jam.*"/>
             <link href="http://xmlbeans.apache.org/${version.base}/docs/reference/index.html"/>
-            <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
-            <link href="http://java.sun.com/j2ee/1.4/docs/api/"/>
+            <link href="http://docs.oracle.com/javase/6/docs/api/"/>
+            <link href="http://docs.oracle.com/javaee/6/api/"/>
             <link href="http://xml.apache.org/xerces-j/apiDocs/"/>
-            <classpath>
-                <pathelement location="build/ar/xbean.jar"/>
-            </classpath>
+            <link href="http://ant.apache.org/manual-1.9.x/api/"/>
         </javadoc>
-        <copy file="docs/xmlbeans.css" tofile="${docs.dir}/xmlbeans.css"/>
-        <copy todir="${docs.dir}/guide">
-            <fileset dir="docs/guide"/>
-        </copy>
-        <copy todir="${docs.dir}/images">
-            <fileset dir="docs/images"/>
-        </copy>
-        <delete file="build/private/xmlbeans-${version.base}${version.rc}-javadoc.jar"/>
-        <jar jarfile="build/private/xmlbeans-${version.base}${version.rc}-javadoc.jar" index="false">
-            <fileset dir="${docs.dir}/reference"/>
-            <fileset file="LICENSE.txt"/>
-            <fileset file="NOTICE.txt"/>
-            <manifest>
-                <section name="${manifest.name}">
-                    <attribute name="Comment" value="${manifest.comment}"/>
-                    <attribute name="Implementation-Title" value="${manifest.title}"/>
-                    <attribute name="Implementation-Version" value="${version.full}"/>
-                    <attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
-                    <attribute name="Implementation-URL" value="${manifest.url}"/>
-                </section>
-            </manifest>
-        </jar>
     </target>
 
-
-    <target name="dist" depends="dist-src, dist-bin">
-    </target>
-
-    <target name="dist-bin" depends="xbean, docs">
-        <delete dir="build/private/xmlbeans-${version.base}"/>
-        <delete file="build/private/xmlbeans-${version.base}${version.rc}.zip"/>
-        <delete file="build/private/xmlbeans-${version.base}${version.rc}.tgz"/>
-
-        <mkdir dir="build/private/xmlbeans-${version.base}"/>
-        <copy todir="build/private/xmlbeans-${version.base}">
-            <fileset dir="xkit"/>
-            <fileset dir="." includes="bin/**"/>
-            <fileset file="LICENSE.txt"/>
-            <fileset file="NOTICE.txt"/>
-        </copy>
-        <copy todir="build/private/xmlbeans-${version.base}/schemas/s4s">
-            <fileset dir="src/xsdschema/schema" includes="XMLSchema.xsd"/>
-            <fileset dir="src/xmlschema/schema" includes="XML.xsd"/>
-        </copy>
-        <copy todir="build/private/xmlbeans-${version.base}/schemas">
-            <fileset dir="test/cases/xbean/xmlobject"
-                includes="easypo.xsd,easypo.xsdconfig,numerals.xsd,nameworld.xsd"/>
-        </copy>
-
-        <mkdir dir="build/private/xmlbeans-${version.base}/lib"/>
-        <copy todir="build/private/xmlbeans-${version.base}/lib">
-            <fileset dir="build/lib">
-                <include name="xbean.jar"/>
-                <include name="xmlpublic.jar"/>
-                <include name="xbean_xpath.jar"/>
-                <include name="resolver.jar"/>
-            </fileset>
-        </copy>
-
-        <mkdir dir="build/private/xmlbeans-${version.base}/docs"/>
-        <copy todir="build/private/xmlbeans-${version.base}/docs">
-            <fileset dir="build/docs"/>
-        </copy>
-
-        <mkdir dir="build/private/xmlbeans-${version.base}/samples"/>
-        <copy todir="build/private/xmlbeans-${version.base}/samples">
-            <fileset dir="samples">
-                <include name="MixedContent/**/*"/>
-                <include name="OrderMatters/**/*"/>
-                <include name="Any/**/*"/>
-                <include name="XQueryXPath/**/*"/>
-                <include name="DateTime/**/*"/>
-                <include name="SchemaEnum/**/*"/>
-                <include name="Validation/**/*"/>
-                <include name="XsdConfig/**/*"/>
-                <exclude name="**/build/**"/>
-            </fileset>
-        </copy>
-
-        <zip destfile="build/private/xmlbeans-${version.base}${version.rc}.zip"
-            basedir="build/private"
-            includes="xmlbeans-${version.base}/**"/>
-        <tar destfile="build/private/xmlbeans-${version.base}${version.rc}.tgz"
-            basedir="build/private"
-            includes="xmlbeans-${version.base}/**"
-            excludes="xmlbeans-${version.base}/bin/*"
-            compression="gzip">
-            <tarfileset dir="build/private">
-                <include name="xmlbeans-${version.base}/bin/*.cmd"/>
-            </tarfileset>
-            <tarfileset dir="build/private" mode="754">
-                <include name="xmlbeans-${version.base}/bin/*"/>
-                <exclude name="xmlbeans-${version.base}/bin/*.cmd"/>
-            </tarfileset>
-        </tar>
-    </target>
-
-    <target name="dist-src" depends="clean, dirs, version">
-        <delete file="build/private/xmlbeans-${version.base}${version.rc}-src.zip"/>
-        <delete file="build/private/xmlbeans-${version.base}${version.rc}-src.tgz"/>
-        <delete file="build/private/xmlbeans-${version.base}${version.rc}-sources.jar"/>
-
-        <zip destfile="build/private/xmlbeans-${version.base}${version.rc}-src.zip">
-            <zipfileset dir="." prefix="xmlbeans-${version.base}">
-                <patternset id="src.dist.content.dirs"
-                    includes="docs/** external/** samples/** src/**"/>
-                <patternset id="src.dist.content.dirs.bin"
-                    includes="bin/**"/>
-                <patternset id="src.dist.content.files"
-                    includes="build.xml README.txt xbeanenv.cmd xbeanenv.sh LICENSE.txt NOTICE.txt"/>
-                <patternset id="src.dist.content.tests"
-                    includes=""/><!-- don't have tests part of the distribution yet -->
-            </zipfileset>
-        </zip>
-        <tar destfile="build/private/xmlbeans-${version.base}${version.rc}-src.tgz"
-            compression="gzip">
-            <tarfileset dir="." prefix="xmlbeans-${version.base}">
-                <patternset refid="src.dist.content.dirs"/>
-                <patternset refid="src.dist.content.files"/>
-                <patternset refid="src.dist.content.tests"/>
-                <patternset includes="bin/*.cmd"/>
-            </tarfileset>
-            <tarfileset dir="." prefix="xmlbeans-${version.base}" mode="754">
-                <include name="bin/*"/>
-                <exclude name="bin/*.cmd"/>
-            </tarfileset>
-        </tar>
-        <jar jarfile="build/private/xmlbeans-${version.base}${version.rc}-sources.jar" index="false">
-            <fileset dir="src/common" includes="**/*.java"/>
-            <fileset dir="src/configschema" includes="**/*.java"/>
-            <fileset dir="src/jamsupport" includes="**/*.java"/>
-            <fileset dir="src/marshal" includes="**/*.java"/>
-            <fileset dir="src/repackage" includes="**/*.java"/>
-            <fileset dir="src/saaj_api" includes="**/*.java"/>
-            <fileset dir="src/store" includes="**/*.java"/>
-            <fileset dir="src/tools" includes="**/*.java"/>
-            <fileset dir="src/toolschema" includes="**/*.java"/>
-            <fileset dir="src/typeholder" includes="**/*.java"/>
-            <fileset dir="src/typeimpl" includes="**/*.java"/>
-            <fileset dir="src/typestore" includes="**/*.java"/>
-            <fileset dir="src/xmlcomp" includes="**/*.java"/>
-            <fileset dir="src/xmlconfig" includes="**/*.java"/>
-            <fileset dir="src/xmlinputstream" includes="**/*.java"/>
-            <fileset dir="src/xmlpublic" includes="**/*.java"/>
-            <fileset dir="src/xmlschema" includes="**/*.java"/>
-            <fileset dir="src/xpath" includes="**/*.java"/>
-            <fileset dir="src/xpath_xquery" includes="**/*.java"/>
-            <fileset dir="src/xsdschema" includes="**/*.java"/>
-            <fileset dir="src/zipcompare" includes="**/*.java"/>
-            <fileset dir="maven-plugin/src/java" includes="**/*.java"/>
+    <target name="package" depends="compile,javadocs" description="Builds our jars in the build directory">
+        <jar jarfile="build/xmlbeans-${version.base}.jar" update="false" index="true">
+            <fileset dir="build/classes"/>
+            <fileset dir="." includes="LICENSE.txt,NOTICE.txt"/>
+            <fileset dir="build/generated-resources"/>
+            <mappedresources>
+                <fileset dir="resources"/>
+                <cutdirsmapper dirs="1"/>
+            </mappedresources>
             <manifest>
-                <section name="${manifest.name}">
-                    <attribute name="Comment" value="${manifest.comment}"/>
-                    <attribute name="Implementation-Title" value="${manifest.title}"/>
-                    <attribute name="Implementation-Version" value="${version.full}"/>
-                    <attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
-                    <attribute name="Implementation-URL" value="${manifest.url}"/>
+                <section name="org/apache/xmlbeans/">
+                    <attribute name="Comment" value="Apache XmlBeans version ${version.base}"/>
+                    <attribute name="Implementation-Title" value="org.apache.xmlbeans"/>
+                    <attribute name="Implementation-Version" value="${version.base}"/>
+                    <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
+                    <attribute name="Implementation-URL" value="http://xmlbeans.apache.org/"/>
                 </section>
-            </manifest>	    
-        </jar>
-    </target>
-
-    <target name="enum-support.jar"
-        depends="dirs, xmlpublic.classes, typeimpl.classes">
-        <jar jarfile="build/lib/enum-support.jar" index="false">
-            <fileset dir="build/classes/typeimpl/">
-                <include name="org/apache/xmlbeans/impl/values/XmlListImpl.class"/>
-                <include name="org/apache/xmlbeans/impl/values/XmlObjectBase.class"/>
-                <include name="org/apache/xmlbeans/impl/util/XsTypeConverter.class"/>
-            </fileset>
-            <fileset dir="build/classes/xmlpublic/">
-                <include name="org/apache/xmlbeans/XmlCalendar.class"/>
-            </fileset>
+            </manifest>
         </jar>
-    </target>
-
-    <!-- previously in xbean.xml -->
 
-    <target name="xbean.jar"
-        depends="dirs, version, xmlpublic.classes,
-                 typeholder.template, typestore.classes, common.classes,
-                 typeimpl.classes, xmlcomp.classes,
-                 store.classes, saaj_api.classes,
-                 marshal.classes, xpath.classes, oldxbean.jar, xsdschema.classes,
-                 xmlinputstream.classes, resolver.jar, xbean_xpath.jar,
-                 tools.classes, jamsupport.classes">
-        <jar jarfile="build/lib/xbean.jar" index="true" duplicate="preserve">
-            <fileset dir="build/classes/xmlpublic"
-                excludes="javax/**"/>
-            <fileset dir="build/classes/typeholder"/>
-            <fileset dir="build/classes/typestore"/>
-            <fileset dir="build/classes/common"/>
-            <fileset dir="build/classes/typeimpl"/>
-            <fileset dir="build/classes/xmlcomp"/>
-            <fileset dir="build/classes/configschema"/>
-            <fileset dir="build/classes/toolschema"/>
-            <fileset dir="build/classes/xsdschema"/>
-            <fileset dir="build/classes/xmlschema"/>
-            <fileset dir="build/classes/store"/>
-            <fileset dir="build/classes/saaj_api"/>
-            <fileset dir="build/classes/xmlinputstream"/>
-            <fileset dir="build/classes/marshal"/>
-            <fileset dir="build/classes/repackage"/>
-            <fileset dir="build/classes/jam"/>
-            <fileset dir="build/classes/tools"/>
-            <fileset file="LICENSE.txt"/>
-            <fileset file="NOTICE.txt"/>
+        <jar jarfile="build/xmlbeans-${version.base}-javadoc.jar" update="false" index="false">
+            <fileset dir="." includes="LICENSE.txt,NOTICE.txt,docs/**"/>
+            <fileset dir="build/javadocs"/>
             <manifest>
-                <section name="${manifest.name}">
-                    <attribute name="Comment" value="${manifest.comment}"/>
-                    <attribute name="Implementation-Title" value="${manifest.title}"/>
-                    <attribute name="Implementation-Version" value="${version.full}"/>
-                    <attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
-                    <attribute name="Implementation-URL" value="${manifest.url}"/>
+                <section name="org/apache/xmlbeans/">
+                    <attribute name="Comment" value="Apache XmlBeans version ${version.base} - Javadocs"/>
+                    <attribute name="Implementation-Title" value="org.apache.xmlbeans"/>
+                    <attribute name="Implementation-Version" value="${version.base}"/>
+                    <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
+                    <attribute name="Implementation-URL" value="http://xmlbeans.apache.org/"/>
                 </section>
             </manifest>
         </jar>
-    </target>
-
-    <!-- build XMLInputStream interface ============================================= -->
-
-    <target name="xmlinputstream.classes" depends="dirs">
-        <mkdir dir="build/classes/xmlinputstream"/>
-        <javac srcdir="src/xmlinputstream"
-            source="${javac.source}" target="${javac.target}"
-            destdir="build/classes/xmlinputstream"
-            debug="on"
-            includeantruntime="false">
-            <classpath>
-                <pathelement location="build/classes/common"/>
-            </classpath>
-        </javac>
-    </target>
-
-    <!-- xmlpublic target ============================================== -->
 
-    <target name="xmlpublic.classes" depends="dirs">
-        <mkdir dir="build/classes/xmlpublic"/>
-        <javac srcdir="src/xmlpublic" sourcepath="src/xmlinputstream" destdir="build/classes/xmlpublic"
-               source="${javac.source}" target="${javac.target}" debug="on" includeantruntime="false">
-            <classpath/>
-        </javac>
+        <jar jarfile="build/xmlbeans-${version.base}-sources.jar" update="false" index="false">
+            <fileset dir="." includes="LICENSE.txt,NOTICE.txt"/>
+            <mappedresources>
+                <fileset dir="src" excludes="toolschema/**,shell/**"/>
+                <cutdirsmapper dirs="1"/>
+            </mappedresources>
+            <zipfileset dir="src/toolschema" prefix="schema"/>
+            <mappedresources>
+                <fileset dir="build" includes="generated-sources/**,generated-resources/**"/>
+                <cutdirsmapper dirs="1"/>
+            </mappedresources>
 
-        <!-- Need properties files for XmlError -->
-        <copy
-            todir="build/classes/xmlpublic">
-            <fileset dir="src/xmlpublic">
-                <include name="**/*.properties"/>
-            </fileset>
-        </copy>
-    </target>
-
-    <target name="xmlpublic.jar" depends="dirs,xmlinputstream.classes, xmlpublic.classes, xmlschema.classes, xsdschema.classes">
-        <jar jarfile="build/lib/xmlpublic.jar" index="true">
-            <fileset dir="build/classes/xmlpublic"
-                excludes="javax/**"/>
-            <fileset dir="build/classes/xmlschema"/>
-            <fileset dir="build/classes/xsdschema"/>
             <manifest>
-                <section name="${manifest.name}">
-                    <attribute name="Comment" value="${manifest.comment}"/>
-                    <attribute name="Implementation-Title" value="${manifest.title}"/>
-                    <attribute name="Implementation-Version" value="${version.full}"/>
-                    <attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
-                    <attribute name="Implementation-URL" value="${manifest.url}"/>
+                <section name="org/apache/xmlbeans/">
+                    <attribute name="Comment" value="Apache XmlBeans version ${version.base} - Sources"/>
+                    <attribute name="Implementation-Title" value="org.apache.xmlbeans"/>
+                    <attribute name="Implementation-Version" value="${version.base}"/>
+                    <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
+                    <attribute name="Implementation-URL" value="http://xmlbeans.apache.org/"/>
                 </section>
             </manifest>
         </jar>
-    </target>
-
-    <!-- typestore target ============================================== -->
-
-    <target name="typestore.classes" depends="dirs, xmlpublic.classes, common.classes, xmlinputstream.classes">
-        <mkdir dir="build/classes/typestore"/>
-        <javac srcdir="src/typestore" destdir="build/classes/typestore" source="${javac.source}" target="${javac.target}"
-               debug="on" includeantruntime="false">
-            <classpath>
-                <pathelement location="build/classes/xmlinputstream"/>
-                <pathelement location="build/classes/xmlpublic"/>
-                <pathelement location="build/classes/common"/>
-            </classpath>
-        </javac>
-
-    </target>
-
-    <!-- common target ============================================= -->
-
-    <target name="common.classes" depends="dirs, xmlpublic.classes, xmlinputstream.classes">
-        <mkdir dir="build/classes/common"/>
-        <javac srcdir="src/common" destdir="build/classes/common" source="${javac.source}" target="${javac.target}"
-               debug="on" includeantruntime="false">
-            <classpath>
-                <pathelement location="build/classes/xmlinputstream"/>
-                <pathelement location="build/classes/xmlpublic"/>
-            </classpath>
-        </javac>
-
-    </target>
-
-    <!-- typeholder target ================================================ -->
-
-    <property name="typeholder.name" value="org/apache/xmlbeans/impl/schema/TypeSystemHolder"/>
-
-    <target name="typeholder.check">
-        <condition property="typeholder.notRequired">
-            <uptodate property="typeholder.notRequired"
-                targetfile="build/classes/typeholder/${typeholder.name}.template">
-                <srcfiles dir="src/typeholder" includes="${typeholder.name}.java"/>
-            </uptodate>
-        </condition>
-    </target>
-
-    <target name="typeholder.template" depends="typeholder.check, xmlpublic.classes" unless="typeholder.notRequired">
-        <mkdir dir="build/classes/typeholder"/>
-        <javac destdir="build/classes/typeholder" source="${javac.source}" target="${javac.target}"
-               debug="off" includeantruntime="false">
-            <classpath>
-                <pathelement location="build/classes/xmlpublic"/>
-            </classpath>
-            <src location="src/typeholder"/>
-        </javac>
-        <move
-            file="build/classes/typeholder/${typeholder.name}.class"
-            tofile="build/classes/typeholder/${typeholder.name}.template"/>
-    </target>
-
-    <!-- typeimpl target ============================================== -->
-
-    <target name="typeimpl.classes" depends="dirs, store.classes,
-        repackage.classes, xmlpublic.classes, typeholder.template, typestore.classes, xsdschema.classes,
-        configschema.classes, toolschema.classes, jam.classes">
-        <mkdir dir="build/classes/typeimpl"/>
-        <javac destdir="build/classes/typeimpl" source="${javac.source}" target="${javac.target}"
-               debug="on" includeantruntime="false">
-            <classpath>
-                <pathelement location="build/classes/store"/>
-                <pathelement location="build/classes/xmlinputstream"/>
-                <pathelement location="build/classes/common"/>
-                <pathelement location="build/classes/repackage"/>
-                <pathelement location="build/classes/typestore"/>
-                <pathelement location="build/classes/xmlpublic"/>
-                <pathelement location="build/classes/xmlconfig"/>
-                <pathelement location="build/classes/configschema"/>
-                <pathelement location="build/classes/xsdschema"/>
-                <pathelement location="build/classes/xmlschema"/>
-                <pathelement location="build/classes/toolschema"/>
-                <pathelement location="build/classes/jam"/>
-            </classpath>
-
-            <src path="src/typeimpl"/>
-            <src path="build/src/xmlschema"/>
-            <src path="build/src/xsdschema"/>
-            <src path="build/src/configschema"/>
-            <src path="build/src/toolschema"/>
-            <src path="src/xmlconfig"/>
-        </javac>
-
-        <!-- Need properties files for regex -->
-        <copy
-            todir="build/classes/typeimpl">
-            <fileset dir="src/typeimpl">
-                <exclude name="**/*.java"/>
-            </fileset>
-        </copy>
-    </target>
-
-    <!-- xmlcomp target =============================================== -->
-
-    <target name="xmlcomp.classes" depends="dirs, repackage.classes, typeimpl.classes, xmlpublic.classes, typestore.classes">
-        <mkdir dir="build/classes/xmlcomp"/>
-        <javac srcdir="src/xmlcomp" destdir="build/classes/xmlcomp" source="${javac.source}" target="${javac.target}"
-               debug="on" includeantruntime="true">
-            <classpath>
-                <pathelement location="build/classes/xmlinputstream"/>
-                <pathelement location="build/classes/xmlpublic"/>
-                <pathelement location="build/classes/common"/>
-                <pathelement location="build/classes/repackage"/>
-                <pathelement location="build/classes/typeimpl"/>
-                <pathelement location="build/classes/xmlconfig"/>
-                <pathelement location="build/classes/configschema"/>
-                <pathelement location="build/classes/toolschema"/>
-                <pathelement location="build/classes/xsdschema"/>
-                <pathelement location="build/classes/typestore"/>
-            </classpath>
-        </javac>
-    </target>
-
-    <!-- marshal target =============================================== -->
-
-    <target name="marshal.classes" depends="dirs, typeimpl.classes, xmlpublic.classes">
-        <mkdir dir="build/classes/marshal"/>
-        <javac srcdir="src/marshal" destdir="build/classes/marshal" source="${javac.source}" target="${javac.target}"
-                debug="on" includeantruntime="false">
-            <classpath>
-                <pathelement location="build/classes/configschema"/>
-                <pathelement location="build/classes/xmlinputstream"/>
-                <pathelement location="build/classes/xmlpublic"/>
-                <pathelement location="build/classes/common"/>
-                <pathelement location="build/classes/typeimpl"/>
-                <pathelement location="build/classes/store"/>
-            </classpath>
-        </javac>
-    </target>
-
-
-    <!-- support for running JAM under JDK1.5 ========================= -->
-
-    <target name="jamsupport.classes" depends="dirs,jam.classes">
-        <javac srcdir="src/jamsupport" destdir="build/classes/jam" source="${javac.source}" target="${javac.target}"
-               debug="on" includeantruntime="true">
-            <classpath id="jamsupport.compile.path">
-                <pathelement location="build/classes/jam"/>
-            </classpath>
-        </javac>
-    </target>
-
-    <!-- saaj_api target ============================================== -->
-
-    <target name="saaj_api.classes" depends="dirs">
-        <mkdir dir="build/classes/saaj_api"/>
-        <javac srcdir="src/saaj_api" destdir="build/classes/saaj_api" source="${javac.source}" target="${javac.target}"
-               debug="on" includeantruntime="false">
-            <classpath id="saaj_api.compile.path">
-                <pathelement location="build/classes/common"/>
-                <pathelement location="build/classes/xmlpublic"/>
-            </classpath>
-        </javac>
-    </target>
-
-    <!-- store target ============================================== -->
-
-    <target name="store.classes"
-        depends="dirs, common.classes, xmlpublic.classes, typestore.classes, saaj_api.classes">
-        <mkdir dir="build/classes/store"/>
-        <javac srcdir="src/store" destdir="build/classes/store" source="${javac.source}" target="${javac.target}"
-               debug="on" includeantruntime="false">
-            <classpath id="store.compile.path">
-                <pathelement location="build/classes/typestore"/>
-                <pathelement location="build/classes/xmlinputstream"/>
-                <pathelement location="build/classes/xmlpublic"/>
-                <pathelement location="build/classes/common"/>
-                <pathelement location="build/classes/saaj_api"/>
-            </classpath>
-        </javac>
-    </target>
-
-    <!-- tools target ============================================== -->
-
-    <target name="tools.classes"
-        depends="dirs, common.classes, xmlpublic.classes, typestore.classes, saaj_api.classes,
-        typeimpl.classes, xmlcomp.classes">
-        <mkdir dir="build/classes/tools"/>
-        <javac srcdir="src/tools" destdir="build/classes/tools" source="${javac.source}" target="${javac.target}"
-               debug="on" includeantruntime="false">
-            <classpath id="tools.compile.path">
-                <pathelement location="build/classes/typestore"/>
-                <pathelement location="build/classes/xmlinputstream"/>
-                <pathelement location="build/classes/xmlpublic"/>
-                <pathelement location="build/classes/common"/>
-                <pathelement location="build/classes/saaj_api"/>
-                <pathelement location="build/classes/typeimpl"/>
-                <pathelement location="build/classes/xmlcomp"/>
-            </classpath>
-        </javac>
-    </target>
-
-    <!-- bootstrap schema target support ================================ -->
-
-
-    <!-- xsdschema target =============================================== -->
-
-    <!-- Note that this is a tricky target because it bootstraps xbeans on itself. -->
-    <!-- The basic strategy is to rely on the oldxbeans.jar checked into external/lib -->
-
-    <path id="bootstrap.run.path">
-        <pathelement location="build/private/lib/oldxbean.jar"/>
-        <pathelement location="build/classes/xmlpublic"/>
-    </path>
-
-    <path id="bootstrap.compile.path">
-        <pathelement location="build/classes/xmlpublic"/>
-    </path>
-
-    <property name="bootstrap.compile.path" refid="bootstrap.compile.path"/>
-
-    <path id="xsdschema.compile.path">
-        <pathelement location="build/classes/xmlschema"/>
-        <pathelement location="build/classes/xmlpublic"/>
-    </path>
-
-    <property name="xsdschema.compile.path" refid="xsdschema.compile.path"/>
-
-    <target name="xsdschema.check">
-        <condition property="xsdschema.notRequired">
-            <uptodate property="xsdschema.notRequired" targetfile="build/classes/xsdschema">
-                <srcfiles dir="src/xsdschema" includes="**/*.xsd*"/>
-            </uptodate>
-        </condition>
-    </target>
-
-    <target name="xsdschema.classes" depends="xsdschema.check, xmlschema.classes, xmlpublic.classes, oldxbean.jar" unless="xsdschema.notRequired">
-        <delete dir="build/classes/xsdschema"/>
-        <delete dir="build/src/xsdschema"/>
-        <java classname="${bootstrap_schema_compiler}" classpathref="bootstrap.run.path" fork="true" failonerror="true">
-            <jvmarg value="-ea"/>
-            <arg line="${repackage_arg} -name sXMLSCHEMA  -srconly -d build/classes/xsdschema -noann -src build/src/xsdschema src/xsdschema/schema"/>
-        </java>
-    </target>
-
-    <!-- xmlschema target ============================================= -->
-
-    <!-- Note that this is a tricky target because it bootstraps xbeans on itself. -->
-    <!-- The basic strategy is to rely on the oldxbeans.jar checked into external/lib -->
-
-    <!-- This doesn't really work anymore, because the "schema" part now needs the package name and the
-         ant "replace" mechanism is too difficult to use to be worth it -->
-    <target name="xmlschema.check">
-        <condition property="xmlschema.notRequired">
-            <uptodate property="xmlschema.notRequired" targetfile="build/classes/xmlschema">
-                <srcfiles dir="src/xmlschema" includes="**/*.xsd*"/>
-            </uptodate>
-        </condition>
-    </target>
-
-    <target name="xmlschema.classes" depends="xmlschema.check, xmlpublic.classes, oldxbean.jar" unless="xmlschema.notRequired">
-        <delete dir="build/classes/xmlschema"/>
-        <delete dir="build/src/xmlschema"/>
-        <java classname="${bootstrap_schema_compiler}" classpathref="bootstrap.run.path" fork="true" failonerror="true">
-            <jvmarg value="-ea"/>
-            <arg line="${repackage_arg} -name sXMLLANG -noann -d build/classes/xmlschema -src build/src/xmlschema -srconly src/xmlschema/schema"/>
-        </java>
-    </target>
-
-    <!-- xmlconfig target =============================================== -->
-
-    <target name="xmlconfig.classes" depends="dirs, xmlpublic.classes, configschema.classes">
-        <mkdir dir="build/classes/xmlconfig"/>
-        <javac srcdir="src/xmlconfig" destdir="build/classes/xmlconfig" source="${javac.source}" target="${javac.target}"
-               debug="on" includeantruntime="false">
-            <classpath>
-                <pathelement location="build/classes/xmlpublic"/>
-                <pathelement location="build/classes/configschema"/>
-            </classpath>
-        </javac>
-    </target>
-
-    <!-- configschema target ============================================= -->
-
-    <!-- Note that this is a tricky target because it bootstraps xbeans on itself. -->
-    <!-- The basic strategy is to rely on the oldxbeans.jar checked into external/lib -->
-
-    <property name="bootstrap.compile.path" refid="bootstrap.compile.path"/>
-
-    <target name="configschema.check">
-        <uptodate property="configschema.notRequired" targetfile="build/classes/configschema">
-            <srcfiles dir="src/configschema" includes="**/*.xsd"/>
-        </uptodate>
-    </target>
-
-    <target name="configschema.classes" depends="configschema.check, xmlpublic.classes, oldxbean.jar" unless="configschema.notRequired">
-        <delete dir="build/classes/configschema"/>
-        <java classname="${bootstrap_schema_compiler}" classpathref="bootstrap.run.path" fork="true" failonerror="true">
-            <jvmarg value="-ea"/>
-            <arg line="${repackage_arg} -name sXMLCONFIG -srconly -noann -src build/src/configschema -d build/classes/configschema src/configschema/schema"/>
-        </java>
-    </target>
-
-    <!-- toolschema target ============================================= -->
-
-    <!-- Note that this is a tricky target because it bootstraps xbeans on itself. -->
-    <!-- The basic strategy is to rely on the oldxbeans.jar checked into external/lib -->
-
-    <property name="bootstrap.compile.path" refid="bootstrap.compile.path"/>
-
-    <target name="toolschema.check">
-        <uptodate property="toolschema.notRequired" targetfile="build/classes/toolschema">
-            <srcfiles dir="src/toolschema" includes="**/*.xsd"/>
-        </uptodate>
-    </target>
-
-    <target name="toolschema.classes" depends="toolschema.check, xmlpublic.classes, oldxbean.jar" unless="toolschema.notRequired">
-        <delete dir="build/classes/toolschema"/>
-        <mkdir dir="build/src/toolschema"/>
-        <java classname="${bootstrap_schema_compiler}" classpathref="bootstrap.run.path" fork="true" failonerror="true">
-            <jvmarg value="-ea"/>
-            <arg line="${repackage_arg} -name sXMLTOOLS -srconly -noann -src build/src/toolschema -d build/classes/toolschema src/toolschema"/>
-        </java>
-    </target>
-
-
-    <!-- =========================== -->
-    <!-- =====   Repackaging  ====== -->
-    <!-- =========================== -->
-
-    <target name="edit_build_script">
-        <echo message="editing repackage build file: ${token} --> ${replacement}"/>
-
-        <java classname="repackage.EditBuildScript" failonerror="true">
-            <arg value="${rp_target_dir}/build.xml"/>
-            <arg value="${token}"/>
-            <arg value="${replacement}"/>
-            <classpath>
-                <pathelement location="build/classes/repackage"/>
-            </classpath>
-        </java>
-    </target>
-
-    <property name="repackage_arg" value=""/>
-    <property name="schema_compiler" value="org.apache.xmlbeans.impl.tool.SchemaCompiler"/>
-    <property name="bootstrap_schema_compiler" value="org.apache.xmlbeans.impl.tool.SchemaCompiler"/>
-    <property name="jam_package_name" value="org.apache.xmlbeans.impl.jam"/>
-
-    <!--
-        Params to repackage are:
-
-            repackage_spec:
-
-                Of the form from_pkg_1:to_pkg_1;from_pkg_2:to_pkg_2 which specifies which packages
-                are to be converted which which which other packages.  Right now, there are two.
-                org.apache.xmlbeans and apache.xmlbeans.impl, the public and implementation
-                packages.
 
-            rp_source_dir
+        <tstamp>
+            <format property="tstamp.dist" pattern="yyyyMMdd"/>
+        </tstamp>
 
-                From where the sources come...
-
-            rp_target_dir
-
-                To where the repackaged sources are built
-    -->
-
-
-    <target name="repackage" depends="repackage.classes">
-
-        <echo message="Re-packaging XmlBeans"/>
-	<echo message="   from: ${rp_source_dir}"/>
-	<echo message="   to:   ${rp_target_dir}"/>
-
-        <property
-            name="new_repackage_arg"
-            value="-repackage ${repackage_spec}"/>
-
-        <java classname="repackage.Repackage" fork="true" failonerror="true">
-            <classpath>
-                <pathelement location="build/classes/repackage"/>
-            </classpath>
-            <arg line="${new_repackage_arg} -f ${rp_source_dir} -t ${rp_target_dir}"/>
-        </java>
+        <property name="prefix" value="xmlbeans-${version.base}"/>
 
-        <echo message="Build XmlBeans in ${rp_target_dir}"/>
-
-        <ant dir="${rp_target_dir}" target="xbean" inheritAll="false">
-            <property name="repackage_arg" value="${new_repackage_arg}"/>
-            <property name="bootstrap_schema_compiler" value="${bootstrap_schema_compiler}"/>
-        </ant>
-
-        <ant dir="${rp_target_dir}" target="quickbootstrap" inheritAll="false"/>
-
-    </target>
-
-    <target name="repackage.classes">
-        <mkdir dir="build/classes/repackage"/>
-        <javac srcdir="src/repackage" destdir="build/classes/repackage" source="${javac.source}" target="${javac.target}"
-               debug="on" includeantruntime="false"/>
-    </target>
-
-    <!-- xpath target ============================================= -->
-
-    <target name="xpath.classes" depends="dirs, xmlpublic.classes, store.classes, saxon9.jar">
-        <mkdir dir="build/classes/xpath_xquery"/>
-        <mkdir dir="build/classes/xpath_xquery/META-INF"/>
-        <mkdir dir="build/classes/xpath_xquery/META-INF/services"/>
-        <copy
-            file="src/xpath_xquery/SelectPathInterface.g"
-            tofile="build/classes/xpath_xquery/META-INF/services/org.apache.xmlbeans.impl.store.PathDelegate.SelectPathInterface"/>
-        <copy
-            file="src/xpath_xquery/QueryInterface.g"
-            tofile="build/classes/xpath_xquery/META-INF/services/org.apache.xmlbeans.impl.store.QueryDelegate.QueryInterface"/>
-        <javac
-            destdir="build/classes/xpath_xquery"
-            classpathref="xpath.compile.path"
-            source="${javac.source}" target="${javac.target}"
-            debug="on"
-            includeantruntime="false">
-            <src path="src/xpath_xquery"/>
-            <classpath id="xpath.compile.path">
-                <pathelement location="build/classes/xmlpublic"/>
-                <pathelement location="build/classes/store"/>
-                <pathelement location="${saxon_jar}"/>
-                <pathelement location="${saxon_dom_jar}"/>
-            </classpath>
-        </javac>
-    </target>
-
-    <target name="xbean_xpath.jar" depends="dirs, xpath.classes">
-        <jar jarfile="build/lib/xbean_xpath.jar" basedir="build/classes/xpath_xquery"/>
-    </target>
-
-    <!-- TEST Targets ===================================================== -->
-    <!-- All targets hook up into testbuild.xml -->
-    <property name="testbuild.file" value="testbuild.xml"/>
-
-    <target name="testbuild">
-        <ant antfile="${testbuild.file}" target="build"/>
-    </target>
-
-    <target name="build.tools">
-        <ant antfile="${testbuild.file}" target="build.test.tools"/>
-    </target>
-
-    <target name="build.schemas">
-        <ant antfile="${testbuild.file}" target="build.schemas"/>
-    </target>
-
-    <target name="build.tests">
-        <ant antfile="${testbuild.file}" target="build.tests"/>
-    </target>
-
-    <target name="testclean">
-        <ant antfile="${testbuild.file}" target="clean"/>
-    </target>
-
-    <target name="clean.schemas">
-        <ant antfile="${testbuild.file}" target="clean.schemas"/>
-    </target>
-
-    <target name="clean.tests">
-        <ant antfile="${testbuild.file}" target="clean.tests"/>
-    </target>
-
-    <target name="clean.cc">
-        <ant antfile="${testbuild.file}" target="clean.cc"/>
-    </target>
-
-    <target name="run.junit">
-        <ant antfile="${testbuild.file}" target="run.junit"/>
-    </target>
-
-    <target name="checkintest">
-        <ant antfile="${testbuild.file}" target="checkin"/>
-    </target>
-
-    <target name="detailed">
-        <ant antfile="${testbuild.file}" target="detailed"/>
-    </target>
-
-    <target name="compile.run">
-        <ant antfile="${testbuild.file}" target="compile.run"/>
-    </target>
-
-    <path id="test.compile.path">
-        <pathelement location="build/classes/marshal"/>
-        <pathelement location="build/classes/common"/>
-        <pathelement location="external/lib/junit.jar"/>
-        <pathelement location="build/ar/xbean.jar"/>
-        <pathelement location="build/classes/xmlinputstream"/>
-    </path>
-
-    <path id="test.run.path">
-        <pathelement location="build/ar/xbean.jar"/>
-        <pathelement location="external/lib/junit.jar"/>
-    </path>
-
-
-    <target name="drt.classes" depends="dirs">
-        <mkdir dir="build/private/classes/drt"/>
-        <javac
-            destdir="build/private/classes/drt"
-            classpathref="test.compile.path"
-            source="${javac.source}" target="${javac.target}"
-            debug="on"
-            includeantruntime="false">
-            <src path="test/src/drt"/>
-        </javac>
-    </target>
-
-    <target name="drt.jar" depends="drt.classes">
-        <jar jarfile="build/private/lib/drt.jar" basedir="build/private/classes/drt"/>
-    </target>
-
-
-    <!-- stsschema (for testing) target ================================ -->
-
-    <path id="scomp.run.path">
-        <pathelement location="build/lib/xbean.jar"/>
-    </path>
-
-    <target name="stsschema.check">
-        <uptodate property="stsschema.notRequired" targetfile="build/private/lib/stsschema.jar">
-            <srcfiles dir="test/src/stsschema" includes="**/*.xsd"/>
-            <srcfiles dir="build/ar" includes="xbean.jar"/>
-        </uptodate>
-    </target>
-
-    <target name="stsschema.jar" depends="stsschema.check, dirs, xbean" unless="stsschema.notRequired">
-        <java classname="${schema_compiler}" classpathref="scomp.run.path" fork="true" failonerror="true">
-            <jvmarg value="-ea"/>
-            <arg line="-out build/private/lib/stsschema.jar test/src/stsschema"/>
-        </java>
-    </target>
-
-    <!-- JAM deployment -->
-    <target name="jam.classes.check">
-        <uptodate property="jam.classes.notRequired"
-            targetfile="build/ar/xbean.jar">
-            <srcfiles dir="external/lib" includes="jam*-src.jar"/>
-        </uptodate>
-    </target>
-
-    <target name="jam.classes" depends="jam.classes.check, dirs, repackage.classes" unless="jam.classes.notRequired">
-        <delete dir="build/private/jam"/>
-        <mkdir dir="build/private/jam"/>
-        <unjar src="external/lib/jam-0.1.0-src.jar" dest="build/private/jam"/>
-
-        <echo message="Re-packaging JAM"/>
+        <zip destfile="build/xmlbeans-src-${version.base}-${tstamp.dist}.zip" update="false">
+            <zipfileset dir="." excludes="build/**,tmp/**,.idea/**,bin/**,compile-lib/**" prefix="${prefix}"/>
+        </zip>
 
-        <java classname="repackage.Repackage" fork="true" failonerror="true">
-            <classpath>
-                <pathelement location="build/classes/repackage"/>
-            </classpath>
-            <arg line="-repackage org.codehaus.jam:${jam_package_name} -f build/private/jam/src -t build/private/jam/src_repackage"/>
-        </java>
-        <!--copy file="build/private/jam/src/java.g" todir="build/private/jam/src_repackage"/-->
+        <zip destfile="build/xmlbeans-bin-${version.base}-${tstamp.dist}.zip" update="false">
+            <zipfileset dir="." includes="LICENSE.txt,NOTICE.txt,docs/**" prefix="${prefix}"/>
+            <zipfileset dir="samples" includes="Any/**,DateTime/**,MixedContent/**,OrderMatters/**,SchemaEnum/**,Validation/**,XQueryXPath/**,XsdConfig/**" prefix="${prefix}/samples"/>
+            <zipfileset dir="src/shell" prefix="${prefix}/bin"/>
+            <zipfileset dir="compile-lib" includes="resolver.jar" prefix="${prefix}/lib"/>
+            <zipfileset dir="xkit" prefix="${prefix}"/>
+            <zipfileset dir="src/xsdschema/schema" includes="*.xsd" prefix="${prefix}/schemas/s4s"/>
+            <zipfileset dir="src/xmlschema/schema" includes="*.xsd" prefix="${prefix}/schemas/s4s"/>
+            <zipfileset dir="test/cases/xbean/xmlobject" includes="numerals.xsd,easypo.xsd*,nameworld.xsd" prefix="${prefix}/schemas"/>
+            <zipfileset dir="build" prefix="${prefix}/lib">
+                <include name="xmlbeans-${version.base}.jar"/>
+                <include name="xmlbeans-${version.base}-javadoc.jar"/>
+                <include name="xmlbeans-${version.base}-sources.jar"/>
+            </zipfileset>
+        </zip>
 
-        <delete dir="build/classes/jam"/>
-        <mkdir dir="build/classes/jam"/>
-        <javac
-            destdir="build/classes/jam"
-            source="${javac.source}" target="${javac.target}"
-            debug="on"
-            includeantruntime="true">
-            <src path="build/private/jam/src_repackage"/>
-            <classpath/>
-        </javac>
     </target>
 
-    <macrodef name="downloadfile">
-        <attribute name="src"/>
-        <attribute name="dest"/>
-        <sequential>
-            <!--fail
-                message="Java version might be uncapable to download https URLs - see https://stackoverflow.com/questions/6851461/java-why-does-ssl-handshake-give-could-not-generate-dh-keypair-exception">
-                <condition>
-                    <and>
-                        <equals arg1="${ant.java.version}" arg2="1.6"/>
-                        <contains string="@{src}" substring="https"/>
-                    </and>
-                </condition>
-            </fail-->
-            <get src="@{src}" dest="@{dest}" skipexisting="true"/>
-        </sequential>
-    </macrodef>
-
-    <target name="rat-check" description="Runs the Apache Creadur Rat check against the source code, to spot any files which are missing the correct license headers">
+    <!-- spot any files which are missing the correct license headers -->
+    <target name="rat-check" description="Runs the Apache Creadur Rat check against the source code">
         <mkdir dir="${rat.reportdir}" />
         <downloadfile src="${rat.url}" dest="${rat.jar}"/>
 
@@ -1149,10 +543,12 @@
         <rat:report xmlns:rat="antlib:org.apache.rat.anttasks" reportFile="${rat.report}">
             <fileset dir="src/">
                 <exclude name="**/*.iml" />
-                <exclude name="**/*.g" />
                 <exclude name="**/XML.xsd"/>
                 <exclude name="**/XMLSchema.xsd"/>
             </fileset>
+            <fileset dir="resources">
+                <exclude name="**/META-INF/services/**"/>
+            </fileset>
         </rat:report>
 
         <!-- remove clutter to compact build output -->
@@ -1172,43 +568,26 @@
         <fail><condition><matches pattern="[1-9][0-9]* Unknown Licens" string="${rat.reportcontent}"/></condition></fail>
     </target>
 
-    <!-- Runs the Forbiddens APIs checker against the source code, to -->
-    <!--  spot any cases where we've accidently used methods we shouldn't -->
-    <!-- See https://github.com/policeman-tools/forbidden-apis for details -->
-    <!--  of the checks that this can do -->
-    <target name="forbidden-apis-check">
+    <!-- spot any cases where we've accidently used methods we shouldn't -->
+    <!-- See https://github.com/policeman-tools/forbidden-apis for details of the checks that this can do -->
+    <target name="forbidden-apis-check"
+        description="Runs the Forbiddens APIs checker against the source code">
         <downloadfile src="${forbidden.url}" dest="${forbidden.jar}"/>
 
         <taskdef name="forbiddenapis"
                  classname="de.thetaphi.forbiddenapis.ant.AntTask"
                  classpath="${forbidden.jar}"/>
 
-        <!-- first check rules that apply to all the source code -->
         <path id="forbiddenapis.classpath">
-            <pathelement location="build/classes/common"/>
-            <pathelement location="build/classes/jam"/>
-            <pathelement location="build/classes/marshal"/>
-            <pathelement location="build/classes/repackage"/>
-            <pathelement location="build/classes/saaj_api"/>
-            <pathelement location="build/classes/store"/>
-            <pathelement location="build/classes/tools"/>
-            <pathelement location="build/classes/typeholder"/>
-            <pathelement location="build/classes/typeimpl"/>
-            <pathelement location="build/classes/typestore"/>
-            <pathelement location="build/classes/xmlcomp"/>
-            <pathelement location="build/classes/xmlinputstream"/>
-            <pathelement location="build/classes/xmlpublic"/>
-            <pathelement location="build/classes/xpath_xquery"/>
-            <pathelement location="build/classes/xmlinputstream"/>
-            <path path="${env.ANT_HOME}/lib/ant.jar"/>
-            <pathelement location="external/lib/saxon9.jar"/>
-            <pathelement location="external/lib/saxon9-dom.jar"/>
+            <path refid="xmlbeans-test"/>
+            <path path="${ENV.ANT_HOME}/lib/ant.jar"/>
         </path>
 
 
+        <!-- first check rules that apply to all the source code -->
         <forbiddenapis
                 suppressAnnotation="org.apache.poi.util.SuppressForbidden"
-                targetVersion="${javac.target}"
+                targetVersion="${ant.build.javac.target}"
                 classpathref="forbiddenapis.classpath"
         >
             <bundledsignatures name="jdk-unsafe"/>
@@ -1217,26 +596,9 @@
             <bundledsignatures name="jdk-non-portable"/>
             <bundledsignatures name="jdk-reflection"/>
 
-            <!--signaturesFileset file="src/resources/devtools/forbidden-signatures.txt"/-->
             <!-- sources -->
-            <fileset dir="build/classes/xmlcomp"/>
-            <fileset dir="build/classes/common"/>
-            <fileset dir="build/classes/marshal"/>
-            <fileset dir="build/classes/repackage"/>
-            <fileset dir="build/classes/saaj_api"/>
-            <fileset dir="build/classes/store"/>
-            <fileset dir="build/classes/tools"/>
-            <fileset dir="build/classes/typeholder"/>
-            <fileset dir="build/classes/typeimpl"/>
-            <fileset dir="build/classes/typestore"/>
-            <fileset dir="build/classes/xmlcomp"/>
-            <fileset dir="build/classes/xmlinputstream"/>
-            <fileset dir="build/classes/xmlpublic"/>
-            <fileset dir="build/classes/xpath_xquery"/>
-            <fileset dir="build/classes/xmlinputstream"/>
+            <fileset dir="build/classes"/>
         </forbiddenapis>
 
     </target>
-
-
-</project>
+</project>
\ No newline at end of file

Added: xmlbeans/trunk/resources/typeimpl/org/apache/xmlbeans/impl/schema/TypeSystemHolder.template
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/resources/typeimpl/org/apache/xmlbeans/impl/schema/TypeSystemHolder.template?rev=1851656&view=auto
==============================================================================
Binary file - no diff available.

Propchange: xmlbeans/trunk/resources/typeimpl/org/apache/xmlbeans/impl/schema/TypeSystemHolder.template
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Copied: xmlbeans/trunk/test/cases/xbean/compile/som/instance_simple_types_valid.xml (from r1850172, xmlbeans/trunk/test/cases/xbean/compile/som/instance_simple_types_invalid.xml)
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/test/cases/xbean/compile/som/instance_simple_types_valid.xml?p2=xmlbeans/trunk/test/cases/xbean/compile/som/instance_simple_types_valid.xml&p1=xmlbeans/trunk/test/cases/xbean/compile/som/instance_simple_types_invalid.xml&r1=1850172&r2=1851656&rev=1851656&view=diff
==============================================================================
--- xmlbeans/trunk/test/cases/xbean/compile/som/instance_simple_types_invalid.xml (original)
+++ xmlbeans/trunk/test/cases/xbean/compile/som/instance_simple_types_valid.xml Fri Jan 18 23:08:44 2019
@@ -20,12 +20,12 @@
 	<testAtomicTypeElem>MS Word</testAtomicTypeElem>
 	<testListTypeElem>3</testListTypeElem>
 
-	<testUnionTypeElem>My App</testUnionTypeElem>
+	<testUnionTypeElem>MS Word</testUnionTypeElem>
 	<testUnionTypeElem>4</testUnionTypeElem>
 
-	<header>This is a test Email Header </header>
+	<header name="header">This is a test Email Header </header>
 	<testComplexTypeElementOnlyContentElem> 
-	    <mail>
+	    <mail id="1234">
 	    	<envelope From="x@bea.com">
 		      <From>user@unknown.domain.org</From>
 		      <To>user@cduce.org</To>
@@ -33,13 +33,14 @@
 		      <Subject>Xml Beans Testing</Subject>
 		      <header name="Reply-To">bill@microsoft.com</header>
 	    	</envelope>
+			<body>bla</body>
 	    </mail>
 	</testComplexTypeElementOnlyContentElem> 
 
 
 	<testComplexTypeMixedElem>
 
-	    <mail>
+	    <mail id="1235">
 	    	<envelope From="x@bea.com">
 		      <From>user@unknown.domain.org</From>
 		      <To>user@cduce.org</To>
@@ -47,27 +48,23 @@
 		      <Subject>Xml Beans Testing</Subject>
 		      <header name="Reply-To">bill@microsoft.com</header>
 	    	</envelope>
+			<body>bla</body>
 	    </mail>
 
 
 	</testComplexTypeMixedElem>
 
-	<testComplexTypeEmptyElem value="ABC" />
+	<testComplexTypeEmptyElem value="1234" />
 
 	<testChoiceGroupElem>
 		<Lang>English</Lang>
 		<Font>Arial</Font>
 	</testChoiceGroupElem>
+
 	<testAllGroupElem>
 		<Greetings>Hello</Greetings>
 		<Signature> Mr X., Bea Systems</Signature>
 		<ContactNumber>425-123-1234</ContactNumber>
 	</testAllGroupElem>
-	<testAllGroupElem>
-		<Greetings>Hello</Greetings>
-		<Signature> Mr X., Bea Systems</Signature>
-		<ContactNumber>425-123-1234</ContactNumber>
-	</testAllGroupElem>
-
 
 </testroot>

Modified: xmlbeans/trunk/test/cases/xbean/compile/som/namespaces_import_filepath.xsd
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/test/cases/xbean/compile/som/namespaces_import_filepath.xsd?rev=1851656&r1=1851655&r2=1851656&view=diff
==============================================================================
--- xmlbeans/trunk/test/cases/xbean/compile/som/namespaces_import_filepath.xsd (original)
+++ xmlbeans/trunk/test/cases/xbean/compile/som/namespaces_import_filepath.xsd Fri Jan 18 23:08:44 2019
@@ -25,7 +25,7 @@
 
     <!-- import with complete file path -->
     <xs:import namespace="http://openuri.org/namespaceimported"
-                schemaLocation="file:///D:/SVNNEW/xmlbeans/trunk/test/cases/xbean/compile/som/namespaces1.xsd" />
+                schemaLocation="namespaces1.xsd_" />
 
     <xs:element name="NamespaceRootElem">
         <xs:complexType>

Modified: xmlbeans/trunk/test/cases/xbean/dom/id.xsd
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/test/cases/xbean/dom/id.xsd?rev=1851656&r1=1851655&r2=1851656&view=diff
==============================================================================
--- xmlbeans/trunk/test/cases/xbean/dom/id.xsd (original)
+++ xmlbeans/trunk/test/cases/xbean/dom/id.xsd Fri Jan 18 23:08:44 2019
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 -->
-<!DOCTYPE testid [
+<!DOCTYPE foo [
 <!ELEMENT person (#PCDATA) >
 <!ATTLIST person
         id ID #REQUIRED
@@ -32,7 +32,6 @@ elementFormDefault="qualified"
            <xsd:sequence>
              <xsd:element ref="tns:person" />
            </xsd:sequence>
-	       <xsd:attribute name="myid" type="xsd:ID" use="required"/>
          </xsd:complexType>
   </xsd:element>
 
@@ -41,6 +40,7 @@ elementFormDefault="qualified"
           <xsd:sequence>
               <xsd:element name="firstname" type="xsd:string" />
           </xsd:sequence>
+          <xsd:attribute name="id" type="xsd:ID" use="required"/>
       </xsd:complexType>
   </xsd:element>
 </xsd:schema>

Copied: xmlbeans/trunk/test/cases/xbean/misc/syscachetest1.xsd (from r1851655, xmlbeans/trunk/test/cases/xbean/misc/syscachetest.xsd)
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/test/cases/xbean/misc/syscachetest1.xsd?p2=xmlbeans/trunk/test/cases/xbean/misc/syscachetest1.xsd&p1=xmlbeans/trunk/test/cases/xbean/misc/syscachetest.xsd&r1=1851655&r2=1851656&rev=1851656&view=diff
==============================================================================
--- xmlbeans/trunk/test/cases/xbean/misc/syscachetest.xsd (original)
+++ xmlbeans/trunk/test/cases/xbean/misc/syscachetest1.xsd Fri Jan 18 23:08:44 2019
@@ -17,8 +17,8 @@
 -->
 <xsd:schema
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-    xmlns:test="http://xbean/misc/SyscacheTests"
-    targetNamespace="http://xbean/misc/SyscacheTests"
+    xmlns:test="http://xbean/misc/SyscacheTests1"
+    targetNamespace="http://xbean/misc/SyscacheTests1"
     >                                                                              
 
     <xsd:element name="Person" type="test:personType"/>

Copied: xmlbeans/trunk/test/cases/xbean/misc/syscachetest2.xsd (from r1850172, xmlbeans/trunk/test/cases/xbean/dom/ComplexTypeTest.xsd)
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/test/cases/xbean/misc/syscachetest2.xsd?p2=xmlbeans/trunk/test/cases/xbean/misc/syscachetest2.xsd&p1=xmlbeans/trunk/test/cases/xbean/dom/ComplexTypeTest.xsd&r1=1850172&r2=1851656&rev=1851656&view=diff
==============================================================================
--- xmlbeans/trunk/test/cases/xbean/dom/ComplexTypeTest.xsd (original)
+++ xmlbeans/trunk/test/cases/xbean/misc/syscachetest2.xsd Fri Jan 18 23:08:44 2019
@@ -17,8 +17,8 @@
 -->
 <xsd:schema
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-    xmlns="http://xbean/dom/ComplexTypeTest"
-    targetNamespace="http://xbean/dom/ComplexTypeTest"
+    xmlns="http://xbean/misc/SyscacheTests2"
+    targetNamespace="http://xbean/misc/SyscacheTests2"
     >
   <!--element only-->
      <xsd:complexType name="elementT">

Modified: xmlbeans/trunk/test/cases/xbean/tools/inst2xsd/options/base0.xsd
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/test/cases/xbean/tools/inst2xsd/options/base0.xsd?rev=1851656&r1=1851655&r2=1851656&view=diff
==============================================================================
--- xmlbeans/trunk/test/cases/xbean/tools/inst2xsd/options/base0.xsd (original)
+++ xmlbeans/trunk/test/cases/xbean/tools/inst2xsd/options/base0.xsd Fri Jan 18 23:08:44 2019
@@ -1,11 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="baseNamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema">
-  <xs:element name="a" type="bas:aType" xmlns:bas="baseNamespace"/>
-  <xs:complexType name="aType">
-    <xs:sequence>
-      <xs:element type="xs:string" name="b"/>
-      <xs:element type="xs:byte" name="c"/>
-      <xs:element type="xs:string" name="d"/>
-    </xs:sequence>
-  </xs:complexType>
+  <xs:element name="a">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element type="xs:string" name="b"/>
+        <xs:element type="xs:byte" name="c"/>
+        <xs:element type="xs:string" name="d"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
 </xs:schema>
\ No newline at end of file

Modified: xmlbeans/trunk/test/cases/xbean/xmlobject/japanese/pr-xml-little-endian.xml
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/test/cases/xbean/xmlobject/japanese/pr-xml-little-endian.xml?rev=1851656&r1=1851655&r2=1851656&view=diff
==============================================================================
Binary files xmlbeans/trunk/test/cases/xbean/xmlobject/japanese/pr-xml-little-endian.xml (original) and xmlbeans/trunk/test/cases/xbean/xmlobject/japanese/pr-xml-little-endian.xml Fri Jan 18 23:08:44 2019 differ



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org