You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by du...@locus.apache.org on 2000/12/07 21:36:22 UTC

cvs commit: jakarta-ant/proposal/anteater/source/main/org/apache/ant TaskManager.java Ant.java TaskClassLoader.java

duncan      00/12/07 12:36:19

  Modified:    proposal/anteater/bootstrap Bootstrap2.java
               proposal/anteater/source/coretasks/echo taskdef.properties
               proposal/anteater/source/main/org/apache/ant Ant.java
  Added:       proposal/anteater/source/main/org/apache/ant
                        TaskManager.java
  Removed:     proposal/anteater/source/main/org/apache/ant
                        TaskClassLoader.java
  Log:
  Changed task loading to use a centralized TaskManager that keeps tabs on
  all classes.
  
  Revision  Changes    Path
  1.2       +25 -9     jakarta-ant/proposal/anteater/bootstrap/Bootstrap2.java
  
  Index: Bootstrap2.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/anteater/bootstrap/Bootstrap2.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Bootstrap2.java	2000/12/06 18:26:14	1.1
  +++ Bootstrap2.java	2000/12/07 20:35:30	1.2
  @@ -4,6 +4,7 @@
   
   import java.io.*;
   import java.util.*;
  +import java.util.jar.*;
   import java.util.zip.*;
   
   /**
  @@ -161,31 +162,46 @@
       private static void jarDir(File dir, File jarfile) throws IOException {
           String[] files = dir.list();
           if (files.length > 0) {
  -            System.out.println("Jaring: " + jarfile);
  +            System.out.println("Jaring: " + jarfile);        
  +            
               FileOutputStream fos = new FileOutputStream(jarfile);
  -            ZipOutputStream zos = new ZipOutputStream(fos);
  -            jarDir(dir, "", zos);
  -            zos.close();      
  +            JarOutputStream jos = new JarOutputStream(fos, new Manifest());
  +            jarDir(dir, "", jos);
  +            jos.close();      
           }
       }
       
  -    private static void jarDir(File dir, String prefix, ZipOutputStream zos) throws 
  +    private static void jarDir(File dir, String prefix, JarOutputStream jos) throws 
           IOException 
       {
           String[] files = dir.list();
           for (int i = 0; i < files.length; i++) {
               File f = new File(dir, files[i]);
               if (f.isDirectory()) {
  -                jarDir(f, prefix + "/" + files[i], zos);
  +                String zipEntryName;
  +                if (!prefix.equals("")) {
  +                    zipEntryName = prefix + "/" + files[i];
  +                } else {
  +                    zipEntryName = files[i];
  +                }
  +                ZipEntry ze = new ZipEntry(zipEntryName);
  +                jos.putNextEntry(ze);
  +                jarDir(f, zipEntryName, jos);
               } else {
  -                ZipEntry ze = new ZipEntry(prefix + "/" + files[i]);
  -                zos.putNextEntry(ze);
  +                String zipEntryName;
  +                if (!prefix.equals("")) {
  +                    zipEntryName = prefix + "/" + files[i];
  +                } else {
  +                    zipEntryName = files[i];
  +                }
  +                ZipEntry ze = new ZipEntry(zipEntryName);
  +                jos.putNextEntry(ze);
                   FileInputStream fis = new FileInputStream(f);
                   int count = 0;
                   byte[] buf = new byte[8 * 1024];
                   count = fis.read(buf, 0, buf.length);
                   while (count != -1) {
  -                    zos.write(buf, 0, count);
  +                    jos.write(buf, 0, count);
                       count = fis.read(buf, 0, buf.length);
                   }
                   fis.close();
  
  
  
  1.2       +1 -1      jakarta-ant/proposal/anteater/source/coretasks/echo/taskdef.properties
  
  Index: taskdef.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/anteater/source/coretasks/echo/taskdef.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- taskdef.properties	2000/12/06 08:08:33	1.1
  +++ taskdef.properties	2000/12/07 20:36:05	1.2
  @@ -1,4 +1,4 @@
   # taskdef.properties for Echo task
   
   tasks=echo
  -echo.class=org.apache.ant.echo.EchoTask
  \ No newline at end of file
  +task.echo.class=org.apache.ant.echo.EchoTask
  \ No newline at end of file
  
  
  
  1.2       +24 -77    jakarta-ant/proposal/anteater/source/main/org/apache/ant/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/anteater/source/main/org/apache/ant/Ant.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Ant.java	2000/12/06 08:08:35	1.1
  +++ Ant.java	2000/12/07 20:36:11	1.2
  @@ -28,16 +28,21 @@
       /**
        *
        */
  -    private Vector taskPathNodes = new Vector();
  +    private File buildfile;
       
       /**
  -     *
  +     * Manager of tasks.
        */
  -    private File buildfile;
  +    private TaskManager taskManager = new TaskManager();
       
       /**
        *
        */
  +    private Vector taskPathNodes = new Vector();
  +
  +    /**
  +     *
  +     */
       private Project project;
       
       // -----------------------------------------------------------------
  @@ -61,18 +66,13 @@
        */   
       public void addTaskPathNode(File node) {
           taskPathNodes.insertElementAt(node, 0);
  +        taskManager.addTaskPathNode(node);
       }
       
       /**
        *
        */
       public void buildTarget(String targetName) throws AntException {
  -    
  -        try {
  -            loadTasks();
  -        } catch (IOException ioe) {
  -            throw new AntException(ioe.getMessage());
  -        }
           
           Target target = project.getTarget(targetName);
           
  @@ -81,24 +81,18 @@
           Enumeration enum = target.getTasks().elements();
           while (enum.hasMoreElements()) {
               Task task = (Task)enum.nextElement();
  -            Object o = abstractTaskClasses.get(task.getType());
  -            if (o != null) {
  -                Class c = (Class)o;
  -                try {
  -                    AbstractTask aTask = (AbstractTask)c.newInstance();
  -                    aTask.setAttributes(task.getAttributes());
  -                    aTask.setProject(project);
  -                    boolean b = aTask.execute();
  -                    if (!b) {
  -                        throw new AntException("STOP: Task " + task + 
  -                                               " did not succeed");
  -                    }
  -                } catch (Exception e) {
  -                    // XXX yes yes yes, this shouldn't be a catch all...
  -                    throw new AntException("ERR: " + e);
  +            AbstractTask aTask = taskManager.getTaskInstance(task.getType());
  +            try {
  +                aTask.setProject(project);
  +                aTask.setAttributes(task.getAttributes());
  +                boolean b = aTask.execute();
  +                if (!b) {
  +                    throw new AntException("STOP: Task " + task + 
  +                                            " did not succeed");
                   }
  -            } else {
  -                throw new AntException("Don't have a class for task type: " + task);
  +            } catch (Exception e) {
  +                // XXX yes yes yes, this shouldn't be a catch all...
  +                throw new AntException("ERR: " + e);
               }
           }
       }
  @@ -148,53 +142,6 @@
       // ----------------------------------------------------------------- 
       
       /**
  -     * Searches through the taskpath and loads up the taskImpl hashtable
  -     *
  -     * XXX we also need to lookup a taskdef.properties file out of a few
  -     * strategic locations on disk to allow generic classes to be pulled
  -     * from the classpath
  -     */
  -    private void loadTasks() throws IOException {
  -        Enumeration enum = taskPathNodes.elements();
  -        while (enum.hasMoreElements()) {
  -            File dir = (File)enum.nextElement();
  -            String[] files = dir.list();
  -            for (int i = 0; i < files.length; i++) {
  -                if (files[i].endsWith(".jar")) {
  -                    File f = new File(dir, files[i]);
  -                    ZipFile zf = new ZipFile(f);
  -                    ZipEntry ze = zf.getEntry("/taskdef.properties");
  -                    if (ze != null) {
  -                        InputStream is = zf.getInputStream(ze);
  -                        Properties props = new Properties();
  -                        props.load(is);
  -                        is.close();
  -                        //System.out.println("Props: " + props);
  -                        String s = props.getProperty("tasks");
  -                        StringTokenizer tok = new StringTokenizer(s, ",", false);
  -                        while (tok.hasMoreTokens()) {
  -                            String taskType = tok.nextToken();
  -                            String taskClassName = props.getProperty(taskType + 
  -                                                                     ".class");
  -                            //System.out.println("TASK: " + taskType + " class: " +
  -                            //                taskClassName);
  -                            ClassLoader pcl = this.getClass().getClassLoader();
  -                            TaskClassLoader tcl = new TaskClassLoader(pcl, zf);
  -                            try {
  -                                Class clazz = tcl.findClass(taskClassName);
  -                                abstractTaskClasses.put(taskType, clazz);
  -                            } catch (ClassNotFoundException cnfe) {
  -                                System.out.println(cnfe);
  -                                System.out.println(cnfe.getMessage());
  -                            }
  -                        }
  -                    }
  -                }
  -            }
  -        }
  -    }
  -
  -    /**
        * Sets up the taskpath based on the currently running operating
        * system. In general, the ordering of the taskpath is: user directory,
        * system directory, and then installation. This allows users or
  @@ -211,13 +158,13 @@
           // generic unix
           f = new File(userHome + ".ant", "tasks");
           if (f.exists() && f.isDirectory()) {
  -            taskPathNodes.addElement(f);
  +            taskManager.addTaskPathNode(f);
           }
           
           // macos x
           f = new File(userHome + "/Library/Ant", "Tasks");
           if (f.exists() && f.isDirectory()) {
  -            taskPathNodes.addElement(f);
  +            taskManager.addTaskPathNode(f);
           }
           
           // windows -- todo
  @@ -227,13 +174,13 @@
           // generic unix
           f = new File("/usr/local/ant/tasks");
           if (f.exists() && f.isDirectory()) {
  -            taskPathNodes.addElement(f);
  +            taskManager.addTaskPathNode(f);
           }
           
           // macos x
           f = new File("/Library/Ant/Tasks");
           if (f.exists() && f.isDirectory()) {
  -            taskPathNodes.addElement(f);
  +            taskManager.addTaskPathNode(f);
           }
           
           // windows -- todo
  
  
  
  1.1                  jakarta-ant/proposal/anteater/source/main/org/apache/ant/TaskManager.java
  
  Index: TaskManager.java
  ===================================================================
  // -------------------------------------------------------------------------------
  // Copyright (c)2000 Apache Software Foundation
  // -------------------------------------------------------------------------------
  
  package org.apache.ant;
  
  import java.io.*;
  import java.net.*;
  import java.util.*;
  import java.util.zip.*;
  
  /**
   * Manager of tasks and all things related to tasks. Tasks can be found in a
   * wide number of locations -- and most of these locations require class loading
   * help. As well, new nodes on the task search path may be added at any time.
   * When these are added, new tasks should be scanned for.
   *
   * @author James Duncan Davidson (duncan@apache.org)
   */
  class TaskManager {
  
      // -----------------------------------------------------------------
      // PRIVATE DATA MEMBERS
      // -----------------------------------------------------------------
      
      /**
       * Data structure where all the Class definition for all known tasks are
       * held.
       */
      private Hashtable taskClasses = new Hashtable();
      
      /**
       * Data structure that holds all the nodes where tasks are picked up from.
       */
      private Vector taskPathNodes = new Vector();
  
      // -----------------------------------------------------------------
      // CONSTRUCTORS
      // -----------------------------------------------------------------
      
      /**
       * Creates a new TaskManager.
       */
      TaskManager() {
      }
      
      // -----------------------------------------------------------------
      // PACKAGE METHODS
      // -----------------------------------------------------------------
   
      /**
       * Adds a node to the task path 
       */
      void addTaskPathNode(File file) {
          taskPathNodes.addElement(file);
          processTaskPathNode(file);
      }
      
      /**
       *
       */
      AbstractTask getTaskInstance(String taskName) {
          Class clazz = (Class)taskClasses.get(taskName);
          try {
              return (AbstractTask)clazz.newInstance();
          } catch (Exception e) {
              System.out.println("Can't instantiate task: " + taskName);
              System.out.println(e);
              // XXX error out and stop
          }
          return null;
      }
   
      // -----------------------------------------------------------------
      // PRIVATE METHODS
      // -----------------------------------------------------------------
     
      /**
       * Returns an enum of the task names that are defined in a given 
       * properties file.
       */
      private Enumeration getTaskNames(Properties props) {
          Vector v = new Vector();
          String s = props.getProperty("tasks");
          StringTokenizer tok = new StringTokenizer(s, ",", false);
          while (tok.hasMoreTokens()) {
              String taskName = tok.nextToken().trim();
              v.addElement(taskName);
          }
          return v.elements();
      }
     
      /**
       * Processes a directory to get class defintions from it
       */
      private void processDir(File dir) {
          System.out.println("Scanning " + dir + " for tasks");
          File file = new File(dir, "taskdef.properties");
          if (file.exists()) {
              try {
                  InputStream in = new FileInputStream(file);
                  Properties props = new Properties();
                  props.load(in);
                  in.close();
                  
                  Enumeration enum = getTaskNames(props);
                  while (enum.hasMoreElements()) {
                      String taskName = (String)enum.nextElement();
                      String taskClass = props.getProperty("task." + taskName + ".class");
                      URLClassLoader loader = new URLClassLoader(new URL[] {dir.toURL()});
                      try {
                          Class clazz = loader.loadClass(taskClass);
                          System.out.println("Got task: " + taskName + " " + clazz);
                          taskClasses.put(taskName, clazz);
                      } catch (ClassNotFoundException cnfe) {
                          System.out.println("Couldn't load task: " + taskName);
                          System.out.println(cnfe);
                          // XXX error out and stop....
                      }
                  }
              } catch (IOException ioe) {
                  System.out.println("Could not work with dir: " + dir);
                  System.out.println(ioe);
                  // XXX error out and stop the build
              }
          }
      }
     
      /**
       * Processes a jar file to get class definitions from it
       */
      private void processJar(File file) {
          System.out.println("Scanning " + file + " for tasks");
          try {
              ZipFile zipFile = new ZipFile(file);
              ZipEntry zipEntry = zipFile.getEntry("taskdef.properties");
              if (zipEntry != null) {
                  InputStream in = zipFile.getInputStream(zipEntry);
                  Properties props = new Properties();
                  props.load(in);
                  in.close();
              
                  Enumeration enum = getTaskNames(props);
                  while (enum.hasMoreElements()) {
                      String taskName = (String)enum.nextElement();
                      String taskClass = props.getProperty("task." + taskName + ".class");
                      URLClassLoader loader = new URLClassLoader(new URL[] {file.toURL()});
                      try {
                          Class clazz = loader.loadClass(taskClass);
                          System.out.println("Got Task: " + taskName + " " + clazz);
                          taskClasses.put(taskName, clazz);
                      } catch (ClassNotFoundException cnfe) {
                          System.out.println("Couldn't load task: " + taskName);
                          System.out.println(cnfe);
                          // XXX error out and stop....
                      }
                  }
              }
              // make sure to not leave resources hanging
              zipFile.close();
          } catch (IOException ioe) {
              System.out.println("Couldn't work with file: " + file);
              System.out.println(ioe);
              // XXX need to exception out of here properly to stop things 
          }
      }
     
      /**
       * Processes a node of the task path searching for task definitions there
       * and adding them to the list of known tasks
       */
      private void processTaskPathNode(File file) {
      
          // task path nodes can be any of the following:
          //     * jar file
          //     * directory of jar files
          //     * directory holding class files
          
          if(file.isDirectory()) {
              // first look for all jar files here
              // second look for a taskdefs.properties here to see if we should
              // treat the directory as a classpath
              
              String[] files = file.list();
              for (int i = 0; i < files.length; i++) {
                  if (files[i].endsWith(".jar")) {
                      processJar(new File(file, files[i]));
                  } else if (files[i].equals("taskdef.properties")) {
                      processDir(file);
                  }
              }
          } else if (file.getName().endsWith(".jar")) {
              processJar(file);
          }
      }
  }
  
  

Re: AW: AW: Ant 2 -> JDK 1.2

Posted by Jon Stevens <jo...@latchkey.com>.
on 12/9/2000 12:29 PM, "Christoph Wilhelms" <Ch...@t-online.de>
wrote:

> Not at all! For instance inegrating into VAJ there is just one VM for
> developing AND running ANT. I think it is similar in other IDEs. This is the
> reason why Wolf Siberski and I developed the GUI for the ANT VAJ
> tool-integration using AWT and not SWING - to be independent of the VM used
> by the IDE!
> 
> Greetings,
> Chris

As James said, you can still use Ant 1.2.x.

-jon

-- 
Honk if you love peace and quiet.



AW: AW: Ant 2 -> JDK 1.2

Posted by Christoph Wilhelms <Ch...@t-online.de>.
> > -1 for kicking JDK1.1 compatibility! There is still an enormous number
of
> > projects using JDK1.1 (not just in our company). For instance most VAJ
> > projects still didn't move to java2, and it is neither easy to migrate
big
> > projects form 1.1 to 1.2.2 or 1.3.0, nor customers would pay just for
the
> > migration! I'll propose JDK1.1 support for one more year minimum!
> >
> > Greetings,
> > Chris
>
>Uh, the build requirement is not the same as the execution requirements.

Not at all! For instance inegrating into VAJ there is just one VM for
developing AND running ANT. I think it is similar in other IDEs. This is the
reason why Wolf Siberski and I developed the GUI for the ANT VAJ
tool-integration using AWT and not SWING - to be independent of the VM used
by the IDE!

Greetings,
Chris


Re: AW: Ant 2 -> JDK 1.2

Posted by Jon Stevens <jo...@latchkey.com>.
on 12/9/2000 4:47 AM, "Christoph Wilhelms" <Ch...@tui.de>
wrote:

> -1 for kicking JDK1.1 compatibility! There is still an enormous number of
> projects using JDK1.1 (not just in our company). For instance most VAJ
> projects still didn't move to java2, and it is neither easy to migrate big
> projects form 1.1 to 1.2.2 or 1.3.0, nor customers would pay just for the
> migration! I'll propose JDK1.1 support for one more year minimum!
> 
> Greetings,
> Chris

Uh, the build requirement is not the same as the execution requirements.

-jon


AW: Ant 2 -> JDK 1.2

Posted by Christoph Wilhelms <Ch...@tui.de>.
Hi
>> This will make ant (or the bootstrap, at least) not compatible with 1.1,
I
>> believe. Is that going to be part of Ant 2's charter?
>>
>> Conor
>
>+1. I'm tired of supporting JDK 1.1.x. There are now 1.2 JVM's on nearly
>ever major platform.
>
>We have removed support for 1.1.x in Turbine and haven't heard a single
>complaint.

-1 for kicking JDK1.1 compatibility! There is still an enormous number of
projects using JDK1.1 (not just in our company). For instance most VAJ
projects still didn't move to java2, and it is neither easy to migrate big
projects form 1.1 to 1.2.2 or 1.3.0, nor customers would pay just for the
migration! I'll propose JDK1.1 support for one more year minimum!

Greetings,
Chris


Ant 2 -> JDK 1.2

Posted by Jon Stevens <jo...@latchkey.com>.
on 12/7/2000 9:50 PM, "Conor MacNeill" <co...@ebinteractive.com.au> wrote:

> This will make ant (or the bootstrap, at least) not compatible with 1.1, I
> believe. Is that going to be part of Ant 2's charter?
> 
> Conor

+1. I'm tired of supporting JDK 1.1.x. There are now 1.2 JVM's on nearly
ever major platform.

We have removed support for 1.1.x in Turbine and haven't heard a single
complaint.

-jon



Re: Ant 2 -> Java 1.2

Posted by "Simeon H.K. Fitch" <si...@fitch.net>.

Peter Donald wrote:

> What environment would that be? I don't know of any environment that
> doesn't have reasonable 1.2 support. 

HPUX 10.20. HP *will not* port Java 1.2 to that platform due to a broken
threading model (my uninformed analysis). You'd be surprised how many
people are stuck there and won't upgrade due the involved costs and
political issues (two of my customers are in this situation).

I just wanted to drop in this data point. Personally, I'm in the camp
that post Ant 1.3 we should make full use of Java 1.2 features and
require that platform as a minimum. I think Ant 1.3 would be perfectly
sufficient for people standed on the Java 1.1.x platform, myself being
one of them.

sim

Re: Ant 2 -> Java 1.2

Posted by Russell Gold <ru...@acm.org>.
At 5:27 PM -0500 12/9/00, Peter Donald wrote:
>At 03:27  9/12/00 -0500, Chris Todd wrote:
>>I wasn't confused, and I don't think too many people were.  Being able to
>>build 1.1 code using an Ant that itself only runs in a 1.2 VM doesn't matter
>>to folks who develop and build their code on systems for which JDK1.2 is
>>unavailable.  
>
>What environment would that be? I don't know of any environment that
>doesn't have reasonable 1.2 support. Hell - excepting *BSD, I don't know of
>any developers environment that has a 1.2 but doesn't have a reasonable 1.3.

MacOS 9 has no possibility of Java 2 support, although OS X will.

------------------------------------------------------------------------
Russell Gold                     | "... society is tradition and order
russgold@acm.org    (preferred)  | and reverence, not a series of cheap
russgold@netaxs.com              | bargains between selfish interests."
rgold@thesycamoregroup.com       |   - Poul Anderson, "Iron"



Re: Ant 2 -> Java 1.2

Posted by Peter Donald <do...@apache.org>.
At 03:27  9/12/00 -0500, Chris Todd wrote:
>>-----Original Message-----
>>From: Jon Stevens [mailto:jon@latchkey.com]
>>Sent: Saturday, December 09, 2000 3:06 PM
>>To: ant-dev@jakarta.apache.org
>>Subject: Re: cvs
>>commit:jakarta-ant/proposal/anteater/source/main/org/apache/ant
>>TaskManager.javaAnt.java TaskClassLoader.java
>
><snip>
>
>>4) For the people who are still confused and just don't get it, this is the
>>*build environment* that would have the JDK 1.2 requirement. It doesn't
>>matter if your code execution still has a JDK 1.1 requirement because you
>>can still use Ant to compile your 1.1 code.
>
>Jon-
>
>I wasn't confused, and I don't think too many people were.  Being able to
>build 1.1 code using an Ant that itself only runs in a 1.2 VM doesn't matter
>to folks who develop and build their code on systems for which JDK1.2 is
>unavailable.  

What environment would that be? I don't know of any environment that
doesn't have reasonable 1.2 support. Hell - excepting *BSD, I don't know of
any developers environment that has a 1.2 but doesn't have a reasonable 1.3.

>You would essentially be telling those folks they can't use
>Ant in their development environment, they will have to go find some other
>system that has a 1.2 VM available for doing their builds.  

nope - you will always have ant 1.*

>I don't know how
>many systems only have 1.1 VMs available, but I would rather see Ant be
>inclusive rather than exclusive.  Just my 2 cents as a devoted Ant user.

inclusive is good ... when it is not limiting. If I had to choose between
keeping 100% of current user base or developing a better product (and thus
more likely gain more more users) you know which choice I would make ? ;P
If you *reall* want 1.1 then you always have 1.*

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Re: Ant 2 -> Java 1.2 WAS:RE: cvs commit:jakarta-ant/proposal/anteater/source/main/org/apache/ant TaskManager.javaAnt.java TaskClassLoader.java

Posted by Jon Stevens <jo...@latchkey.com>.
on 12/9/2000 12:27 PM, "Chris Todd" <ch...@christophertodd.com> wrote:

> I wasn't confused, and I don't think too many people were.  Being able to
> build 1.1 code using an Ant that itself only runs in a 1.2 VM doesn't matter
> to folks who develop and build their code on systems for which JDK1.2 is
> unavailable.  You would essentially be telling those folks they can't use
> Ant in their development environment, they will have to go find some other
> system that has a 1.2 VM available for doing their builds.  I don't know how
> many systems only have 1.1 VMs available, but I would rather see Ant be
> inclusive rather than exclusive.  Just my 2 cents as a devoted Ant user.

However, you can have both JVM's installed on your machine at the same time
and given the fact that 1.1 code runs fine on 1.2 JVM's this would be a
great migration path.

thanks,

-jon


Ant 2 -> Java 1.2 WAS:RE: cvs commit:jakarta-ant/proposal/anteater/source/main/org/apache/ant TaskManager.javaAnt.java TaskClassLoader.java

Posted by Chris Todd <ch...@christophertodd.com>.
>-----Original Message-----
>From: Jon Stevens [mailto:jon@latchkey.com]
>Sent: Saturday, December 09, 2000 3:06 PM
>To: ant-dev@jakarta.apache.org
>Subject: Re: cvs
>commit:jakarta-ant/proposal/anteater/source/main/org/apache/ant
>TaskManager.javaAnt.java TaskClassLoader.java

<snip>

>4) For the people who are still confused and just don't get it, this is the
>*build environment* that would have the JDK 1.2 requirement. It doesn't
>matter if your code execution still has a JDK 1.1 requirement because you
>can still use Ant to compile your 1.1 code.

