poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiwiwi...@apache.org
Subject svn commit: r1857437 - in /xmlbeans/branches/xmlbeans-536: src/common/org/apache/xmlbeans/impl/common/ src/tools/org/apache/xmlbeans/impl/inst2xsd/ src/xmlcomp/org/apache/xmlbeans/impl/tool/ src/xmlpublic/org/apache/xmlbeans/ test/src/common/ test/src/...
Date Fri, 12 Apr 2019 22:56:54 GMT
Author: kiwiwings
Date: Fri Apr 12 22:56:53 2019
New Revision: 1857437

URL: http://svn.apache.org/viewvc?rev=1857437&view=rev
Log:
(XMLBEANS-536) - set classes dir to prevent spaming the project base dir

Removed:
    xmlbeans/branches/xmlbeans-536/test/tools/src/tools/util/SchemaValidator.java
Modified:
    xmlbeans/branches/xmlbeans-536/src/common/org/apache/xmlbeans/impl/common/IOUtil.java
    xmlbeans/branches/xmlbeans-536/src/tools/org/apache/xmlbeans/impl/inst2xsd/Inst2Xsd.java
    xmlbeans/branches/xmlbeans-536/src/xmlcomp/org/apache/xmlbeans/impl/tool/XMLBeanXSTCHarness.java
    xmlbeans/branches/xmlbeans-536/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java
    xmlbeans/branches/xmlbeans-536/test/src/common/Common.java
    xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/checkin/CompilationTests.java
    xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/checkin/XmlBeansCompCheckinTests.java
    xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/common/CompileTestBase.java
    xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/detailed/DetailedCompTests.java
    xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/detailed/XmlBeanCompilationTests.java
    xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/incr/schemaCompile/detailed/IncrCompilationTests.java
    xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/som/common/SomTestBase.java
    xmlbeans/branches/xmlbeans-536/test/src/misc/checkin/RuntimeSchemaLoaderTest.java
    xmlbeans/branches/xmlbeans-536/test/src/misc/checkin/ThreadingTest.java
    xmlbeans/branches/xmlbeans-536/test/src/misc/detailed/JiraRegression1_50Test.java
    xmlbeans/branches/xmlbeans-536/test/src/scomp/derivation/extension/detailed/ComplexContentExtensionTest.java
    xmlbeans/branches/xmlbeans-536/test/src/scomp/derivation/restriction/detailed/EnumTest.java
    xmlbeans/branches/xmlbeans-536/test/src/scomp/redefine/detailed/MultipleRedefines.java
    xmlbeans/branches/xmlbeans-536/test/src/scomp/substGroup/restriction/detailed/Final.java
    xmlbeans/branches/xmlbeans-536/test/src/xmlobject/checkin/InstanceValidationTests.java
    xmlbeans/branches/xmlbeans-536/test/src/xmlobject/checkin/SubstGroupTests.java
    xmlbeans/branches/xmlbeans-536/test/src/xmlobject/detailed/TestsFromBugs.java
    xmlbeans/branches/xmlbeans-536/test/src/xmlobject/schematypes/checkin/EnumTests.java
    xmlbeans/branches/xmlbeans-536/test/src/xmlobject/schematypes/checkin/QNameTests.java

Modified: xmlbeans/branches/xmlbeans-536/src/common/org/apache/xmlbeans/impl/common/IOUtil.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/common/org/apache/xmlbeans/impl/common/IOUtil.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/common/org/apache/xmlbeans/impl/common/IOUtil.java
(original)
+++ xmlbeans/branches/xmlbeans-536/src/common/org/apache/xmlbeans/impl/common/IOUtil.java
Fri Apr 12 22:56:53 2019
@@ -111,7 +111,7 @@ public class IOUtil
         }
     }
 
