cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon2/webapp cocoon.xconf
Date Mon, 10 Sep 2001 18:28:03 GMT
dims        01/09/10 11:28:03

  Modified:    src/org/apache/cocoon/components/language/programming/java
                        JavaLanguage.java Javac.java
               webapp   cocoon.xconf
  Log:
  - Add boot class path so that Jikes can work out of the box.
  - One more try/catch when parsing compiler errors.
  
  Revision  Changes    Path
  1.8       +3 -1      xml-cocoon2/src/org/apache/cocoon/components/language/programming/java/JavaLanguage.java
  
  Index: JavaLanguage.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/language/programming/java/JavaLanguage.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JavaLanguage.java	2001/08/29 17:26:41	1.7
  +++ JavaLanguage.java	2001/09/10 18:28:03	1.8
  @@ -31,7 +31,7 @@
    * The Java programming language processor
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.7 $ $Date: 2001/08/29 17:26:41 $
  + * @version CVS $Revision: 1.8 $ $Date: 2001/09/10 18:28:03 $
    */
   public class JavaLanguage extends CompiledProgrammingLanguage implements ThreadSafe, Composable,
Disposable {
   
  @@ -158,6 +158,7 @@
   
         compiler.setDestination(baseDirectory.getCanonicalPath());
   
  +      String systemBootClasspath = System.getProperty("sun.boot.class.path");
         String systemClasspath = System.getProperty("java.class.path");
         String systemExtDirs = System.getProperty("java.ext.dirs");
         String systemExtClasspath = null;
  @@ -171,6 +172,7 @@
         compiler.setClasspath(
           baseDirectory.getCanonicalPath() +
           ((classpath != null) ? File.pathSeparator + classpath : "") +
  +        ((systemBootClasspath != null) ? File.pathSeparator + systemBootClasspath : "")
+
           ((systemClasspath != null) ? File.pathSeparator + systemClasspath : "") +
           ((systemExtClasspath != null) ? File.pathSeparator + systemExtClasspath : "")
         );
  
  
  
  1.7       +7 -5      xml-cocoon2/src/org/apache/cocoon/components/language/programming/java/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/language/programming/java/Javac.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Javac.java	2001/09/04 15:14:24	1.6
  +++ Javac.java	2001/09/10 18:28:03	1.7
  @@ -26,7 +26,7 @@
    * This class wraps the Sun's Javac Compiler.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.6 $ $Date: 2001/09/04 15:14:24 $
  + * @version $Revision: 1.7 $ $Date: 2001/09/10 18:28:03 $
    * @since 2.0
    */
   
  @@ -140,8 +140,9 @@
         int endcolumn = context.indexOf(" ", startcolumn);
         if (endcolumn == -1) endcolumn = context.length();
         return new CompilerError(file, false, line, startcolumn, line, endcolumn, message);
  -    }
  -    catch(NoSuchElementException nse) {
  +    } catch(NoSuchElementException nse) {
  +      return new CompilerError("no more tokens - could not parse error message: " + error);
  +    } catch(Exception nse) {
         return new CompilerError("could not parse error message: " + error);
       }
     }
  @@ -207,8 +208,9 @@
         if (endcolumn == -1) endcolumn = context.length();
   
         return new CompilerError(srcDir + File.separator + file, true, line, startcolumn,
line, endcolumn, message);
  -    }
  -    catch(NoSuchElementException nse) {
  +    } catch(NoSuchElementException nse) {
  +      return new CompilerError("no more tokens - could not parse error message: " + error);
  +    } catch(Exception nse) {
         return new CompilerError("could not parse error message: " + error);
       }
     }
  
  
  
  1.33      +1 -2      xml-cocoon2/webapp/cocoon.xconf
  
  Index: cocoon.xconf
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/webapp/cocoon.xconf,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- cocoon.xconf	2001/09/07 14:30:10	1.32
  +++ cocoon.xconf	2001/09/10 18:28:03	1.33
  @@ -115,8 +115,7 @@
         <!-- compiler parameter specifies which class to use to compile Java.
              Possible variants are Javac and Jikes compilers.
              Javac requires javac.jar (included with Cocoon distribution).
  -           Jikes requires IBM jikes compiler installed and rt.jar from
  -           JRE in the classpath environment variable. -->
  +           Jikes requires IBM jikes compiler to be present in the PATH  -->
         <parameter name="compiler" value="org.apache.cocoon.components.language.programming.java.Javac"/>
         <!-- Specifies which formatter to use to format source code.
              This parameter is optional. -->
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message