Jon-

I wasn't confused, and I don't think too many people were.  Being able to
build 1.1 code using an Ant that itself only runs in a 1.2 VM doesn't matter
to folks who develop and build their code on systems for which JDK1.2 is
unavailable.  You would essentially be telling those folks they can't use
Ant in their development environment, they will have to go find some other
system that has a 1.2 VM available for doing their builds.  I don't know how
many systems only have 1.1 VMs available, but I would rather see Ant be
inclusive rather than exclusive.  Just my 2 cents as a devoted Ant user.

Sincerest regards,
Chris Todd
Software Engineer
Alabanza Corporation
ctodd@alabanza.com


Re: cvs commit: jakarta-ant/proposal/anteater/source/main/org/apache/ant TaskManager.java Ant.java TaskClassLoader.java

Posted by Jon Stevens <jo...@latchkey.com>.
on 12/9/2000 11:43 AM, "James Duncan Davidson" <du...@x180.net> wrote:

> To the argument that there's still JDK 1.1 development happening -- a few
> comments. 
> 
> 1) JDK 1.3 is out. It's probably time to upgrade. Are you still running
> Windows 3.1 in your enterprise? If so, you probably need to get a new job --
> I know of lots of places in the valley hiring right now.. :)
> 
> 2) JDK 1.2 based compilers do generate code that will run on 1.1. Just don't
> use those class libs that are not on 1.1.

