ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/types MapperTest.java
Date Fri, 02 Mar 2001 16:01:24 GMT
conor       01/03/02 08:01:20

  Modified:    docs/manual optionaltasklist.html
               docs/manual/CoreTasks filter.html javadoc.html
               src/etc/testcases/taskdefs tar.xml zip.xml
               src/main/org/apache/tools/ant DirectoryScanner.java
                        ProjectHelper.java
               src/main/org/apache/tools/ant/taskdefs Javadoc.java Tar.java
                        Zip.java
               src/main/org/apache/tools/ant/taskdefs/optional/depend
                        ClassFileUtils.java
               src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        WeblogicDeploymentTool.java
               src/main/org/apache/tools/ant/taskdefs/optional/javacc
                        JJTree.java
               src/main/org/apache/tools/ant/taskdefs/optional/junit
                        AggregateTransformer.java JUnitTestRunner.java
               src/main/org/apache/tools/ant/taskdefs/optional/junit/html
                        stylesheet.css
               src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl
                        all-classes.xsl all-packages.xsl class-details.xsl
                        classes-list.xsl overview-packages.xsl
                        overview-summary.xsl package-summary.xsl
                        toolkit.xsl
               src/main/org/apache/tools/ant/types CommandlineJava.java
                        Mapper.java
               src/testcases/org/apache/tools/ant/taskdefs TarTest.java
                        ZipTest.java
               src/testcases/org/apache/tools/ant/types MapperTest.java
  Added:       docs/manual/OptionalTasks javah.html
               src/etc/testcases/types mapper.xml
  Log:
  Merge after 1.3 release
  
  Revision  Changes    Path
  1.7       +5 -3      jakarta-ant/docs/manual/optionaltasklist.html
  
  Index: optionaltasklist.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/optionaltasklist.html,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- optionaltasklist.html	2001/02/28 01:41:08	1.6
  +++ optionaltasklist.html	2001/03/02 15:56:42	1.7
  @@ -15,10 +15,12 @@
   <a href="OptionalTasks/antlr.html">ANTLR</a><br>
   <a href="OptionalTasks/cab.html">Cab</a><br>
   <a href="OptionalTasks/clearcase.html">Clearcase Tasks</a><br>
  +<a href="OptionalTasks/depend.html">Depend</a><br>
   <a href="OptionalTasks/ejb.html">EJB Tasks</a><br>
   <a href="OptionalTasks/ftp.html">FTP</a><br>
  -<a href="OptionalTasks/javacc.html">JavaCC</a><br>
   <a href="OptionalTasks/icontract.html">IContract</a><br>
  +<a href="OptionalTasks/javacc.html">JavaCC</a><br>
  +<a href="OptionalTasks/javah.html">Javah</a><br>
   <a href="OptionalTasks/jjtree.html">JJTree</a><br>
   <a href="OptionalTasks/jlink.html">Jlink</a><br>
   <a href="OptionalTasks/junit.html">JUnit</a><br>
  @@ -26,15 +28,15 @@
   <a href="OptionalTasks/mparse.html">MParse</a><br>
   <a href="OptionalTasks/native2ascii.html">Native2Ascii</a><br>
   <a href="OptionalTasks/netrexxc.html">NetRexxC</a><br>
  -<a href="OptionalTasks/propertyfile.html">PropertyFile</a><br>
   <a href="OptionalTasks/perforce.html">Perforce Tasks</a><br>
  +<a href="OptionalTasks/propertyfile.html">PropertyFile</a><br>
   <a href="OptionalTasks/pvcstask.html">Pvcs</a><br>
   <a href="OptionalTasks/renameextensions.html"><i>RenameExtensions</i></a><br>
   <a href="OptionalTasks/script.html">Script</a><br>
   <a href="OptionalTasks/sound.html">Sound</a><br>
   <a href="OptionalTasks/stylebook.html">Stylebook</a><br>
  -<a href="OptionalTasks/test.html">Test</a><br>
   <a href="OptionalTasks/telnet.html">Telnet</a><br>
  +<a href="OptionalTasks/test.html">Test</a><br>
   <a href="Integration/VAJAntTool.html#tasks">Visual Age for Java Tasks</a><br>
   <a href="OptionalTasks/vssget.html">VssGet</a><br>
   <a href="OptionalTasks/vsslabel.html">VssLabel</a><br>
  
  
  
  1.4       +1 -1      jakarta-ant/docs/manual/CoreTasks/filter.html
  
  Index: filter.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/filter.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- filter.html	2001/02/18 13:44:40	1.3
  +++ filter.html	2001/03/02 15:56:59	1.4
  @@ -44,7 +44,7 @@
   <p>* see notes 1 and 2 above parameters table.</p>
   <h3>Examples</h3>
   <pre>  &lt;filter token=&quot;year&quot; value=&quot;2000&quot;/&gt;
  -  &lt;copy todir=&quot;${dest.dir}&quot;&gt;
  +  &lt;copy todir=&quot;${dest.dir}&quot; filtering=&quot;true&quot;&gt;
       &lt;fileset dir=&quot;${src.dir}&quot;/&gt;
     &lt;/copy&gt;</pre> 
   <p>will copy recursively all the files from the <i>src.dir</i> directory into
  
  
  
  1.3       +3 -1      jakarta-ant/docs/manual/CoreTasks/javadoc.html
  
  Index: javadoc.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/javadoc.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- javadoc.html	2001/02/13 12:31:51	1.2
  +++ javadoc.html	2001/03/02 15:57:02	1.3
  @@ -339,7 +339,9 @@
     </tr>
     <tr>
       <td valign="top">additionalparam</td>
  -    <td valign="top">Lets you add additional parameters to the javadoc command line. Useful for doclets</td>
  +    <td valign="top">Lets you add additional parameters to the javadoc
  +            command line. Useful for doclets. Parameters containing
  +            spaces need to be quoted using &amp;quot;.</td>
       <td align="center" valign="top">1.2</td>
       <td align="center" valign="top">No</td>
     </tr>
  
  
  
  1.2       +117 -0    jakarta-ant/docs/manual/OptionalTasks/javah.html
  
  
  
  
  1.3       +11 -1     jakarta-ant/src/etc/testcases/taskdefs/tar.xml
  
  Index: tar.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/etc/testcases/taskdefs/tar.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- tar.xml	2000/12/18 15:43:58	1.2
  +++ tar.xml	2001/03/02 15:57:27	1.3
  @@ -1,6 +1,6 @@
   <?xml version="1.0"?>
   
  -<project name="xxx-test" basedir="." default="test1">
  +<project name="tar-test" basedir="." default="test1">
   
     <target name="test1">
       <tar/>
  @@ -14,4 +14,14 @@
       <tar basedir=""/>
     </target>
   
  +  <target name="test4">
  +    <touch file="test4.tar"/>
  +    <tar tarfile="test4.tar"
  +         basedir="."/>
  +  </target>
  +
  +  
  +  <target name="cleanup"> 
  +    <delete file="test4.tar"/>
  +  </target>
   </project>
  
  
  
  1.3       +21 -1     jakarta-ant/src/etc/testcases/taskdefs/zip.xml
  
  Index: zip.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/etc/testcases/taskdefs/zip.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- zip.xml	2000/12/18 15:44:01	1.2
  +++ zip.xml	2001/03/02 15:57:31	1.3
  @@ -1,6 +1,6 @@
   <?xml version="1.0"?>
   
  -<project name="xxx-test" basedir="." default="test1">
  +<project name="zip-test" basedir="." default="test1">
   
     <target name="test1">
       <zip/>
  @@ -10,4 +10,24 @@
       <zip zipfile="zip.tmp"/>
     </target>
   
  +  <!-- Test when the zip file includes itself
  +  when target file exists before the zip task is run -->
  +  <target name="test3">
  +    <touch file="test3.zip"/>
  +    <zip zipfile="test3.zip"
  +         basedir="."/>
  +  </target>
  +
  +  <!-- Test when the zip file includes itself
  +  when target file does not exist before the zip task is run -->
  +  <target name="test4">
  +     <zip zipfile="test4.zip"
  +         basedir="."/>
  +  </target>
  +
  +
  +  <target name="cleanup">
  +    <delete file="test3.zip"/>
  +    <delete file="test4.zip"/>
  +  </target>
   </project>
  
  
  
  1.2       +19 -0     jakarta-ant/src/etc/testcases/types/mapper.xml
  
  
  
  
  1.9       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/DirectoryScanner.java
  
  Index: DirectoryScanner.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/DirectoryScanner.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DirectoryScanner.java	2001/01/03 14:18:26	1.8
  +++ DirectoryScanner.java	2001/03/02 15:57:54	1.9
  @@ -736,7 +736,7 @@
                * (2) an IO error occurred (why doesn't it throw an exception 
                *     then???)
                */
  -            throw new BuildException("IO error scanning directory"
  +            throw new BuildException("IO error scanning directory "
                                        + dir.getAbsolutePath());
           }
   
  
  
  
  1.49      +9 -2      jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
  
  Index: ProjectHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- ProjectHelper.java	2001/02/18 13:44:41	1.48
  +++ ProjectHelper.java	2001/03/02 15:57:58	1.49
  @@ -104,12 +104,17 @@
           try {
               SAXParser saxParser = getParserFactory().newSAXParser();
               parser = saxParser.getParser();
  -            
  +
               String uri = "file:" + buildFile.getAbsolutePath().replace('\\', '/');
               for (int index = uri.indexOf('#'); index != -1; index = uri.indexOf('#')) {
                   uri = uri.substring(0, index) + "%23" + uri.substring(index+1);
               }
  -            saxParser.parse(uri, new RootHandler());
  +            
  +            inputStream = new FileInputStream(buildFile);
  +            inputSource = new InputSource(inputStream);
  +            inputSource.setSystemId(uri);
  +            project.log("parsing buildfile " + buildFile + " with URI = " + uri, Project.MSG_VERBOSE);
  +            saxParser.parse(inputSource, new RootHandler());
           }
           catch(ParserConfigurationException exc) {
               throw new BuildException("Parser has not been configured correctly", exc);
  @@ -212,6 +217,8 @@
            */
           public InputSource resolveEntity(String publicId,
                                            String systemId) {
  +        
  +            project.log("resolving systemId: " + systemId, Project.MSG_VERBOSE);
           
               if (systemId.startsWith("file:")) {
                   String path = systemId.substring(5);
  
  
  
  1.45      +23 -25    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- Javadoc.java	2001/02/13 12:31:58	1.44
  +++ Javadoc.java	2001/03/02 15:58:13	1.45
  @@ -175,6 +175,19 @@
           }
       }
   
  +    private void add12ArgIfNotEmpty(String key, String value) {
  +        if (!javadoc1) {
  +            if (value != null && value.length() != 0) {
  +                cmd.createArgument().setValue(key);
  +                cmd.createArgument().setValue(value);
  +            } else {
  +                project.log(this, 
  +                            "Warning: Leaving out empty argument '" + key + "'", 
  +                            Project.MSG_WARN);
  +            }
  +        } 
  +    }
  +
       private void add11ArgIf(boolean b, String arg) {
           if (javadoc1 && b) {
               cmd.createArgument().setValue(arg);
  @@ -226,7 +239,7 @@
       }
   
       public void setAdditionalparam(String add){
  -        cmd.createArgument().setValue(add);
  +        cmd.createArgument().setLine(add);
       }
       
       public void setSourcepath(Path src) {
  @@ -387,35 +400,23 @@
           add12ArgIf(b, "-splitindex");
       }
       public void setWindowtitle(String src) {
  -        if (!javadoc1) {
  -            cmd.createArgument().setValue("-windowtitle");
  -            cmd.createArgument().setValue(src);
  -        }
  +        add12ArgIfNotEmpty("-windowtitle", src);
       }
       public void setDoctitle(String src) {
  -        if (!javadoc1) {
  -            cmd.createArgument().setValue("-doctitle");
  -            cmd.createArgument().setValue(src);
  -        }
  +        add12ArgIfNotEmpty("-doctitle", src);
       }
       public void setHeader(String src) {
  -        if (!javadoc1) {
  -            cmd.createArgument().setValue("-header");
  -            cmd.createArgument().setValue(src);
  -        }
  +        add12ArgIfNotEmpty("-header", src);
       }
  +
       public void setFooter(String src) {
  -        if (!javadoc1) {
  -            cmd.createArgument().setValue("-footer");
  -            cmd.createArgument().setValue(src);
  -        }
  +        add12ArgIfNotEmpty("-footer", src);
       }
  +
       public void setBottom(String src) {
  -        if (!javadoc1) {
  -            cmd.createArgument().setValue("-bottom");
  -            cmd.createArgument().setValue(src);
  -        }
  +        add12ArgIfNotEmpty("-bottom", src);
       }
  +
       public void setLinkoffline(String src) {
           if (!javadoc1) {
               LinkArgument le = createLink();
  @@ -553,10 +554,7 @@
       }
       
       public void setCharset(String src) {
  -        if (!javadoc1) {
  -            cmd.createArgument().setValue("-charset");
  -            cmd.createArgument().setValue(src);
  -        }
  +        this.add12ArgIfNotEmpty("-charset", src);
       }
   
       /**
  
  
  
  1.14      +6 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java
  
  Index: Tar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Tar.java	2001/02/13 13:11:37	1.13
  +++ Tar.java	2001/03/02 15:58:18	1.14
  @@ -175,7 +175,12 @@
               
               if (!archiveIsUpToDate(files)) {
                   upToDate = false;
  -                break;
  +            }
  +            
  +            for (int i = 0; i < files.length; ++i) {
  +                if (tarFile.equals(new File(fs.getDir(project), files[i]))) {
  +                    throw new BuildException("A tar file cannot include itself", location);
  +                }
               }
           }
   
  
  
  
  1.31      +10 -0     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
  
  Index: Zip.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Zip.java	2001/02/01 13:14:25	1.30
  +++ Zip.java	2001/03/02 15:58:24	1.31
  @@ -334,6 +334,12 @@
                   return true;
               }
           } else {
  +            for (int i = 0; i < files.length; ++i) {
  +                if (files[i].equals(zipFile)) {
  +                    throw new BuildException("A zip file cannot include itself", location);
  +                }
  +            }
  +
               if (!zipFile.exists()) return false;
   
               SourceFileScanner sfs = new SourceFileScanner(this);
  @@ -459,6 +465,10 @@
       protected void zipFile(File file, ZipOutputStream zOut, String vPath)
           throws IOException
       {
  +        if (file.equals(zipFile)) {
  +            throw new BuildException("A zip file cannot include itself", location);
  +        }
  +
           FileInputStream fIn = new FileInputStream(file);
           try {
               zipFile(fIn, zOut, vPath, file.lastModified());
  
  
  
  1.3       +2 -50     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileUtils.java
  
  Index: ClassFileUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ClassFileUtils.java	2001/01/03 14:18:36	1.2
  +++ ClassFileUtils.java	2001/03/02 15:58:41	1.3
  @@ -73,31 +73,7 @@
        * @return the class name in dot notation (eg. java.lang.Object).
        */
       static public String convertSlashName(String name) {
  -        String dotName = null;
  -        int    startIndex = 0;
  -        int    sepIndex = 0;
  -
  -        String slashName = name.replace('\\', '/');
  -        do {
  -            String component = null;
  -
  -            sepIndex = slashName.indexOf('/', startIndex);
  -
  -            if (sepIndex == -1) {
  -                component = slashName.substring(startIndex);
  -            } else {
  -                component = slashName.substring(startIndex, sepIndex);
  -                startIndex = sepIndex + 1;
  -            } 
  -
  -            if (dotName == null) {
  -                dotName = component;
  -            } else {
  -                dotName += "." + component;
  -            } 
  -        } while (sepIndex != -1);
  -
  -        return dotName;
  +        return name.replace('\\', '.').replace( '/', '.' );
       } 
   
       /**
  @@ -108,31 +84,7 @@
        * @return the class name in slash notation (eg. java/lang/Object).
        */
       static public String convertDotName(String dotName) {
  -        String slashName = null;
  -        int    startIndex = 0;
  -        int    sepIndex = 0;
  -
  -        do {
  -            String component = null;
  -
  -            sepIndex = dotName.indexOf('.', startIndex);
  -
  -            if (sepIndex == -1) {
  -                component = dotName.substring(startIndex);
  -            } else {
  -                component = dotName.substring(startIndex, sepIndex);
  -                startIndex = sepIndex + 1;
  -            } 
  -
  -            if (slashName == null) {
  -                slashName = component;
  -            } else {
  -                slashName += "/" + component;
  -            } 
  -        } while (sepIndex != -1);
  -
  -        return slashName;
  +        return dotName.replace( '.', '/');
       } 
  -
   }
   
  
  
  
  1.19      +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
  
  Index: WeblogicDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- WeblogicDeploymentTool.java	2001/02/18 13:44:42	1.18
  +++ WeblogicDeploymentTool.java	2001/03/02 15:58:51	1.19
  @@ -367,7 +367,7 @@
                   args += " -compiler " + compiler;
               }
               
  -            args += " -noexit " + sourceJar.getPath() + " " + destJar.getPath();
  +            args += " " + sourceJar.getPath() + " " + destJar.getPath();
               
               javaTask = (Java) getTask().getProject().createTask("java");
               javaTask.setTaskName("ejbc");
  @@ -384,7 +384,7 @@
                   javaTask.setFork(true);
               }
               else {
  -                javaTask.setFork(false);
  +                javaTask.setFork(true);
               }
               
   
  
  
  
  1.3       +13 -9     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
  
  Index: JJTree.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JJTree.java	2001/01/03 14:18:42	1.2
  +++ JJTree.java	2001/03/02 15:59:05	1.3
  @@ -171,18 +171,22 @@
               cmdl.createArgument().setValue("-"+name+":"+value.toString());
           }
   
  -        // load command line with required attributes
  -        if (outputDirectory != null) {
  -            if (!outputDirectory.isDirectory()) {
  -                throw new BuildException("Outputdir not a directory.");
  -            }
  -            cmdl.createArgument().setValue(
  -                "-OUTPUT_DIRECTORY:"+outputDirectory.getAbsolutePath());
  -        }
  -
           if (target == null || !target.isFile()) {
               throw new BuildException("Invalid target: " + target);
           }
  +        
  +        // use the directory containing the target as the output directory
  +        if (outputDirectory == null) {
  +            outputDirectory = new File(target.getParent());
  +        }        
  +        if (!outputDirectory.isDirectory() ) {
  +            throw new BuildException("'outputdirectory' " + outputDirectory + " is not a directory.");
  +        }
  +        // convert backslashes to slashes, otherwise jjtree will put this as
  +        // comments and this seems to confuse javacc
  +        cmdl.createArgument().setValue(
  +            "-OUTPUT_DIRECTORY:"+outputDirectory.getAbsolutePath().replace('\\', '/'));
  +        
           final File javaFile = new File(
               target.toString().substring(0, target.toString().indexOf(".jjt")) + ".jj");
           if (javaFile.exists() && target.lastModified() < javaFile.lastModified()) {
  
  
  
  1.3       +12 -6     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java
  
  Index: AggregateTransformer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AggregateTransformer.java	2001/02/13 12:32:00	1.2
  +++ AggregateTransformer.java	2001/03/02 15:59:19	1.3
  @@ -281,19 +281,25 @@
       }
   
       protected void createCascadingStyleSheet() throws IOException, SAXException {
  +        InputStream in = null;
           if (styleDir == null) {
  -            InputStream in = getResourceAsStream("html/stylesheet.css");
  -            OutputStream out = new FileOutputStream( new File(toDir, "stylesheet.css"));
  -            copy(in, out);              
  +            in = getResourceAsStream("html/stylesheet.css");
  +        } else {
  +            in = new FileInputStream(new File(styleDir, "stylesheet.css"));
           }
  +        OutputStream out = new FileOutputStream( new File(toDir, "stylesheet.css"));
  +        copy(in, out);
       }
   
       protected void createFrameStructure() throws IOException, SAXException{
  +        InputStream in = null;
           if (styleDir == null) {
  -            InputStream in = getResourceAsStream("html/index.html");
  -            OutputStream out = new FileOutputStream( new File(toDir, "index.html") );
  -            copy(in, out);
  +            in = getResourceAsStream("html/index.html");
  +        } else {
  +            in = new FileInputStream(new File(styleDir, "index.html"));
           }
  +        OutputStream out = new FileOutputStream( new File(toDir, "index.html") );
  +        copy(in, out);
       }
           
       /**
  
  
  
  1.7       +14 -7     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
  
  Index: JUnitTestRunner.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JUnitTestRunner.java	2001/01/30 17:01:32	1.6
  +++ JUnitTestRunner.java	2001/03/02 15:59:24	1.7
  @@ -161,15 +161,22 @@
                   testClass = loader.loadClass(test.getName());
               }
               
  +            Method suiteMethod = null;
               try {
  -                Method suiteMethod= testClass.getMethod("suite", new Class[0]);
  -                suite = (Test)suiteMethod.invoke(null, new Class[0]);
  -            } catch(NoSuchMethodException e) {
  -            } catch(InvocationTargetException e) {
  -            } catch(IllegalAccessException e) {
  +                // check if there is a suite method
  +                suiteMethod= testClass.getMethod("suite", new Class[0]);
  +            } catch(Exception e) {
  +                // no appropriate suite method found. We don't report any
  +                // error here since it might be perfectly normal. We don't
  +                // know exactly what is the cause, but we're doing exactly
  +                // the same as JUnit TestRunner do. We swallow the exceptions.
               }
  -            
  -            if (suite == null) {
  +            if (suiteMethod != null){
  +                // if there is a suite method available, then try
  +                // to extract the suite from it. If there is an error
  +                // here it will be caught below and reported.
  +                suite = (Test)suiteMethod.invoke(null, new Class[0]);
  +            } else {
                   // try to extract a test suite automatically
                   // this will generate warnings if the class is no suitable Test
                   suite= new TestSuite(testClass);
  
  
  
  1.2       +5 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/html/stylesheet.css
  
  Index: stylesheet.css
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/html/stylesheet.css,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- stylesheet.css	2001/02/02 17:03:57	1.1
  +++ stylesheet.css	2001/03/02 15:59:38	1.2
  @@ -28,8 +28,11 @@
   	MARGIN-BOTTOM: 0.5em; FONT: bold 100% verdana,arial,helvetica
   }
   .Error {
  -	font-weight:bold; color:red;
  +	font-weight:bold; background:#EEEEE0; color:purple;
   }
   .Failure {
  -	font-weight:bold; color:purple;
  +	font-weight:bold; background:#EEEEE0; color:red;
  +}
  +.Pass {
  +	background:#EEEEE0;
   }
  
  
  
  1.2       +8 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/all-classes.xsl
  
  Index: all-classes.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/all-classes.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- all-classes.xsl	2001/02/02 17:03:58	1.1
  +++ all-classes.xsl	2001/03/02 15:59:49	1.2
  @@ -1,10 +1,11 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
  -
  -<!-- This style sheet should contain just a named templates that used in the other specific templates -->
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   
   <xsl:include href="toolkit.xsl"/>
   
  +<!--
  +    Display the whole list of testsuite
  +-->
   <xsl:template match="testsuites">
   	<HTML>
   		<HEAD>
  @@ -23,6 +24,10 @@
   	</HTML>
   </xsl:template>
   
  +<!--
  +    Display each testsuite name with an hyperlink to the package frame.
  +    The hyperlink is made of the {packagename} + {classname} + "-details.html"
  +-->
   <xsl:template match="testsuite">
   	<tr>
   		<td nowrap="nowrap">
  @@ -37,4 +42,4 @@
   	</tr>
   </xsl:template>
   
  -</xsl:stylesheet>
  \ No newline at end of file
  +</xsl:stylesheet>
  
  
  
  1.2       +1 -4      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/all-packages.xsl
  
  Index: all-packages.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/all-packages.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- all-packages.xsl	2001/02/02 17:03:58	1.1
  +++ all-packages.xsl	2001/03/02 15:59:53	1.2
  @@ -1,9 +1,6 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
  -
  -<!-- This style sheet should contain just a named templates that used in the other specific templates -->
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   
  -<!-- import the commun templates -->
   <xsl:include href="toolkit.xsl"/>
   
   <xsl:template match="testsuites">
  @@ -39,4 +36,4 @@
   	</tr>
   </xsl:template>
   
  -</xsl:stylesheet>
  \ No newline at end of file
  +</xsl:stylesheet>
  
  
  
  1.2       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/class-details.xsl
  
  Index: class-details.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/class-details.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- class-details.xsl	2001/02/02 17:03:58	1.1
  +++ class-details.xsl	2001/03/02 15:59:55	1.2
  @@ -34,4 +34,4 @@
   	</HTML>
   </xsl:template>
   
  -</xsl:stylesheet>
  \ No newline at end of file
  +</xsl:stylesheet>
  
  
  
  1.2       +1 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/classes-list.xsl
  
  Index: classes-list.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/classes-list.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- classes-list.xsl	2001/02/02 17:03:59	1.1
  +++ classes-list.xsl	2001/03/02 15:59:58	1.2
  @@ -1,6 +1,4 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
  -
  -<!-- This style sheet should contain just a named templates that used in the other specific templates -->
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   
   <!-- import the commun templates -->
  @@ -43,4 +41,4 @@
   	</tr>
   </xsl:template>
   
  -</xsl:stylesheet>
  \ No newline at end of file
  +</xsl:stylesheet>
  
  
  
  1.2       +37 -18    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/overview-packages.xsl
  
  Index: overview-packages.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/overview-packages.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- overview-packages.xsl	2001/02/02 17:03:59	1.1
  +++ overview-packages.xsl	2001/03/02 16:00:00	1.2
  @@ -1,17 +1,8 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
  -
  -<!-- This style sheet should contain just a named templates that used in the other specific templates -->
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   
   <xsl:include href="toolkit.xsl"/>
   
  -<!-- Calculate all summary values -->
  -<xsl:variable name="testCount" select="sum(//testsuite/@tests)"/>
  -<xsl:variable name="errorCount" select="sum(//testsuite/@errors)"/>
  -<xsl:variable name="failureCount" select="sum(//testsuite/@failures)"/>
  -<xsl:variable name="timeCount" select="sum(//testsuite/@time)"/>
  -<xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/>
  -
   <xsl:template match="testsuites">
   	<HTML>
   		<HEAD>
  @@ -59,8 +50,18 @@
   <xsl:template match="testsuite" mode="package">
   	<xsl:variable name="isError" select="(sum(//testsuite[@package = current()/@package]/@errors) + sum(//testsuite[@package = current()/@package]/@failures))&gt;0"/>
   	<!-- write a summary for the package -->
  -	<tr bgcolor="#EEEEE" valign="top">
  -		<td><xsl:if test="$isError"><xsl:attribute name="class">Error</xsl:attribute></xsl:if><a href="{translate(@package,'.','/')}/package-summary.html"><xsl:value-of select="@package"/></a></td>
  +	<tr valign="top">
  +		<xsl:attribute name="class">
  +			<xsl:choose>
  +				<xsl:when test="$isError">Failure</xsl:when>
  +				<xsl:otherwise>Pass</xsl:otherwise>
  +			</xsl:choose>
  +		</xsl:attribute>
  +		<td>
  +			<a href="{translate(@package,'.','/')}/package-summary.html">
  +				<xsl:value-of select="@package"/>
  +			</a>
  +		</td>
   		<xsl:call-template name="statistics">
   			<xsl:with-param name="isError" select="$isError"/>
   		</xsl:call-template>
  @@ -70,8 +71,19 @@
   <xsl:template match="testsuite" mode="class">
   	<xsl:variable name="isError" select="(@errors + @failures)&gt;0"/>
   	<!-- write a summary for the package -->
  -	<tr bgcolor="#EEEEE" valign="top">
  -		<td><xsl:if test="$isError"><xsl:attribute name="class">Error</xsl:attribute></xsl:if><a href="{translate(@package,'.','/')}/summary.html"><xsl:value-of select="@name"/></a></td>
  +	<tr valign="top">
  +		<xsl:attribute name="class">
  +			<xsl:choose>
  +				<xsl:when test="$isError">Failure</xsl:when>
  +				<xsl:otherwise>Pass</xsl:otherwise>
  +			</xsl:choose>
  +		</xsl:attribute>
  +		<td>
  +
  +			<a href="{translate(@package,'.','/')}/summary.html">
  +				<xsl:value-of select="@name"/>
  +			</a>
  +		</td>
   		<xsl:call-template name="statistics">
   			<xsl:with-param name="isError" select="$isError"/>
   		</xsl:call-template>
  @@ -81,10 +93,17 @@
   
   <xsl:template name="statistics">
   	<xsl:variable name="isError"/>
  -		<td><xsl:if test="$isError"><xsl:attribute name="class">Error</xsl:attribute></xsl:if><xsl:value-of select="sum(//testsuite[@package = current()/@package]/@tests)"/></td>
  -		<td><xsl:if test="$isError"><xsl:attribute name="class">Error</xsl:attribute></xsl:if><xsl:value-of select="sum(//testsuite[@package = current()/@package]/@errors)"/></td>
  -		<td><xsl:if test="$isError"><xsl:attribute name="class">Error</xsl:attribute></xsl:if><xsl:value-of select="sum(//testsuite[@package = current()/@package]/@failures)"/></td>
  -		<td><xsl:if test="$isError"><xsl:attribute name="class">Error</xsl:attribute></xsl:if><xsl:value-of select="format-number(sum(//testsuite[@package = current()/@package]/@time),'#,###0.000')"/></td>
  +		<td>
  +			<xsl:value-of select="sum(//testsuite[@package = current()/@package]/@tests)"/></td>
  +		<td>
  +			<xsl:value-of select="sum(//testsuite[@package = current()/@package]/@errors)"/></td>
  +		<td>
  +			<xsl:value-of select="sum(//testsuite[@package = current()/@package]/@failures)"/></td>
  +		<td>
  +            <xsl:call-template name="display-time">
  +            	<xsl:with-param name="value" select="sum(//testsuite[@package = current()/@package]/@time)"/>
  +            </xsl:call-template>
  +		</td>
   </xsl:template>
   
  -</xsl:stylesheet>
  \ No newline at end of file
  +</xsl:stylesheet>
  
  
  
  1.2       +26 -14    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/overview-summary.xsl
  
  Index: overview-summary.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/overview-summary.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- overview-summary.xsl	2001/02/02 17:03:59	1.1
  +++ overview-summary.xsl	2001/03/02 16:00:05	1.2
  @@ -1,5 +1,4 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
  -
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:html="http://www.w3.org/Profiles/XHTML-transitional">
   
   <xsl:include href="toolkit.xsl"/>
  @@ -43,13 +42,16 @@
   			}
   			H6 {
   			MARGIN-BOTTOM: 0.5em; FONT: bold 100% verdana,arial,helvetica
  -			}
  -			.Error {
  -			font-weight:bold; color:red;
  -			}
  -			.Failure {
  -			font-weight:bold; color:purple;
  -			}
  +			}	
  +            .Error {
  +            	font-weight:bold; background:#EEEEE0; color:purple;
  +            }
  +            .Failure {
  +            	font-weight:bold; background:#EEEEE0; color:red;
  +            }
  +            .Pass {
  +            	background:#EEEEE0;
  +            }
   			</style>			
   		</HEAD>
   		<body text="#000000" bgColor="#ffffff">
  @@ -95,19 +97,24 @@
   				<xsl:variable name="timeCount" select="sum(../testsuite[./@package = current()/@package]/@time)"/>
   				
   				<!-- write a summary for the package -->
  -				<tr bgcolor="#EEEEE" valign="top">
  +				<tr valign="top">
   					<!-- set a nice color depending if there is an error/failure -->
   					<xsl:attribute name="class">
   						<xsl:choose>
  +						    <xsl:when test="$failureCount &gt; 0">Failure</xsl:when>
   							<xsl:when test="$errorCount &gt; 0">Error</xsl:when>
  -							<xsl:when test="$failureCount &gt; 0">Failure</xsl:when>
  +							<xsl:otherwise>Pass</xsl:otherwise>
   						</xsl:choose>
   					</xsl:attribute>				
   					<td><a href="#{@package}"><xsl:value-of select="@package"/></a></td>
   					<td><xsl:value-of select="$testCount"/></td>
   					<td><xsl:value-of select="$errorCount"/></td>
   					<td><xsl:value-of select="$failureCount"/></td>
  -					<td><xsl:value-of select="format-number($timeCount,'#,###0.000')"/></td>					
  +					<td>
  +                        <xsl:call-template name="display-time">
  +                        	<xsl:with-param name="value" select="$timeCount"/>
  +                        </xsl:call-template>					
  +					</td>					
   				</tr>
   			</xsl:for-each>
   		</table>		
  @@ -145,12 +152,13 @@
   	<!-- It must match the table definition at the package level            -->
   	<!-- ================================================================== -->	
   	<xsl:template match="testsuite">
  -		<tr bgcolor="#EEEEE" valign="top">
  +		<tr valign="top">
   			<!-- set a nice color depending if there is an error/failure -->
   			<xsl:attribute name="class">
   				<xsl:choose>
  +				    <xsl:when test="@failures[.&gt; 0]">Failure</xsl:when>
   					<xsl:when test="@errors[.&gt; 0]">Error</xsl:when>
  -					<xsl:when test="@failures[.&gt; 0]">Failure</xsl:when>
  +					<xsl:otherwise>Pass</xsl:otherwise>
   				</xsl:choose>
   			</xsl:attribute>
   		
  @@ -159,7 +167,11 @@
   			<td><xsl:value-of select="@tests"/></td>
   			<td><xsl:value-of select="@errors"/></td>
   			<td><xsl:value-of select="@failures"/></td>
  -			<td><xsl:value-of select="format-number(@time,'#,###0.000')"/></td>
  +			<td>
  +                <xsl:call-template name="display-time">
  +                	<xsl:with-param name="value" select="@time"/>
  +                </xsl:call-template>
  +			</td>
   		</tr>
   	</xsl:template>
   	
  
  
  
  1.2       +19 -7     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/package-summary.xsl
  
  Index: package-summary.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/package-summary.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package-summary.xsl	2001/02/02 17:03:59	1.1
  +++ package-summary.xsl	2001/03/02 16:00:09	1.2
  @@ -1,6 +1,4 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
  -
  -<!-- This style sheet should contain just a named templates that used in the other specific templates -->
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   
   <!-- import the commun templates -->
  @@ -26,7 +24,16 @@
   				<xsl:call-template name="packageSummaryHeader"/>				
   				
   				<!-- write a summary for the package -->
  -				<tr bgcolor="#EEEEE" valign="top">
  +				<tr valign="top">
  +				<xsl:variable name="errorCount" select="sum(testsuite/@errors)"/>
  +				<xsl:variable name="failureCount" select="sum(testsuite/@failures)"/>
  +					<xsl:attribute name="class">
  +						<xsl:choose>
  +						    <xsl:when test="$failureCount &gt; 0">Failure</xsl:when>
  +							<xsl:when test="$errorCount &gt; 0">Error</xsl:when>
  +							<xsl:otherwise>Pass</xsl:otherwise>
  +						</xsl:choose>
  +					</xsl:attribute>
   					<td><xsl:value-of select="testsuite/@package"/></td>
   					<td><xsl:value-of select="sum(testsuite/@tests)"/></td>
   					<td><xsl:value-of select="sum(testsuite/@errors)"/></td>
  @@ -52,12 +59,13 @@
   </xsl:template>
   
   <xsl:template match="testsuite">
  -		<tr bgcolor="#EEEEE" valign="top">
  +		<tr valign="top">
   			<!-- set a nice color depending if there is an error/failure -->
   			<xsl:attribute name="class">
   				<xsl:choose>
  +				    <xsl:when test="@failures[.&gt; 0]">Failure</xsl:when>
   					<xsl:when test="@errors[.&gt; 0]">Error</xsl:when>
  -					<xsl:when test="@failures[.&gt; 0]">Failure</xsl:when>
  +					<xsl:otherwise>Pass</xsl:otherwise>
   				</xsl:choose>
   			</xsl:attribute>
   		
  @@ -66,8 +74,12 @@
   			<td><xsl:value-of select="@tests"/></td>
   			<td><xsl:value-of select="@errors"/></td>
   			<td><xsl:value-of select="@failures"/></td>
  -			<td><xsl:value-of select="format-number(@time,'#,###0.000')"/></td>
  +			<td>
  +                <xsl:call-template name="display-time">
  +                	<xsl:with-param name="value" select="@time"/>
  +                </xsl:call-template>			
  +			</td>
   		</tr>
   </xsl:template>
   
  -</xsl:stylesheet>
  \ No newline at end of file
  +</xsl:stylesheet>
  
  
  
  1.2       +50 -16    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/toolkit.xsl
  
  Index: toolkit.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/toolkit.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- toolkit.xsl	2001/02/02 17:03:59	1.1
  +++ toolkit.xsl	2001/03/02 16:00:11	1.2
  @@ -1,9 +1,28 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
  -
  -<!-- This style sheet should contain just a named templates that used in the other specific templates -->
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  +
  +<!--
  +    format a number in to display its value in percent
  +    @param value the number to format
  +-->
  +<xsl:template name="display-time">
  +	<xsl:param name="value"/>
  +	<xsl:value-of select="format-number($value,'0.000')"/>
  +</xsl:template>
  +
  +<!--
  +    format a number in to display its value in percent
  +    @param value the number to format
  +-->
  +<xsl:template name="display-percent">
  +	<xsl:param name="value"/>
  +	<xsl:value-of select="format-number($value,'0.00%')"/>
  +</xsl:template>
   
  -<!-- transform string like a.b.c to ../../../  -->
  +<!--
  +    transform string like a.b.c to ../../../
  +    @param path the path to transform into a descending directory path
  +-->
   <xsl:template name="path">
   	<xsl:param name="path"/>
   	<xsl:if test="contains($path,'.')">
  @@ -119,18 +138,27 @@
   		<xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/>
   		<table border="0" cellpadding="5" cellspacing="2" width="95%">
   		<xsl:call-template name="summaryHeader"/>
  -		<tr bgcolor="#EEEEE" valign="top">
  +		<tr valign="top">
   			<xsl:attribute name="class">
  -				<xsl:choose>
  -					<xsl:when test="./failure | ./error">Error</xsl:when>
  -					<xsl:otherwise>TableRowColor</xsl:otherwise>
  -				</xsl:choose>
  +    			<xsl:choose>
  +    			    <xsl:when test="$failureCount &gt; 0">Failure</xsl:when>
  +    				<xsl:when test="$errorCount &gt; 0">Error</xsl:when>
  +    				<xsl:otherwise>Pass</xsl:otherwise>
  +    			</xsl:choose>			
   			</xsl:attribute>		
   			<td><xsl:value-of select="$testCount"/></td>
   			<td><xsl:value-of select="$failureCount"/></td>
   			<td><xsl:value-of select="$errorCount"/></td>
  -			<td><xsl:value-of select="format-number($successRate,'#,##0.00%')"/></td>
  -			<td><xsl:value-of select="format-number($timeCount,'#,###0.000')"/></td>
  +			<td>
  +			    <xsl:call-template name="display-percent">
  +			        <xsl:with-param name="value" select="$successRate"/>
  +			    </xsl:call-template>
  +			</td>
  +			<td>
  +			    <xsl:call-template name="display-time">
  +			        <xsl:with-param name="value" select="$timeCount"/>
  +			    </xsl:call-template>
  +			</td>
   		</tr>
   		</table>
   		Note: <i>failures</i> are anticipated and checked for with assertions while <i>errors</i> are unanticipated.
  @@ -142,10 +170,12 @@
   		=====================================================================
   -->
   <xsl:template match="testcase">
  -	<TR bgcolor="#EEEEE" valign="top"><xsl:attribute name="class">
  +	<TR valign="top">
  +		<xsl:attribute name="class">
   			<xsl:choose>
  -				<xsl:when test="./failure | ./error">Error</xsl:when>
  -				<xsl:otherwise>TableRowColor</xsl:otherwise>
  +			    <xsl:when test="./failure">Failure</xsl:when>
  +				<xsl:when test="./error">Error</xsl:when>
  +				<xsl:otherwise>Pass</xsl:otherwise>
   			</xsl:choose>
   		</xsl:attribute>
   		<TD><xsl:value-of select="./@name"/></TD>
  @@ -160,10 +190,14 @@
   			</xsl:when>
   			<xsl:otherwise>
   				<TD>Success</TD>
  -				<TD></TD>
  +				<TD><xsl:apply-templates select="./pass"/></TD>
   			</xsl:otherwise>
   		</xsl:choose>
  -		<td><xsl:value-of select="format-number(@time,'#,###0.000')"/></td>
  +		<td>
  +		    <xsl:call-template name="display-time">
  +		        <xsl:with-param name="value" select="@time"/>
  +		    </xsl:call-template>				
  +		</td>
   	</TR>
   </xsl:template>
   
  @@ -201,4 +235,4 @@
   	<xsl:apply-templates/>
   </xsl:template>
   
  -</xsl:stylesheet>
  \ No newline at end of file
  +</xsl:stylesheet>
  
  
  
  1.12      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/types/CommandlineJava.java
  
  Index: CommandlineJava.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/CommandlineJava.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- CommandlineJava.java	2001/02/15 13:39:58	1.11
  +++ CommandlineJava.java	2001/03/02 16:00:38	1.12
  @@ -189,7 +189,7 @@
                                result, pos, sysProperties.size());
               pos += sysProperties.size();
           }
  -        if (fullClasspath != null && fullClasspath.size() > 0) {
  +        if (fullClasspath != null && fullClasspath.toString().trim().length() > 0) {
               result[pos++] = "-classpath";
               result[pos++] = fullClasspath.toString();
           }
  
  
  
  1.4       +4 -0      jakarta-ant/src/main/org/apache/tools/ant/types/Mapper.java
  
  Index: Mapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/Mapper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Mapper.java	2000/11/30 14:20:19	1.3
  +++ Mapper.java	2001/03/02 16:00:43	1.4
  @@ -213,6 +213,10 @@
               throw be;
           } catch (Throwable t) {
               throw new BuildException(t);
  +        } finally {
  +            if (type != null) {
  +                classname = null;
  +            }
           }
       }
           
  
  
  
  1.3       +7 -0      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/TarTest.java
  
  Index: TarTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/TarTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TarTest.java	2001/01/03 14:18:49	1.2
  +++ TarTest.java	2001/03/02 16:00:55	1.3
  @@ -79,4 +79,11 @@
           expectBuildException("test3", "required argument not specified");
       }
   
  +    public void test4() { 
  +        expectBuildException("test4", "tar cannot include itself");
  +    }
  +
  +    public void tearDown() {
  +        executeTarget("cleanup");
  +    }
   }
  
  
  
  1.3       +13 -0     jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java
  
  Index: ZipTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ZipTest.java	2001/01/03 14:18:49	1.2
  +++ ZipTest.java	2001/03/02 16:01:01	1.3
  @@ -74,4 +74,17 @@
       public void test2() { 
           expectBuildException("test2", "required argument not specified");
       }
  +    
  +    public void test3() { 
  +        expectBuildException("test3", "zip cannot include itself");
  +    }
  +
  +    public void test4() { 
  +        expectBuildException("test4", "zip cannot include itself");
  +    }
  +    
  +    public void tearDown() {
  +        executeTarget("cleanup");
  +    }
  +    
   }
  
  
  
  1.3       +21 -0     jakarta-ant/src/testcases/org/apache/tools/ant/types/MapperTest.java
  
  Index: MapperTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/types/MapperTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MapperTest.java	2001/01/03 14:18:51	1.2
  +++ MapperTest.java	2001/03/02 16:01:13	1.3
  @@ -57,6 +57,7 @@
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.util.*;
  +import org.apache.tools.ant.taskdefs.TaskdefsTest;
   
   import junit.framework.TestCase;
   import junit.framework.AssertionFailedError;
  @@ -173,5 +174,25 @@
           String[] result = fmm.mapFileName("a.java");
           assertEquals("a.java should match", 1, result.length);
           assertEquals("a.class", result[0]);
  +    }
  +
  +    public void testCopyTaskWithTwoFilesets() {
  +        TaskdefForCopyTest t = new TaskdefForCopyTest("test1");
  +        t.setUp();
  +        t.test1();
  +    }
  +
  +    private class TaskdefForCopyTest extends TaskdefsTest {
  +        TaskdefForCopyTest(String name) {
  +            super(name);
  +        }
  +
  +        public void setUp() { 
  +            configureProject("src/etc/testcases/types/mapper.xml");
  +        }
  +
  +        public void test1() { 
  +            executeTarget("test1");
  +        }
       }
   }
  
  
  

Mime
View raw message