xmlbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ce...@apache.org
Subject cvs commit: xml-xmlbeans/v1/src/xmlcomp/org/apache/xmlbeans/impl/tool CodeGenUtil.java
Date Tue, 20 Apr 2004 18:19:11 GMT
cezar       2004/04/20 11:19:11

  Modified:    v1/bin   dumpxsb dumpxsb.cmd scomp scomp.cmd scopy.cmd
                        sdownload.cmd sfactor.cmd validate validate.cmd
                        xpretty.cmd xsdtree.cmd xstc.cmd
               v1/src/xmlcomp/org/apache/xmlbeans/impl/tool
                        CodeGenUtil.java
  Log:
  Set classpath to work with binary distribution and warning message for javac.
  
  CR: Cliff
  DRT: passing
  
  Revision  Changes    Path
  1.4       +6 -1      xml-xmlbeans/v1/bin/dumpxsb
  
  Index: dumpxsb
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/bin/dumpxsb,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- dumpxsb	29 Jan 2004 03:38:11 -0000	1.3
  +++ dumpxsb	20 Apr 2004 18:19:11 -0000	1.4
  @@ -3,7 +3,12 @@
   #Prints the contents of an xsb file in human-readmble form
   
   cp=
  -cp=$cp:$XMLBEANS_HOME/build/ar/xbean.jar
  +
  +if [ -e $XMLBEANS_HOME/build/ar/xbean.jar ]; then
  +    cp=$cp:$XMLBEANS_HOME/build/ar/xbean.jar;
  +elif [ -e $XMLBEANS_HOME/lib/xbean.jar ]; then
  +    cp=$cp:$XMLBEANS_HOME/lib/xbean.jar;
  +fi
   
   case "`uname`" in
       CYGWIN*)
  
  
  
  1.2       +6 -1      xml-xmlbeans/v1/bin/dumpxsb.cmd
  
  Index: dumpxsb.cmd
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/bin/dumpxsb.cmd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- dumpxsb.cmd	15 Sep 2003 17:09:37 -0000	1.1
  +++ dumpxsb.cmd	20 Apr 2004 18:19:11 -0000	1.2
  @@ -7,7 +7,12 @@
   if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..)
   
   set cp=
  -set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar
  +
  +if EXIST %XMLBEANS_HOME%\build\ar\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar.
  +) else if EXIST %XMLBEANS_HOME%\lib\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\lib\xbean.jar.
  +)
   
   java -classpath %cp% org.apache.xmlbeans.impl.tool.XsbDumper %*
   
  
  
  
  1.4       +6 -1      xml-xmlbeans/v1/bin/scomp
  
  Index: scomp
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/bin/scomp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- scomp	23 Jan 2004 23:54:17 -0000	1.3
  +++ scomp	20 Apr 2004 18:19:11 -0000	1.4
  @@ -4,7 +4,12 @@
   #Builds XBean types from xsd files.
   
   cp=
  -cp=$cp:$XMLBEANS_HOME/build/ar/xbean.jar
  +
  +if [ -e $XMLBEANS_HOME/build/ar/xbean.jar ]; then
  +    cp=$cp:$XMLBEANS_HOME/build/ar/xbean.jar;
  +elif [ -e $XMLBEANS_HOME/lib/xbean.jar ]; then
  +    cp=$cp:$XMLBEANS_HOME/lib/xbean.jar;
  +fi
   
   case "`uname`" in
       CYGWIN*)
  
  
  
  1.2       +6 -1      xml-xmlbeans/v1/bin/scomp.cmd
  
  Index: scomp.cmd
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/bin/scomp.cmd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- scomp.cmd	15 Sep 2003 17:09:37 -0000	1.1
  +++ scomp.cmd	20 Apr 2004 18:19:11 -0000	1.2
  @@ -8,7 +8,12 @@
   if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..)
   
   set cp=
  -set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar
  +
  +if EXIST %XMLBEANS_HOME%\build\ar\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar.
  +) else if EXIST %XMLBEANS_HOME%\lib\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\lib\xbean.jar.
  +)
   
   java -classpath %cp% org.apache.xmlbeans.impl.tool.SchemaCompiler %*
   
  
  
  
  1.2       +6 -1      xml-xmlbeans/v1/bin/scopy.cmd
  
  Index: scopy.cmd
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/bin/scopy.cmd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- scopy.cmd	15 Sep 2003 17:09:37 -0000	1.1
  +++ scopy.cmd	20 Apr 2004 18:19:11 -0000	1.2
  @@ -8,7 +8,12 @@
   if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..)
   
   set cp=
  -set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar
  +
  +if EXIST %XMLBEANS_HOME%\build\ar\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar.
  +) else if EXIST %XMLBEANS_HOME%\lib\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\lib\xbean.jar.
  +)
   
   java -classpath %cp% org.apache.xmlbeans.impl.tool.SchemaCopy %*
   
  
  
  
  1.2       +6 -1      xml-xmlbeans/v1/bin/sdownload.cmd
  
  Index: sdownload.cmd
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/bin/sdownload.cmd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sdownload.cmd	15 Sep 2003 17:09:37 -0000	1.1
  +++ sdownload.cmd	20 Apr 2004 18:19:11 -0000	1.2
  @@ -8,7 +8,12 @@
   if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..)
   
   set cp=
  -set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar
  +
  +if EXIST %XMLBEANS_HOME%\build\ar\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar.
  +) else if EXIST %XMLBEANS_HOME%\lib\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\lib\xbean.jar.
  +)
   
   java -classpath %cp% org.apache.xmlbeans.impl.tool.SchemaResourceManager %*
   
  
  
  
  1.2       +6 -1      xml-xmlbeans/v1/bin/sfactor.cmd
  
  Index: sfactor.cmd
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/bin/sfactor.cmd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sfactor.cmd	15 Sep 2003 17:09:37 -0000	1.1
  +++ sfactor.cmd	20 Apr 2004 18:19:11 -0000	1.2
  @@ -8,7 +8,12 @@
   if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..)
   
   set cp=
  -set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar
  +
  +if EXIST %XMLBEANS_HOME%\build\ar\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar.
  +) else if EXIST %XMLBEANS_HOME%\lib\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\lib\xbean.jar.
  +)
   
   java -classpath %cp% org.apache.xmlbeans.impl.tool.FactorImports %*
   
  
  
  
  1.4       +6 -1      xml-xmlbeans/v1/bin/validate
  
  Index: validate
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/bin/validate,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- validate	10 Feb 2004 22:15:48 -0000	1.3
  +++ validate	20 Apr 2004 18:19:11 -0000	1.4
  @@ -5,7 +5,12 @@
   # Validates an instance against a schema.
   
   CP=
  -CP=$CP:$XMLBEANS_HOME/build/ar/xbean.jar
  +
  +if [ -e $XMLBEANS_HOME/build/ar/xbean.jar ]; then
  +    cp=$cp:$XMLBEANS_HOME/build/ar/xbean.jar;
  +elif [ -e $XMLBEANS_HOME/lib/xbean.jar ]; then
  +    cp=$cp:$XMLBEANS_HOME/lib/xbean.jar;
  +fi
   
   case "`uname`" in
       CYGWIN*)
  
  
  
  1.2       +6 -1      xml-xmlbeans/v1/bin/validate.cmd
  
  Index: validate.cmd
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/bin/validate.cmd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- validate.cmd	15 Sep 2003 17:09:37 -0000	1.1
  +++ validate.cmd	20 Apr 2004 18:19:11 -0000	1.2
  @@ -8,7 +8,12 @@
   if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..)
   
   set cp=
  -set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar
  +
  +if EXIST %XMLBEANS_HOME%\build\ar\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar.
  +) else if EXIST %XMLBEANS_HOME%\lib\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\lib\xbean.jar.
  +)
   
   java -classpath %cp% org.apache.xmlbeans.impl.tool.InstanceValidator %*
   
  
  
  
  1.2       +6 -1      xml-xmlbeans/v1/bin/xpretty.cmd
  
  Index: xpretty.cmd
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/bin/xpretty.cmd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- xpretty.cmd	15 Sep 2003 17:09:37 -0000	1.1
  +++ xpretty.cmd	20 Apr 2004 18:19:11 -0000	1.2
  @@ -6,6 +6,11 @@
   if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..)
   
   set cp=
  -set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar
  +
  +if EXIST %XMLBEANS_HOME%\build\ar\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar.
  +) else if EXIST %XMLBEANS_HOME%\lib\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\lib\xbean.jar.
  +)
   
   java -classpath %cp% org.apache.xmlbeans.impl.tool.PrettyPrinter %*
  
  
  
  1.2       +6 -1      xml-xmlbeans/v1/bin/xsdtree.cmd
  
  Index: xsdtree.cmd
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/bin/xsdtree.cmd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- xsdtree.cmd	15 Sep 2003 17:09:37 -0000	1.1
  +++ xsdtree.cmd	20 Apr 2004 18:19:11 -0000	1.2
  @@ -6,6 +6,11 @@
   if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..)
   
   set cp=
  -set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar
  +
  +if EXIST %XMLBEANS_HOME%\build\ar\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar.
  +) else if EXIST %XMLBEANS_HOME%\lib\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\lib\xbean.jar.
  +)
   
   java -classpath %cp% org.apache.xmlbeans.impl.tool.TypeHierarchyPrinter %*
  
  
  
  1.2       +6 -1      xml-xmlbeans/v1/bin/xstc.cmd
  
  Index: xstc.cmd
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/bin/xstc.cmd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- xstc.cmd	15 Sep 2003 17:09:37 -0000	1.1
  +++ xstc.cmd	20 Apr 2004 18:19:11 -0000	1.2
  @@ -6,6 +6,11 @@
   if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..)
   
   set cp=
  -set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar
  +
  +if EXIST %XMLBEANS_HOME%\build\ar\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar.
  +) else if EXIST %XMLBEANS_HOME%\lib\xbean.jar. (
  +    set cp=%cp%;%XMLBEANS_HOME%\lib\xbean.jar.
  +)
   
   java -classpath %cp% org.apache.xmlbeans.impl.tool.XSTCTester %*
  
  
  
  1.5       +4 -0      xml-xmlbeans/v1/src/xmlcomp/org/apache/xmlbeans/impl/tool/CodeGenUtil.java
  
  Index: CodeGenUtil.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v1/src/xmlcomp/org/apache/xmlbeans/impl/tool/CodeGenUtil.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CodeGenUtil.java	12 Feb 2004 20:06:00 -0000	1.4
  +++ CodeGenUtil.java	20 Apr 2004 18:19:11 -0000	1.5
  @@ -25,6 +25,7 @@
   import java.io.InputStreamReader;
   import java.io.FileFilter;
   import java.io.FileWriter;
  +import java.io.IOException;
   import java.net.URI;
   import java.net.URISyntaxException;
   
  @@ -241,6 +242,9 @@
           }
           catch (Throwable e)
           {
  +            if ( e instanceof IOException )
  +                System.err.println("'javac' is required on the path.");
  +
               System.err.println(e.toString());
               System.err.println(e.getCause());
               e.printStackTrace(System.err);
  
  
  

---------------------------------------------------------------------
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