jakarta-alexandria-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sand...@apache.org
Subject cvs commit: jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/om Project.java Workspace.java
Date Sun, 03 Feb 2002 04:25:57 GMT
sanders     02/02/02 20:25:57

  Modified:    proposal/vindico TODO.txt
               proposal/vindico/src/java/org/apache/alexandria/ant
                        XMLListener.java
               proposal/vindico/src/java/org/apache/alexandria/om
                        Project.java Workspace.java
  Log:
  That's it for tonight.  I get an NPE trying to open the XML log
  file, but everything compiles.  I will come back tomorrow.
  
  Revision  Changes    Path
  1.2       +4 -0      jakarta-alexandria/proposal/vindico/TODO.txt
  
  Index: TODO.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/proposal/vindico/TODO.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TODO.txt	3 Feb 2002 03:31:49 -0000	1.1
  +++ TODO.txt	3 Feb 2002 04:25:57 -0000	1.2
  @@ -11,4 +11,8 @@
   * XMLHelper needs to do something with the IOExceptions that it swallows.  But
     what should it do with them?
   
  +* Can we clean up the XMLListener/XMLHelper combo and get them submitted to Ant.
  +  They are *much* faster and less memory intensive than Ant's DOM-based XML
  +  logger.
  +
   *
  
  
  
  1.3       +5 -5      jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/ant/XMLListener.java
  
  Index: XMLListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/ant/XMLListener.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLListener.java	3 Feb 2002 03:24:08 -0000	1.2
  +++ XMLListener.java	3 Feb 2002 04:25:57 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/ant/XMLListener.java,v
1.2 2002/02/03 03:24:08 sanders Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/02/03 03:24:08 $
  + * $Header: /home/cvs/jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/ant/XMLListener.java,v
1.3 2002/02/03 04:25:57 sanders Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/02/03 04:25:57 $
    *
    * ====================================================================
    *
  @@ -79,7 +79,7 @@
    * XMLListener provides ...
    *
    * @author <a href="mailto:sanders@apache.org">Scott Sanders</a>
  - * @version $Revision: 1.2 $ $Date: 2002/02/03 03:24:08 $
  + * @version $Revision: 1.3 $ $Date: 2002/02/03 04:25:57 $
    */
   public class XMLListener implements BuildListener {
   
  @@ -149,7 +149,7 @@
       public void buildStarted(BuildEvent event) {
           startTime = System.currentTimeMillis();
           try {
  -            writer = new FileWriter(event.getProject().getProperty("vindico.log.file"));
  +            writer = new FileWriter(System.getProperty("vindico.log.file"));
           } catch (IOException e) {
               throw new RuntimeException("Could not create log file");
           }
  
  
  
  1.9       +30 -4     jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/om/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/om/Project.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Project.java	3 Feb 2002 03:25:06 -0000	1.8
  +++ Project.java	3 Feb 2002 04:25:57 -0000	1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/om/Project.java,v
1.8 2002/02/03 03:25:06 sanders Exp $
  - * $Revision: 1.8 $
  - * $Date: 2002/02/03 03:25:06 $
  + * $Header: /home/cvs/jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/om/Project.java,v
1.9 2002/02/03 04:25:57 sanders Exp $
  + * $Revision: 1.9 $
  + * $Date: 2002/02/03 04:25:57 $
    *
    * ====================================================================
    *
  @@ -73,7 +73,7 @@
    * Project provides ...
    *
    * @author <a href="mailto:sanders@apache.org">Scott Sanders</a>
  - * @version $Revision: 1.8 $ $Date: 2002/02/03 03:25:06 $
  + * @version $Revision: 1.9 $ $Date: 2002/02/03 04:25:57 $
    */
   public class Project {
   
  @@ -348,4 +348,30 @@
           helper.popElement();
       }
   
  +    public void addDependenciesToClasspath(XMLHelper helper) {
  +        Iterator iter = dependencies.values().iterator();
  +        while (iter.hasNext()) {
  +            String project = (String) iter.next();
  +            Project proj = getParentWorkspace().getProject(project);
  +            if (proj != null) {
  +                helper.comment(project + " dependencies");
  +                proj.addJarsToClasspath(helper);
  +            }
  +        }
  +    }
  +
  +    public void addJarsToClasspath(XMLHelper helper) {
  +        Iterator iter = jars.values().iterator();
  +        while (iter.hasNext()) {
  +            Jar jar = (Jar) iter.next();
  +            String location = getParentWorkspace().getBuildPath() + "/" + name;
  +            if (home != null) {
  +                location += "/" + home.getNested();
  +            }
  +            location += "/" + jar.getName();
  +            helper.attribute("location", location);
  +            helper.element("pathelement", true);
  +        }
  +
  +    }
   }
  
  
  
  1.10      +10 -6     jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/om/Workspace.java
  
  Index: Workspace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/om/Workspace.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Workspace.java	3 Feb 2002 03:39:06 -0000	1.9
  +++ Workspace.java	3 Feb 2002 04:25:57 -0000	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/om/Workspace.java,v
1.9 2002/02/03 03:39:06 sanders Exp $
  - * $Revision: 1.9 $
  - * $Date: 2002/02/03 03:39:06 $
  + * $Header: /home/cvs/jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/om/Workspace.java,v
1.10 2002/02/03 04:25:57 sanders Exp $
  + * $Revision: 1.10 $
  + * $Date: 2002/02/03 04:25:57 $
    *
    * ====================================================================
    *
  @@ -73,7 +73,7 @@
    * Represents ...
    *
    * @author Scott Sanders
  - * @version $Revision: 1.9 $ $Date: 2002/02/03 03:39:06 $
  + * @version $Revision: 1.10 $ $Date: 2002/02/03 04:25:57 $
    */
   public class Workspace {
   
  @@ -119,6 +119,10 @@
           this.pkgdir = pkgdir;
       }
   
  +    public String getBuildPath() {
  +        return buildPath;
  +    }
  +
       public String getVersion() {
           return version;
       }
  @@ -236,7 +240,7 @@
                   helper.attribute("antfile", "build-" + projectName + ".xml");
                   helper.attribute("target", "cvs-" + projectName);
                   helper.attribute("output", logPath + "/" + project.getName() + "-cvs.txt");
  -                helper.attribute("inheritAll", "true");
  +                helper.attribute("inheritAll", "false");
                   helper.element("ant");
                   helper.comment("From project: " + cvs.getParentProject().getName());
                   helper.popElement();
  @@ -259,7 +263,7 @@
                           helper.attribute("antfile", "build-" + projectName + ".xml");
                           helper.attribute("target", "build-" + projectName);
                           helper.attribute("output", logPath + "/" + project.getName() +
"-build.txt");
  -                        helper.attribute("inheritAll", "true");
  +                        helper.attribute("inheritAll", "false");
                           helper.element("ant");
                           if (project.getParentModule() != null) {
                               helper.comment("From module: " + project.getParentModule().getName());
  
  
  

--
To unsubscribe, e-mail:   <mailto:alexandria-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:alexandria-dev-help@jakarta.apache.org>


Mime
View raw message