You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@locus.apache.org on 2000/09/19 02:27:53 UTC

cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java Main.java

stefano     00/09/18 17:27:53

  Modified:    src/org/apache/cocoon Tag: xml-cocoon2 Cocoon.java Main.java
  Log:
  added new classpath initialization
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.26  +19 -6     xml-cocoon/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.4.2.25
  retrieving revision 1.4.2.26
  diff -u -r1.4.2.25 -r1.4.2.26
  --- Cocoon.java	2000/09/16 00:18:51	1.4.2.25
  +++ Cocoon.java	2000/09/19 00:27:51	1.4.2.26
  @@ -41,7 +41,7 @@
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.4.2.25 $ $Date: 2000/09/16 00:18:51 $
  + * @version CVS $Revision: 1.4.2.26 $ $Date: 2000/09/19 00:27:51 $
    */
   public class Cocoon
     implements Component, Configurable, ComponentManager, Modifiable, Processor, Constants {
  @@ -66,7 +66,10 @@
       
       /** The root uri/path */
       private URL root = null;
  -        
  +
  +    /** The classpath (if available) */
  +    private String classpath = null;
  +            
       /**
        * Create a new <code>Cocoon</code> instance.
        */
  @@ -85,19 +88,21 @@
        * Create a new <code>Cocoon</code> object, parsing configuration from
        * the specified file.
        */
  -    public Cocoon(String configurationFile)
  +    public Cocoon(String configurationFile, String classpath)
       throws SAXException, IOException, ConfigurationException {
  -        this(new File(configurationFile).getCanonicalFile());
  +        this(new File(configurationFile).getCanonicalFile(), classpath);
       }
       
       /**
        * Create a new <code>Cocoon</code> object, parsing configuration from
        * the specified file.
        */
  -    public Cocoon(File configurationFile)
  +    public Cocoon(File configurationFile, String classpath)
       throws SAXException, IOException, ConfigurationException {
           this();
  -        
  +
  +        this.classpath = classpath;
  +                
           this.configurationFile = configurationFile;
           if (!configurationFile.isFile()) {
               throw new FileNotFoundException(configurationFile.toString());
  @@ -120,6 +125,14 @@
        */
       public void setRoot(URL root) {
           this.root = root;
  +    }
  +
  +    /**
  +     * Get the local classpath
  +     * @return the classpath available to this instance or null if not available.
  +     */
  +    public String getClasspath() {
  +        return this.classpath;
       }
   
       /**
  
  
  
  1.1.4.5   +2 -2      xml-cocoon/src/org/apache/cocoon/Attic/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Attic/Main.java,v
  retrieving revision 1.1.4.4
  retrieving revision 1.1.4.5
  diff -u -r1.1.4.4 -r1.1.4.5
  --- Main.java	2000/09/16 00:18:28	1.1.4.4
  +++ Main.java	2000/09/19 00:27:51	1.1.4.5
  @@ -32,7 +32,7 @@
    * Command line entry point.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1.4.4 $ $Date: 2000/09/16 00:18:28 $
  + * @version CVS $Revision: 1.1.4.5 $ $Date: 2000/09/19 00:27:51 $
    */
   
   public class Main {
  @@ -102,7 +102,7 @@
               File dest = getDestinationDir(destDir);
               File conf = getConfigurationFile(confFile);
               File root = conf.getParentFile();
  -            Main main = new Main(new Cocoon(conf), conf, dest);
  +            Main main = new Main(new Cocoon(conf, null), conf, dest);
               System.out.println("[main] Starting...");
               main.process(targets);
               System.out.println("[main] Done.");