2a) Jikes will still produce code that works fine on 1.1 environments.

> 3) Ant 1.x will always be there for support of JDK 1.1. I'm not sure that it
> makes since to burden every future version of Ant with support for 1.1 when
> we've already got something that works there.

4) For the people who are still confused and just don't get it, this is the
*build environment* that would have the JDK 1.2 requirement. It doesn't
matter if your code execution still has a JDK 1.1 requirement because you
can still use Ant to compile your 1.1 code.

thanks,

-jon


Re: cvs commit: jakarta-ant/proposal/anteater/source/main/org/apache/ant TaskManager.java Ant.java TaskClassLoader.java

Posted by James Duncan Davidson <du...@x180.net>.
On 12/7/00 9:50 PM, "Conor MacNeill" <co...@ebinteractive.com.au> wrote:

> This will make ant (or the bootstrap, at least) not compatible with 1.1, I
> believe. Is that going to be part of Ant 2's charter?

Undetermined. To be quite honest, there isn't a jdk 1.2 dependency yet in
AntEater that isn't fixable with a bit of work. I'm currently being selfish
and not doing that work. That work being the implementation all the
functionality of URLClassLoader and making sure that the jars created by the
bootstrap code are fully compatible jars with URLClassLoader. It's easy
enough to do this later, but my goals right now are to work on *how*
AntEater works, not every little detail yet.