-    public static File createDir(File rootdir, String subdir)
+    public static synchronized File createDir(File rootdir, String subdir)
     {
         File newdir = (subdir == null) ? rootdir : new File(rootdir, subdir);
         boolean created = (newdir.exists() && newdir.isDirectory()) || newdir.mkdirs();

Modified: xmlbeans/branches/xmlbeans-536/src/tools/org/apache/xmlbeans/impl/inst2xsd/Inst2Xsd.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/tools/org/apache/xmlbeans/impl/inst2xsd/Inst2Xsd.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/tools/org/apache/xmlbeans/impl/inst2xsd/Inst2Xsd.java
(original)
+++ xmlbeans/branches/xmlbeans-536/src/tools/org/apache/xmlbeans/impl/inst2xsd/Inst2Xsd.java
Fri Apr 12 22:56:53 2019
@@ -20,6 +20,7 @@ import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.XmlOptions;
 import org.apache.xmlbeans.XmlError;
+import org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler;
 import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;
 import org.apache.xmlbeans.impl.inst2xsd.util.TypeSystemHolder;
 import org.apache.xmlbeans.impl.tool.CommandLine;
@@ -312,9 +313,13 @@ public class Inst2Xsd
         Collection compErrors = new ArrayList();
         XmlOptions schemaOptions = new XmlOptions();
         schemaOptions.setErrorListener(compErrors);
-        try
-        {
-            sLoader = XmlBeans.loadXsd(sDocs, schemaOptions);
+
+        SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
+        params.setInputXmls(sDocs);
+        params.setOptions(schemaOptions);
+
+        try {
+            sLoader = XmlBeans.loadXsd(params);
         }
         catch (Exception e)
         {

Modified: xmlbeans/branches/xmlbeans-536/src/xmlcomp/org/apache/xmlbeans/impl/tool/XMLBeanXSTCHarness.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/xmlcomp/org/apache/xmlbeans/impl/tool/XMLBeanXSTCHarness.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/xmlcomp/org/apache/xmlbeans/impl/tool/XMLBeanXSTCHarness.java
(original)
+++ xmlbeans/branches/xmlbeans-536/src/xmlcomp/org/apache/xmlbeans/impl/tool/XMLBeanXSTCHarness.java
Fri Apr 12 22:56:53 2019
@@ -23,6 +23,7 @@ import org.apache.xmlbeans.SchemaTypeSys
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler;
 
+import java.io.File;
 import java.util.Collection;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -59,6 +60,7 @@ public class XMLBeanXSTCHarness implemen
                 }
                 params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
                 params.setOptions(options);
+                params.setClassesDir(new File("build/xstctest/"));
 
                 SchemaTypeSystem system = XmlBeans.compileXmlBeans(params);
                 loader = XmlBeans.typeLoaderUnion(system, XmlBeans.getBuiltinTypeSystem());

Modified: xmlbeans/branches/xmlbeans-536/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java (original)
+++ xmlbeans/branches/xmlbeans-536/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java Fri Apr
12 22:56:53 2019
@@ -252,7 +252,11 @@ public final class XmlBeans
      * Just like compileXsd, but uses the context type loader for
      * linking, and returns a unioned typeloader that is suitable for
      * creating instances.
+     *
+     * @deprecated use {@link #loadXsd(Parameters)} instead
      */
+    @Deprecated
+    @Removal(version = "4.0")
     public static SchemaTypeLoader loadXsd(XmlObject[] schemas) throws XmlException
     {
         return loadXsd(schemas, null);
@@ -277,13 +281,32 @@ public final class XmlBeans
      *
      * @param schemas The schema definitions from which to build the schema type system.
      * @param options Options specifying an error listener and/or validation behavior.
+     *
+     * @deprecated use {@link #loadXsd(Parameters)} instead
      */
+    @Deprecated
+    @Removal(version = "4.0")
     public static SchemaTypeLoader loadXsd(XmlObject[] schemas, XmlOptions options) throws
XmlException {
         Parameters params = new Parameters();
         params.setInputXmls(schemas);
         params.setOptions(options);
+        return loadXsd(params);
+    }
 
-        XmlErrorWatcher xew = setErrorWatcher(params, options);
+    /**
+     * <p>Returns the SchemaTypeSystem that results from compiling the XML
+     * schema definitions passed in <em>schemas</em>.</p>
+     *
+     * <p>This is just like {@link #compileXmlBeans(Parameters)}, but uses the context
type loader for
+     * linking, and returns a unioned typeloader that is suitable for
+     * creating instances.</p>
+     *
+     * @param params the schema compiler parameters
+     *
+     * @see #compileXmlBeans(Parameters)
+     */
+    public static SchemaTypeLoader loadXsd(Parameters params) throws XmlException {
+        XmlErrorWatcher xew = setErrorWatcher(params, params.getOptions());
 
         SchemaTypeSystem sts = SchemaTypeSystemCompiler.compile(params);
 
@@ -294,7 +317,6 @@ public final class XmlBeans
         return typeLoaderUnion(sts, getContextTypeLoader());
     }
 
-
     /**
      * <p>Returns the SchemaTypeSystem that results from compiling the XML
      * schema definitions passed.</p>

Modified: xmlbeans/branches/xmlbeans-536/test/src/common/Common.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/common/Common.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/common/Common.java (original)
+++ xmlbeans/branches/xmlbeans-536/test/src/common/Common.java Fri Apr 12 22:56:53 2019
@@ -15,6 +15,7 @@
 package common;
 
 import org.apache.xmlbeans.*;
+import org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler;
 import org.junit.Assert;
 
 import javax.xml.namespace.QName;
@@ -279,7 +280,11 @@ public class Common
                     XmlObject.Factory.parse(schemas[i]);
         }
 
-        return XmlBeans.loadXsd(schemaDocs);
+        SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
+        params.setInputXmls(schemaDocs);
+        params.setClassesDir(new File("build/junit/common"));
+
+        return XmlBeans.loadXsd(params);
     }
 
     /**

Modified: xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/checkin/CompilationTests.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/checkin/CompilationTests.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/checkin/CompilationTests.java (original)
+++ xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/checkin/CompilationTests.java Fri
Apr 12 22:56:53 2019
@@ -100,11 +100,13 @@ public class CompilationTests {
         schemas[n - 2] = SchemaDocument.Factory.parse(files[n - 2]).getSchema();
         List errors = new ArrayList();
         XmlOptions options = (new XmlOptions()).setErrorListener(errors);
-        SchemaTypeSystem builtin = XmlBeans.getBuiltinTypeSystem();
+
         SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
         params.setSchemas(schemas);
-        params.setLinkTo(builtin);
+        params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
         params.setOptions(options);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
+
         system = XmlBeans.compileXmlBeans(params);
         Assert.assertNotNull("Compilation failed during inititial compile.", system);
         System.out.println("-= Initial Compile =-");
@@ -124,11 +126,9 @@ public class CompilationTests {
         SchemaDocument.Schema schemas1 = SchemaDocument.Factory.parse(files[n - 1]).getSchema();
         schemas1.documentProperties().setSourceName(url);
         errors.clear();
-        params = new SchemaTypeSystemCompiler.Parameters();
+
         params.setExistingTypeSystem(system);
         params.setSchemas(schemas1);
-        params.setLinkTo(builtin);
-        params.setOptions(options);
 
         system = XmlBeans.compileXmlBeans(params);
         Assert.assertNotNull("Compilation failed during incremental compile.", system);
@@ -146,10 +146,9 @@ public class CompilationTests {
         // Now compile non-incrementally for the purpose of comparing the result
         errors.clear();
         schemas[n - 2] = schemas1;
-        params = new SchemaTypeSystemCompiler.Parameters();
+
+        params.setExistingTypeSystem(null);
         params.setSchemas(schemas);
-        params.setLinkTo(builtin);
-        params.setOptions(options);
 
         system = XmlBeans.compileXmlBeans(params);
         Assert.assertNotNull("Compilation failed during reference compile.", system);
@@ -203,6 +202,7 @@ public class CompilationTests {
         SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
         params.setInputXmls(parsed);
         params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
         SchemaTypeSystem sts = XmlBeans.compileXmlBeans(params);
         Assert.assertNotNull("Could not compile person.xsd", sts);
         SchemaType personType = sts.findType(QNameHelper.forLNS("person", "http://openuri.org/mytest"));
@@ -389,10 +389,14 @@ public class CompilationTests {
         for (int i = 0; i < invalidSchemas.length; i++)
             schemas[i] = SchemaDocument.Factory.parse(invalidSchemas[i]);
 
+        SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
+
         // Now compile the invalid schemas, test that they fail
         for (int i = 0; i < schemas.length; i++) {
             try {
-                XmlBeans.loadXsd(new XmlObject[]{schemas[i]});
+                params.setInputXmls(schemas[i]);
+                XmlBeans.loadXsd(params);
                 fail("Schema should have failed to compile:\n" + invalidSchemas[i]);
             } catch (XmlException success) {
             }
@@ -406,7 +410,8 @@ public class CompilationTests {
         // Compile the valid schemas. They should not fail
         for (int i = 0; i < schemas.length; i++) {
             try {
-                XmlBeans.loadXsd(new XmlObject[]{schemas[i]});
+                params.setInputXmls(schemas[i]);
+                XmlBeans.loadXsd(params);
             } catch (XmlException fail) {
                 fail("Failed to compile schema:\n" + validSchemas[i]);
             }

Modified: xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/checkin/XmlBeansCompCheckinTests.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/checkin/XmlBeansCompCheckinTests.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/checkin/XmlBeansCompCheckinTests.java
(original)
+++ xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/checkin/XmlBeansCompCheckinTests.java
Fri Apr 12 22:56:53 2019
@@ -77,6 +77,7 @@ public class XmlBeansCompCheckinTests ex
         params.setInputXmls(obj1);
         params.setFiler(f);
         params.setOptions(xm_opts);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
 
         SchemaTypeSystem apiSts = XmlBeans.compileXmlBeans(params);
 
@@ -125,6 +126,7 @@ public class XmlBeansCompCheckinTests ex
             params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
             params.setInputXmls(obj3);
             params.setOptions(opt);
+            params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
             sts = XmlBeans.compileXmlBeans(params);
             boolean psom_expError = false;
             // print out the recovered xm_errors
@@ -229,6 +231,7 @@ public class XmlBeansCompCheckinTests ex
             params.setInputXmls(obj3);
             params.setFiler(tf);
             params.setOptions(opt);
+            params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
             sts = XmlBeans.compileXmlBeans(params);
 
             assertTrue("Errors was not empty", !err.isEmpty());
@@ -270,6 +273,7 @@ public class XmlBeansCompCheckinTests ex
         Parameters params = new Parameters();
         params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
         params.setInputXmls(obj1);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
 
         SchemaTypeSystem apiSts = XmlBeans.compileXmlBeans(params);
         System.out.println("Name: " + apiSts.getName());
@@ -298,6 +302,7 @@ public class XmlBeansCompCheckinTests ex
         try {
             params.setInputXmls(obj1);
             params.setLinkTo(null);
+            params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
             apiSts = XmlBeans.compileXmlBeans(params);
             printSTS(apiSts);
         } catch (IllegalArgumentException iaEx) {

Modified: xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/common/CompileTestBase.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/common/CompileTestBase.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/common/CompileTestBase.java (original)
+++ xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/common/CompileTestBase.java Fri
Apr 12 22:56:53 2019
@@ -193,6 +193,7 @@ public class CompileTestBase extends Com
         params.setInputXmls(schemas);
         params.setLinkTo(builtin);
         params.setOptions(options);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
 
         SchemaTypeSystem sts = XmlBeans.compileXmlBeans(params);
         assertNotNull("Compilation failed during Incremental Compile.", sts);
@@ -201,34 +202,16 @@ public class CompileTestBase extends Com
 
     }
 
-    /**
-     * Original Compilation to directory specified
-     */
-    public SchemaTypeSystem compileSchemas(XmlObject[] schemas, SchemaTypeLoader typepath,
-                                           XmlOptions options, File outDir) throws XmlException,
IOException {
-        SchemaTypeSystem system;
-        SchemaTypeSystem builtin = XmlBeans.getBuiltinTypeSystem();
-        SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
-        params.setInputXmls(schemas);
-        params.setLinkTo(builtin);
-        params.setOptions(options);
-        system = XmlBeans.compileXmlBeans(params);
-        assertNotNull("Compilation failed during compile.", system);
-        SchemaCodeGenerator.saveTypeSystem(system, outDir, null, null, null);
-        return system;
-    }
-
-
     //original compile to get base type system
     public SchemaTypeSystem compileSchemas(XmlObject[] schemas, SchemaTypeLoader typepath,
                                            XmlOptions options) throws XmlException, IOException
{
-        SchemaTypeSystem system;
-        SchemaTypeSystem builtin = XmlBeans.getBuiltinTypeSystem();
         SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
         params.setInputXmls(schemas);
-        params.setLinkTo(builtin);
+        params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
         params.setOptions(options);
-        system = XmlBeans.compileXmlBeans(params);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
+
+        SchemaTypeSystem system = XmlBeans.compileXmlBeans(params);
         assertNotNull("Compilation failed during compile.", system);
         SchemaCodeGenerator.saveTypeSystem(system, out, null, null, null);
         return system;

Modified: xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/detailed/DetailedCompTests.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/detailed/DetailedCompTests.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/detailed/DetailedCompTests.java
(original)
+++ xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/detailed/DetailedCompTests.java
Fri Apr 12 22:56:53 2019
@@ -54,6 +54,7 @@ public class DetailedCompTests {
             params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
             params.setInputXmls(xObj);
             params.setOptions(xm_opt);
+            params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
 
             SchemaTypeSystem sts = XmlBeans.compileXmlBeans(params);
             assertNotNull("STS was null", sts);
@@ -93,6 +94,7 @@ public class DetailedCompTests {
             params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
             params.setInputXmls(xObj);
             params.setOptions(xm_opt);
+            params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
 
             SchemaTypeSystem sts = XmlBeans.compileXmlBeans(params);
 
@@ -169,6 +171,7 @@ public class DetailedCompTests {
         Parameters params = new Parameters();
         params.setInputXmls(SchemaDocument.Factory.parse(schema));
         params.setOptions(opts);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
         errors.clear();
         XmlBeans.compileXmlBeans(params);
         assertTrue("Expected error: NOTATION type cannot be used directly", errors.size()
== 1);

Modified: xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/detailed/XmlBeanCompilationTests.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/detailed/XmlBeanCompilationTests.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/detailed/XmlBeanCompilationTests.java
(original)
+++ xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/detailed/XmlBeanCompilationTests.java
Fri Apr 12 22:56:53 2019
@@ -113,6 +113,7 @@ public class XmlBeanCompilationTests ext
         params.setConfig(bind);
         params.setFiler(f);
         params.setOptions(xm_opts);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
 
         SchemaTypeSystem apiSts = XmlBeans.compileXmlBeans(params);
 
@@ -162,6 +163,8 @@ public class XmlBeanCompilationTests ext
         params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
         params.setInputXmls(obj1);
         params.setOptions(opt);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
+
         sts = XmlBeans.compileXmlBeans(params);
 
         assertTrue("Errors should have been empty", err.isEmpty());
@@ -209,6 +212,8 @@ public class XmlBeanCompilationTests ext
         params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
         params.setInputXmls(obj3);
         params.setOptions(opt);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
+
         SchemaTypeSystem b = XmlBeans.compileXmlBeans(params);
         // find element in the type System
         if (!findGlobalElement(b.globalElements(), sts1))

Modified: xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/incr/schemaCompile/detailed/IncrCompilationTests.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/incr/schemaCompile/detailed/IncrCompilationTests.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/incr/schemaCompile/detailed/IncrCompilationTests.java
(original)
+++ xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/incr/schemaCompile/detailed/IncrCompilationTests.java
Fri Apr 12 22:56:53 2019
@@ -281,6 +281,7 @@ public class IncrCompilationTests extend
         params.setInputXmls(obj1);
         params.setFiler(filer);
         params.setOptions(xm);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
 
         SchemaTypeSystem base = XmlBeans.compileXmlBeans(params);
         Assert.assertNotNull("Compilation failed during Incremental Compile.", base);
@@ -335,6 +336,7 @@ public class IncrCompilationTests extend
         params.setInputXmls(obj1);
         params.setFiler(filer);
         params.setOptions(xm);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
         SchemaTypeSystem base = XmlBeans.compileXmlBeans(params);
         Assert.assertNotNull("Compilation failed during Incremental Compile.", base);
         base.saveToDirectory(out);

Modified: xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/som/common/SomTestBase.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/som/common/SomTestBase.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/som/common/SomTestBase.java (original)
+++ xmlbeans/branches/xmlbeans-536/test/src/compile/scomp/som/common/SomTestBase.java Fri
Apr 12 22:56:53 2019
@@ -516,6 +516,7 @@ public class SomTestBase extends Compile
             params.setInputXmls(xsdModifiedObj);
             params.setExistingTypeSystem(baseSchema);
             params.setOptions(options);
+            params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
 
             returnSTS = XmlBeans.compileXmlBeans(params);
             Assert.assertNotNull("Schema Type System created is Null.", returnSTS);

Modified: xmlbeans/branches/xmlbeans-536/test/src/misc/checkin/RuntimeSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/misc/checkin/RuntimeSchemaLoaderTest.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/misc/checkin/RuntimeSchemaLoaderTest.java (original)
+++ xmlbeans/branches/xmlbeans-536/test/src/misc/checkin/RuntimeSchemaLoaderTest.java Fri
Apr 12 22:56:53 2019
@@ -19,6 +19,7 @@ import org.apache.xmlbeans.SchemaTypeLoa
 import org.apache.xmlbeans.XmlBeans;
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler;
 import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument.Schema;
 import org.junit.Assert;
 import org.junit.Test;
@@ -33,11 +34,15 @@ import static org.junit.Assert.assertEqu
 public class RuntimeSchemaLoaderTest {
 
     @Test
-    public void testDynamicLoad() throws Throwable {
+    public void testDynamicLoad() throws Exception {
         File inputfile1 = JarUtil
                 .getResourceFromJarasFile("xbean/misc/dyntest.xsd");
-        SchemaTypeLoader loader = XmlBeans.loadXsd(
-                new XmlObject[]{XmlObject.Factory.parse(inputfile1)});
+
+        SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
+        params.setClassesDir(new File("build/junit/" + getClass().getSimpleName()));
+        params.setInputXmls(XmlObject.Factory.parse(inputfile1));
+
+        SchemaTypeLoader loader = XmlBeans.loadXsd(params);
         XmlObject result = loader.parse(
                 JarUtil.getResourceFromJarasFile("xbean/misc/dyntest.xml"),
                 null, null);
@@ -52,11 +57,15 @@ public class RuntimeSchemaLoaderTest {
     }
 
     @Test
-    public void testDynamicLoad2() throws Throwable {
+    public void testDynamicLoad2() throws Exception {
         File inputfile1 = JarUtil
                 .getResourceFromJarasFile("xbean/misc/dyntest2.xsd");
-        SchemaTypeLoader loader = XmlBeans.loadXsd(new XmlObject[]
-        {XmlObject.Factory.parse(inputfile1)});
+
+        SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
+        params.setClassesDir(new File("build/junit/" + getClass().getSimpleName()));
+        params.setInputXmls(XmlObject.Factory.parse(inputfile1));
+
+        SchemaTypeLoader loader = XmlBeans.loadXsd(params);
         XmlObject result = loader.parse(
                 JarUtil.getResourceFromJarasFile("xbean/misc/dyntest2.xml"),
                 null, null);

Modified: xmlbeans/branches/xmlbeans-536/test/src/misc/checkin/ThreadingTest.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/misc/checkin/ThreadingTest.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/misc/checkin/ThreadingTest.java (original)
+++ xmlbeans/branches/xmlbeans-536/test/src/misc/checkin/ThreadingTest.java Fri Apr 12 22:56:53
2019
@@ -18,6 +18,7 @@ package misc.checkin;
 import org.apache.xmlbeans.SchemaTypeLoader;
 import org.apache.xmlbeans.XmlBeans;
 import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler;
 import org.junit.Assert;
 import org.junit.Test;
 import tools.util.JarUtil;
@@ -46,13 +47,15 @@ public class ThreadingTest {
         }
 
         public void run() {
+            SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
+            params.setClassesDir(new File("build/junit/" + getClass().getSimpleName()));
+
             try {
                 for (int i = 0; i < ITERATION_COUNT; i++) {
-                    SchemaTypeLoader loader = XmlBeans.loadXsd(
-                            new XmlObject[]{
-                                XmlObject.Factory.parse(
-                                        JarUtil.getResourceFromJarasFile(
-                                                "xbean/misc/xmldsig-core-schema.xsd"))});
+                    params.setInputXmls(XmlObject.Factory.parse(
+                        JarUtil.getResourceFromJarasFile(
+                            "xbean/misc/xmldsig-core-schema.xsd")));
+                    SchemaTypeLoader loader = XmlBeans.loadXsd(params);
                     File temp = JarUtil.getResourceFromJarasFile(
                             "xbean/misc/signature-example.xml");
                     XmlObject result = loader.parse(temp, null, null);

Modified: xmlbeans/branches/xmlbeans-536/test/src/misc/detailed/JiraRegression1_50Test.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/misc/detailed/JiraRegression1_50Test.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/misc/detailed/JiraRegression1_50Test.java (original)
+++ xmlbeans/branches/xmlbeans-536/test/src/misc/detailed/JiraRegression1_50Test.java Fri
Apr 12 22:56:53 2019
@@ -147,6 +147,7 @@ public class JiraRegression1_50Test exte
         // compile loaded XmlObject
         SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
         params.setInputXmls(sd);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
 
         SchemaTypeSystem sts = XmlBeans.compileXmlBeans(params);
         sts.resolve();

Modified: xmlbeans/branches/xmlbeans-536/test/src/scomp/derivation/extension/detailed/ComplexContentExtensionTest.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/scomp/derivation/extension/detailed/ComplexContentExtensionTest.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/scomp/derivation/extension/detailed/ComplexContentExtensionTest.java
(original)
+++ xmlbeans/branches/xmlbeans-536/test/src/scomp/derivation/extension/detailed/ComplexContentExtensionTest.java
Fri Apr 12 22:56:53 2019
@@ -23,6 +23,7 @@ import xbean.scomp.derivation.complexExt
 import xbean.scomp.derivation.complexExtension.SequenceExtensionEltDocument;
 import xbean.scomp.derivation.complexExtension.SequenceExtensionT;
 
+import java.io.File;
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -189,6 +190,7 @@ public class ComplexContentExtensionTest
             params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
             params.setOptions(options);
             params.setInputXmls(xobj);
+            params.setClassesDir(new File("build/junit/" + getClass().getSimpleName()));
 
             XmlBeans.compileXmlBeans(params);
         }
@@ -241,6 +243,7 @@ public class ComplexContentExtensionTest
             Parameters params = new Parameters();
             params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
             params.setInputXmls(xobj);
+            params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
 
             XmlBeans.compileXmlBeans(params);
         }
@@ -280,6 +283,7 @@ public class ComplexContentExtensionTest
             Parameters params = new Parameters();
             params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
             params.setInputXmls(xobj);
+            params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
 
             XmlBeans.compileXmlBeans(params);
         }
@@ -335,6 +339,7 @@ public class ComplexContentExtensionTest
             params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
             params.setInputXmls(xobj);
             params.setOptions(options);
+            params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
 
             XmlBeans.compileXmlBeans(params);
         }

Modified: xmlbeans/branches/xmlbeans-536/test/src/scomp/derivation/restriction/detailed/EnumTest.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/scomp/derivation/restriction/detailed/EnumTest.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/scomp/derivation/restriction/detailed/EnumTest.java
(original)
+++ xmlbeans/branches/xmlbeans-536/test/src/scomp/derivation/restriction/detailed/EnumTest.java
Fri Apr 12 22:56:53 2019
@@ -21,6 +21,7 @@ import org.apache.xmlbeans.impl.xb.xsdsc
 import org.junit.Test;
 import scomp.common.BaseCase;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -71,6 +72,7 @@ public class EnumTest extends BaseCase
             SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
             params.setInputXmls(sd);
             params.setOptions(options);
+            params.setClassesDir(new File("build/junit/" + getClass().getSimpleName()));
 
             SchemaTypeSystem sts = XmlBeans.compileXmlBeans(params);
         }

Modified: xmlbeans/branches/xmlbeans-536/test/src/scomp/redefine/detailed/MultipleRedefines.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/scomp/redefine/detailed/MultipleRedefines.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/scomp/redefine/detailed/MultipleRedefines.java
(original)
+++ xmlbeans/branches/xmlbeans-536/test/src/scomp/redefine/detailed/MultipleRedefines.java
Fri Apr 12 22:56:53 2019
@@ -22,6 +22,7 @@ import org.junit.Test;
 import scomp.common.BaseCase;
 
 import javax.xml.namespace.QName;
+import java.io.File;
 import java.util.Iterator;
 
 import static org.junit.Assert.*;
@@ -180,6 +181,7 @@ public class MultipleRedefines extends B
         params.setInputXmls(sdocs);
         params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
         params.setOptions(validateOptions);
+        params.setClassesDir(new File("build/junit/" + getClass().getSimpleName()));
 
         SchemaTypeSystem ts = XmlBeans.compileXmlBeans(params);
         assertNotNull(ts);
@@ -219,6 +221,7 @@ public class MultipleRedefines extends B
             params.setInputXmls(sdocs);
             params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
             params.setOptions(validateOptions);
+            params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
             SchemaTypeSystem ts = XmlBeans.compileXmlBeans(params);
         }
         catch (XmlException e)

Modified: xmlbeans/branches/xmlbeans-536/test/src/scomp/substGroup/restriction/detailed/Final.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/scomp/substGroup/restriction/detailed/Final.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/scomp/substGroup/restriction/detailed/Final.java
(original)
+++ xmlbeans/branches/xmlbeans-536/test/src/scomp/substGroup/restriction/detailed/Final.java
Fri Apr 12 22:56:53 2019
@@ -19,6 +19,7 @@ import org.apache.xmlbeans.impl.schema.S
 import org.junit.Test;
 import scomp.common.BaseCase;
 
+import java.io.File;
 import java.util.Iterator;
 
 import static org.junit.Assert.assertEquals;
@@ -99,6 +100,7 @@ public class Final extends BaseCase {
             Parameters params = new Parameters();
             params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
             params.setInputXmls(xobj);
+            params.setClassesDir(new File("build/junit/" + getClass().getSimpleName()));
             XmlBeans.compileXmlBeans(params);
         }
         catch (XmlException xme) {

Modified: xmlbeans/branches/xmlbeans-536/test/src/xmlobject/checkin/InstanceValidationTests.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/xmlobject/checkin/InstanceValidationTests.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/xmlobject/checkin/InstanceValidationTests.java
(original)
+++ xmlbeans/branches/xmlbeans-536/test/src/xmlobject/checkin/InstanceValidationTests.java
Fri Apr 12 22:56:53 2019
@@ -16,6 +16,7 @@
 package xmlobject.checkin;
 
 import org.apache.xmlbeans.*;
+import org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler;
 import org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException;
 import org.junit.Test;
 import tools.util.JarUtil;
@@ -41,7 +42,11 @@ public class InstanceValidationTests {
             schemaDocs[i] = XmlObject.Factory.parse(schemas[i]);
         }
 
-        return XmlBeans.loadXsd(schemaDocs);
+        SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
+        params.setClassesDir(new File("build/junit/" + getClass().getSimpleName()));
+        params.setInputXmls(schemaDocs);
+
+        return XmlBeans.loadXsd(params);
     }
 
     private SchemaTypeLoader makeSchemaTypeLoader(File[] schemas) throws XmlException, IOException
{
@@ -51,7 +56,11 @@ public class InstanceValidationTests {
             schemaDocs[i] = XmlObject.Factory.parse(schemas[i], new XmlOptions().setLoadLineNumbers().setLoadMessageDigest());
         }
 
-        return XmlBeans.loadXsd(schemaDocs);
+        SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
+        params.setClassesDir(new File("build/junit/" + getClass().getSimpleName()));
+        params.setInputXmls(schemaDocs);
+
+        return XmlBeans.loadXsd(params);
     }
 
 

Modified: xmlbeans/branches/xmlbeans-536/test/src/xmlobject/checkin/SubstGroupTests.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/xmlobject/checkin/SubstGroupTests.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/xmlobject/checkin/SubstGroupTests.java (original)
+++ xmlbeans/branches/xmlbeans-536/test/src/xmlobject/checkin/SubstGroupTests.java Fri Apr
12 22:56:53 2019
@@ -16,6 +16,7 @@
 package xmlobject.checkin;
 
 import org.apache.xmlbeans.*;
+import org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler;
 import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;
 import org.junit.Test;
 import org.openuri.sgs.ADocument;
@@ -23,6 +24,8 @@ import org.openuri.sgs.BDocument;
 import org.openuri.sgs.CDocument;
 import org.openuri.sgs.RootDocument;
 
+import java.io.File;
+
 import static org.junit.Assert.*;
 
 public class SubstGroupTests {
@@ -176,10 +179,14 @@ public class SubstGroupTests {
         for (int i = 0; i < invalidSchemas.length; i++)
             schemas[i] = SchemaDocument.Factory.parse(invalidSchemas[i]);
 
+        SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
+        params.setClassesDir(new File("build/junit/" + getClass().getSimpleName()));
+
         // Now compile the invalid schemas, test that they fail
         for (int i = 0; i < schemas.length; i++) {
             try {
-                XmlBeans.loadXsd(new XmlObject[]{schemas[i]});
+                params.setInputXmls(schemas[i]);
+                XmlBeans.loadXsd(params);
                 fail("Schema should have failed to compile:\n" + invalidSchemas[i]);
             } catch (XmlException success) { /* System.out.println(success); */ }
         }
@@ -193,7 +200,8 @@ public class SubstGroupTests {
         // Now compile the valid schemas, test that they succeed
         for (int i = 0; i < schemas.length; i++) {
             try {
-                XmlBeans.loadXsd(new XmlObject[]{schemas[i]});
+                params.setInputXmls(schemas[i]);
+                XmlBeans.loadXsd(params);
             } catch (XmlException fail) {
                 fail("Failed to compile schema: " + schemas[i] + " with error: " + fail);
             }

Modified: xmlbeans/branches/xmlbeans-536/test/src/xmlobject/detailed/TestsFromBugs.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/xmlobject/detailed/TestsFromBugs.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/xmlobject/detailed/TestsFromBugs.java (original)
+++ xmlbeans/branches/xmlbeans-536/test/src/xmlobject/detailed/TestsFromBugs.java Fri Apr
12 22:56:53 2019
@@ -149,6 +149,7 @@ public class TestsFromBugs {
         params.setLinkTo(XmlBeans.getBuiltinTypeSystem());
         params.setInputXmls(schemas);
         params.setOptions(xOpt);
+        params.setClassesDir(new File("build/junit/"+getClass().getSimpleName()));
         SchemaTypeSystem sts = XmlBeans.compileXmlBeans(params);
 
         //ensure SchemaGlobalElement has getSourceName Method

Modified: xmlbeans/branches/xmlbeans-536/test/src/xmlobject/schematypes/checkin/EnumTests.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/xmlobject/schematypes/checkin/EnumTests.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/xmlobject/schematypes/checkin/EnumTests.java (original)
+++ xmlbeans/branches/xmlbeans-536/test/src/xmlobject/schematypes/checkin/EnumTests.java Fri
Apr 12 22:56:53 2019
@@ -23,9 +23,12 @@ import com.enumtest.StatusreportDocument
 import org.apache.xmlbeans.XmlBeans;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler;
 import org.junit.Test;
 import tools.util.JarUtil;
 
+import java.io.File;
+
 import static org.junit.Assert.assertEquals;
 
 
@@ -150,7 +153,11 @@ public class EnumTests {
 
         XmlObject xobj = XmlObject.Factory.parse(schema);
 
-        XmlBeans.loadXsd(new XmlObject[]{xobj});
+        SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
+        params.setClassesDir(new File("build/junit/" + getClass().getSimpleName()));
+        params.setInputXmls(xobj);
+
+        XmlBeans.loadXsd(params);
     }
 
 }

Modified: xmlbeans/branches/xmlbeans-536/test/src/xmlobject/schematypes/checkin/QNameTests.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/test/src/xmlobject/schematypes/checkin/QNameTests.java?rev=1857437&r1=1857436&r2=1857437&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/test/src/xmlobject/schematypes/checkin/QNameTests.java
(original)
+++ xmlbeans/branches/xmlbeans-536/test/src/xmlobject/schematypes/checkin/QNameTests.java
Fri Apr 12 22:56:53 2019
@@ -16,8 +16,11 @@
 package xmlobject.schematypes.checkin;
 
 import org.apache.xmlbeans.*;
+import org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler;
 import org.junit.Test;
 
+import java.io.File;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
@@ -36,9 +39,11 @@ public class QNameTests {
             "</xs:schema>\n" +
             "";
 
-        SchemaTypeLoader stl =
-            XmlBeans.loadXsd(new XmlObject[]{
-                XmlObject.Factory.parse(schema)});
+        SchemaTypeSystemCompiler.Parameters params = new SchemaTypeSystemCompiler.Parameters();
+        params.setClassesDir(new File("build/junit/" + getClass().getSimpleName()));
+        params.setInputXmls(XmlObject.Factory.parse(schema));
+
+        SchemaTypeLoader stl = XmlBeans.loadXsd(params);
 
         //
         // Test the set_XMLName function on XmlQNameImpl



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


Mime
View raw message