xmlbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z...@apache.org
Subject cvs commit: xml-xmlbeans/v2/src/xmlcomp/org/apache/xmlbeans/impl/tool SchemaCodeGenerator.java SchemaCompiler.java
Date Thu, 05 Feb 2004 23:55:54 GMT
zieg        2004/02/05 15:55:54

  Modified:    v2       build.xml
               v2/src/xmlcomp/org/apache/xmlbeans/impl/tool
                        SchemaCodeGenerator.java SchemaCompiler.java
  Removed:     v2/bin   jaxbc.cmd
               v2/src/jaxb/org/apache/xmlbeans/impl/jaxb/compiler
                        ComponentInfo.java ElementInfo.java
                        JaxbCodeGenerator.java JaxbCodePrinter.java
                        JaxbJavaizer.java PackageInfo.java TypeInfo.java
               v2/src/jaxb/org/apache/xmlbeans/impl/jaxb/runtime
                        ContextImpl.java DatatypeConverterImpl.java
                        MarshallerImpl.java NamespaceContextWrapper.java
                        UnmarshallerImpl.java
                        ValidationLocatorEventImpl.java ValidatorImpl.java
               v2/src/jaxb/schema jaxbconfig.xsd jaxbconfig.xsdconfig
  Log:
  remove dead jaxb code
  
  Revision  Changes    Path
  1.30      +0 -39     xml-xmlbeans/v2/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/build.xml,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- build.xml	29 Jan 2004 03:38:11 -0000	1.29
  +++ build.xml	5 Feb 2004 23:55:54 -0000	1.30
  @@ -635,45 +635,6 @@
       </jar>
     </target>
   
  -  <!-- jaxb target =================================================== -->
  -
  -  <path id="jaxb.compile.path">
  -    <pathelement location="external/lib/jaxb-1.0/jaxb-api.jar"/>
  -    <pathelement location="build/classes/xmlpublic"/>
  -    <pathelement location="build/classes/typeimpl"/>
  -    <pathelement location="build/classes/common"/>
  -    <pathelement location="build/classes/typestore"/>
  -    <pathelement location="build/classes/xmlinputstream"/>
  -    <pathelement location="build/classes/jaxbschema"/>
  -  </path>
  -
  -    <target name="jaxbschema.check">
  -        <condition property="jaxbschema.notRequired">
  -            <uptodate property="jaxbschema.notRequired" targetfile="build/classes/jaxbschema/schema/system/JAXBCONFIG/index.xsb">
  -                <srcfiles dir="src/jaxb/schema" includes="**/*.xsd;**/*.xsdconfig"/>
  -            </uptodate>
  -        </condition>
  -    </target>
  -
  -    <target name="jaxbschema.classes" depends="jaxbschema.check, xmlpublic.classes,
typeimpl.classes, common.classes, typestore.classes, xmlinputstream.classes" unless="jaxbschema.notRequired">
  -        <delete dir="build/classes/jaxbschema"/>
  -        <delete dir="build/src/jaxbschema"/>
  -        <java classname="${bootstrap_schema_compiler}" classpathref="bootstrap.run.path"
fork="true" failonerror="true">
  -            <jvmarg value="-ea"/>
  -            <arg line="${repackage_arg} -name JAXBCONFIG -cp ${bootstrap.compile.path}
-srconly -d build/classes/jaxbschema -src build/src/jaxbschema src/jaxb/schema"/>
  -        </java>
  -    </target>
  -
  -    <target name="jaxb.classes" depends="dirs, jaxbschema.classes, xmlpublic.classes,
typeimpl.classes, common.classes, typestore.classes, xmlinputstream.classes">
  -        <mkdir dir="build/src/jaxb"/>
  -        <mkdir dir="build/classes/jaxb"/>
  -
  -        <javac destdir="build/classes/jaxb" classpathref="jaxb.compile.path" source="1.4"
debug="on">
  -            <src path="src/jaxb"/>
  -            <src path="build/src/jaxbschema"/>
  -        </javac>
  -    </target>
  -
     <!-- build XMLInputStream interface =============================================