You'll note that I'm not using Collections which are a harder to rectify
issue. It's too bad really because Collections would be a perfect way to
express some of the connections in the tree model.

I do agree with Jon in that it is probably time to just cut to the chase and
move to 1.2.  There is now a JDK 1.2 for every major platform out there.
Even FreeBSD has it now. Even Macs have it with OS X which will be out and
final by the time AntEater is grown up (and is the platform that I'm writing
AntEater on).

To the argument that there's still JDK 1.1 development happening -- a few
comments. 

1) JDK 1.3 is out. It's probably time to upgrade. Are you still running
Windows 3.1 in your enterprise? If so, you probably need to get a new job --
I know of lots of places in the valley hiring right now.. :)

2) JDK 1.2 based compilers do generate code that will run on 1.1. Just don't
use those class libs that are not on 1.1.

3) Ant 1.x will always be there for support of JDK 1.1. I'm not sure that it
makes since to burden every future version of Ant with support for 1.1 when
we've already got something that works there.

-- 
James Duncan Davidson                                        duncan@x180.net
                                                                  !try; do()


RE: cvs commit: jakarta-ant/proposal/anteater/source/main/org/apache/ant TaskManager.java Ant.java TaskClassLoader.java

Posted by Conor MacNeill <co...@ebinteractive.com.au>.
Duncan,

>    import java.io.*;
>    import java.util.*;
>   +import java.util.jar.*;
>    import java.util.zip.*;
>

This will make ant (or the bootstrap, at least) not compatible with 1.1, I
believe. Is that going to be part of Ant 2's charter?

Conor