-->
   
     <target name="xmlinputstream.classes" depends="dirs">
  
  
  
  1.3       +2 -47     xml-xmlbeans/v2/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCodeGenerator.java
  
  Index: SchemaCodeGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCodeGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SchemaCodeGenerator.java	16 Dec 2003 22:00:50 -0000	1.2
  +++ SchemaCodeGenerator.java	5 Feb 2004 23:55:54 -0000	1.3
  @@ -67,8 +67,6 @@
   import java.io.IOException;
   import java.io.StringWriter;
   import java.io.Writer;
  -import java.lang.reflect.InvocationTargetException;
  -import java.lang.reflect.Method;
   import java.util.ArrayList;
   import java.util.Arrays;
   import java.util.HashSet;
  @@ -83,7 +81,7 @@
       // todo: output jar
       public static boolean compileTypeSystem(SchemaTypeSystem saver, File sourcedir, File[]
javasrc,
            Map sourcesToCopyMap, File[] classpath, File classesdir, File outputJar, boolean
nojavac,
  -         boolean jaxb, XmlErrorWatcher errors, String repackage, boolean verbose, List
sourcefiles,
  +         XmlErrorWatcher errors, String repackage, boolean verbose, List sourcefiles,
            File schemasDir)
       {
   
  @@ -153,10 +151,7 @@
               failure = true;
           }
   
  -        if (! jaxb)
  -            failure &= genTypes(saver, sourcefiles, sourcedir, repackager, verbose);
  -        else
  -            failure &= jaxbCodeGenerator(saver, sourcefiles, sourcedir, classesdir,
errors);
  +        failure &= genTypes(saver, sourcefiles, sourcedir, repackager, verbose);
   
           if (failure)
               return false;
  @@ -255,46 +250,6 @@
           }
   
           return failure;
  -    }
  -
  -    private static class JaxbCodeGeneratorHolder
  -    {
  -        private static final Method _jaxbCodeGeneratorMethod = buildJaxbCodeGeneratorMethod();
  -    
  -        private static Method buildJaxbCodeGeneratorMethod()
  -        {
  -            try
  -            {
  -                return Class.forName("org.apache.xmlbeans.impl.jaxb.compiler.JaxbCodeGenerator",
false, SchemaCodeGenerator.class.getClassLoader())
  -                    .getMethod("compile", new Class[] {SchemaTypeSystem.class, List.class,
File.class, File.class, XmlErrorWatcher.class });
  -            }
  -            catch (Exception e)
  -            {
  -                IllegalStateException e2 =  new IllegalStateException("Cannot load JaxbCodeGenerator:
verify that xbean.jar is on the classpath");
  -                e2.initCause(e);
  -                throw e2;
  -            }
  -        }
  -    }
  -
  -    private static boolean jaxbCodeGenerator(SchemaTypeSystem saver, List sourcefiles,
File sourcedir, File classesdir, XmlErrorWatcher errors)
  -    {
  -        try
  -        {
  -            return ((Boolean)JaxbCodeGeneratorHolder._jaxbCodeGeneratorMethod.invoke(null,
new Object[] { saver, sourcefiles, sourcedir, classesdir, errors })).booleanValue();
  -        }
  -        catch (InvocationTargetException e)
  -        {
  -            IllegalStateException e2 = new IllegalStateException(e.getMessage());
  -            e2.initCause(e);
  -            throw e2;
  -        }
  -        catch (IllegalAccessException e)
  -        {
  -            IllegalStateException e2 = new IllegalStateException(e.getMessage());
  -            e2.initCause(e);
  -            throw e2;
  -        }
       }
   
       protected static File createTempDir() throws IOException
  
  
  
  1.4       +1 -16     xml-xmlbeans/v2/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java
  
  Index: SchemaCompiler.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SchemaCompiler.java	16 Dec 2003 22:00:50 -0000	1.3
  +++ SchemaCompiler.java	5 Feb 2004 23:55:54 -0000	1.4
  @@ -164,7 +164,6 @@
           boolean noAnn = (cl.getOpt("noann") != null);
           boolean nojavac = (cl.getOpt("srconly") != null);
           boolean debug = (cl.getOpt("debug") != null);
  -        boolean jaxb = (cl.getOpt("jaxb") != null);
   
           String allowmdef = cl.getOpt("allowmdef");
           Set mdefNamespaces = (allowmdef == null ? Collections.EMPTY_SET :
  @@ -309,7 +308,6 @@
           params.setErrorListener(err);
           params.setRepackage(repackage);
           params.setExtensions(extensions);
  -        params.setJaxb(jaxb);
           params.setMdefNamespaces(mdefNamespaces);
           params.setCatalogFile(catString);
   
  @@ -351,7 +349,6 @@
           private boolean debug;
           private String repackage;
           private List extensions = Collections.EMPTY_LIST;
  -        private boolean jaxb;
           private Set mdefNamespaces = Collections.EMPTY_SET;
           private String catalogFile;
   
  @@ -575,17 +572,6 @@
               this.jar = jar;
           }
   
  -
  -        public void setJaxb(boolean jaxb)
  -        {
  -            this.jaxb = jaxb;
  -        }
  -
  -        public boolean getJaxb()
  -        {
  -            return this.jaxb;
  -        }
  -
           public Collection getErrorListener()
           {
               return errorListener;
  @@ -838,7 +824,6 @@
           Collection outerErrorListener = params.getErrorListener();
           String repackage = params.getRepackage();
           List extensions = params.getExtensions();
  -        boolean jaxb = params.getJaxb();
           Set mdefNamespaces = params.getMdefNamespaces();
   
           EntityResolver cmdLineEntRes = ResolverUtil.resolverForCatalog(params.getCatalogFile());
  @@ -882,7 +867,7 @@
               // generate source and .xsb
               List sourcefiles = new ArrayList();
               result &= SchemaCodeGenerator.compileTypeSystem(system, srcDir, javaFiles,
sourcesToCopyMap,
  -                classpath, classesDir, outputJar, nojavac, jaxb, errorListener, repackage,
verbose,
  +                classpath, classesDir, outputJar, nojavac, errorListener, repackage, verbose,
                   sourcefiles, schemasDir);
               result &= !errorListener.hasError();
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org


Mime
View raw message