Clover coverage report - Ant Coverage
Coverage timestamp: Tue Apr 8 2003 20:43:55 EST
file stats: LOC: 610   Methods: 25
NCLOC: 211   Classes: 4
 
 Source file Conditionals Statements Methods TOTAL
EjbJar.java 0% 0% 0% 0%
 1   
 /*
 2   
  * The Apache Software License, Version 1.1
 3   
  *
 4   
  * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
 5   
  * reserved.
 6   
  *
 7   
  * Redistribution and use in source and binary forms, with or without
 8   
  * modification, are permitted provided that the following conditions
 9   
  * are met:
 10   
  *
 11   
  * 1. Redistributions of source code must retain the above copyright
 12   
  *    notice, this list of conditions and the following disclaimer.
 13   
  *
 14   
  * 2. Redistributions in binary form must reproduce the above copyright
 15   
  *    notice, this list of conditions and the following disclaimer in
 16   
  *    the documentation and/or other materials provided with the
 17   
  *    distribution.
 18   
  *
 19   
  * 3. The end-user documentation included with the redistribution, if
 20   
  *    any, must include the following acknowlegement:
 21   
  *       "This product includes software developed by the
 22   
  *        Apache Software Foundation (http://www.apache.org/)."
 23   
  *    Alternately, this acknowlegement may appear in the software itself,
 24   
  *    if and wherever such third-party acknowlegements normally appear.
 25   
  *
 26   
  * 4. The names "Ant" and "Apache Software
 27   
  *    Foundation" must not be used to endorse or promote products derived
 28   
  *    from this software without prior written permission. For written
 29   
  *    permission, please contact apache@apache.org.
 30   
  *
 31   
  * 5. Products derived from this software may not be called "Apache"
 32   
  *    nor may "Apache" appear in their names without prior written
 33   
  *    permission of the Apache Group.
 34   
  *
 35   
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 36   
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 37   
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 38   
  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 39   
  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 40   
  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 41   
  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 42   
  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 43   
  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 44   
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 45   
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 46   
  * SUCH DAMAGE.
 47   
  * ====================================================================
 48   
  *
 49   
  * This software consists of voluntary contributions made by many
 50   
  * individuals on behalf of the Apache Software Foundation.  For more
 51   
  * information on the Apache Software Foundation, please see
 52   
  * <http://www.apache.org/>.
 53   
  */
 54   
 
 55   
 package org.apache.tools.ant.taskdefs.optional.ejb;
 56   
 
 57   
 // Standard java imports
 58   
 import java.io.File;
 59   
 import java.util.ArrayList;
 60   
 import java.util.Iterator;
 61   
 import java.util.List;
 62   
 import javax.xml.parsers.ParserConfigurationException;
 63   
 import javax.xml.parsers.SAXParser;
 64   
 import javax.xml.parsers.SAXParserFactory;
 65   
 import org.apache.tools.ant.BuildException;
 66   
 import org.apache.tools.ant.DirectoryScanner;
 67   
 import org.apache.tools.ant.Project;
 68   
 import org.apache.tools.ant.taskdefs.MatchingTask;
 69   
 import org.apache.tools.ant.types.EnumeratedAttribute;
 70   
 import org.apache.tools.ant.types.FileSet;
 71   
 import org.apache.tools.ant.types.Path;
 72   
 import org.xml.sax.SAXException;
 73   
 
 74   
 /**
 75   
  * Provides automated EJB JAR file creation.
 76   
  * <p>
 77   
  * Extends the
 78   
  * MatchingTask class provided in the default ant distribution to provide a
 79   
  * directory scanning EJB jarfile generator.
 80   
  * </p>
 81   
  *
 82   
  * <p>
 83   
  * The task works by taking the deployment descriptors one at a time and
 84   
  * parsing them to locate the names of the classes which should be placed in
 85   
  * the jar. The classnames are translated to java.io.Files by replacing
 86   
  * periods with File.separatorChar and resolving the generated filename as a
 87   
  * relative path under the srcDir attribute. All necessary files are then
 88   
  * assembled into a jarfile. One jarfile is constructed for each deployment
 89   
  * descriptor found.
 90   
  * </p>
 91   
  *
 92   
  * @author <a href="mailto:tfennell@sapient.com">Tim Fennell</a>
 93   
  * @author Conor MacNeill
 94   
  */
 95   
 public class EjbJar extends MatchingTask {
 96   
 
 97   
     /**
 98   
      * Inner class used to record information about the location of a local DTD
 99   
      */
 100   
     public static class DTDLocation
 101   
         extends org.apache.tools.ant.types.DTDLocation {
 102   
     }
 103   
 
 104   
     /**
 105   
      * A class which contains the configuration state of the ejbjar task.
 106   
      * This state is passed to the deployment tools for configuration
 107   
      */
 108   
     static class Config {
 109   
         /**
 110   
          * Stores a handle to the directory under which to search for class
 111   
          * files
 112   
          */
 113   
         public File srcDir;
 114   
 
 115   
         /**
 116   
          * Stores a handle to the directory under which to search for
 117   
          * deployment descriptors
 118   
          */
 119   
         public File descriptorDir;
 120   
 
 121   
         /** Instance variable that marks the end of the 'basename' */
 122   
         public String baseNameTerminator = "-";
 123   
 
 124   
         /** Stores a handle to the destination EJB Jar file */
 125   
         public String baseJarName;
 126   
 
 127   
         /**
 128   
          * Instance variable that determines whether to use a package structure
 129   
          * of a flat directory as the destination for the jar files.
 130   
          */
 131   
         public boolean flatDestDir = false;
 132   
 
 133   
         /**
 134   
          * The classpath to use when loading classes
 135   
          */
 136   
         public Path classpath;
 137   
 
 138   
         /**
 139   
          * A Fileset of support classes
 140   
          */
 141   
         public List supportFileSets = new ArrayList();
 142   
 
 143   
         /**
 144   
          * The list of configured DTD locations
 145   
          */
 146   
         public ArrayList dtdLocations = new ArrayList();
 147   
 
 148   
         /**
 149   
          * The naming scheme used to determine the generated jar name
 150   
          * from the descriptor information
 151   
          */
 152   
         public NamingScheme namingScheme;
 153   
 
 154   
         /**
 155   
          * The Manifest file
 156   
          */
 157   
         public File manifest;
 158   
 
 159   
         /**
 160   
          * The dependency analyzer to use to add additional classes to the jar
 161   
          */
 162   
         public String analyzer;
 163   
     }
 164   
 
 165   
     /**
 166   
      * An EnumeratedAttribute class for handling different EJB jar naming
 167   
      * schemes
 168   
      */
 169   
     public static class NamingScheme extends EnumeratedAttribute {
 170   
         /**
 171   
          * Naming scheme where generated jar is determined from the ejb-name in
 172   
          * the deployment descripor
 173   
          */
 174   
         public static final String EJB_NAME = "ejb-name";
 175   
 
 176   
         /**
 177   
          * Naming scheme where the generated jar name is based on the
 178   
          * name of the directory containing the deployment descriptor
 179   
          */
 180   
         public static final String DIRECTORY = "directory";
 181   
 
 182   
         /**
 183   
          * Naming scheme where the generated jar name is based on the name of
 184   
          * the deployment descriptor file
 185   
          */
 186   
         public static final String DESCRIPTOR = "descriptor";
 187   
 
 188   
         /**
 189   
          * Naming scheme where the generated jar is named by the basejarname
 190   
          * attribute
 191   
          */
 192   
         public static final String BASEJARNAME = "basejarname";
 193   
 
 194   
         /**
 195   
          * Gets the values of the NamingScheme
 196   
          *
 197   
          * @return an array of the values of this attribute class.
 198   
          */
 199  0
         public String[] getValues() {
 200  0
             return new String[] {EJB_NAME, DIRECTORY, DESCRIPTOR, BASEJARNAME};
 201   
         }
 202   
     }
 203   
 
 204   
     /**
 205   
      * The config which is built by this task and used by the various deployment
 206   
      * tools to access the configuration of the ejbjar task
 207   
      */
 208   
     private Config config = new Config();
 209   
 
 210   
 
 211   
     /**
 212   
      * Stores a handle to the directory to put the Jar files in. This is
 213   
      * only used by the generic deployment descriptor tool which is created
 214   
      * if no other deployment descriptor tools are provided. Normally each
 215   
      * deployment tool will specify the desitination dir itself.
 216   
      */
 217   
     private File destDir;
 218   
 
 219   
     /** Instance variable that stores the suffix for the generated jarfile. */
 220   
     private String genericJarSuffix = "-generic.jar";
 221   
 
 222   
     /** The list of deployment tools we are going to run. */
 223   
     private ArrayList deploymentTools = new ArrayList();
 224   
 
 225   
 
 226   
     /**
 227   
      * Add a deployment tool to the list of deployment tools that will be
 228   
      * processed
 229   
      *
 230   
      * @param deploymentTool a deployment tool instance to which descriptors
 231   
      *        will be passed for processing.
 232   
      */
 233  0
     protected void addDeploymentTool(EJBDeploymentTool deploymentTool) {
 234  0
         deploymentTool.setTask(this);
 235  0
         deploymentTools.add(deploymentTool);
 236   
     }
 237   
 
 238   
     /**
 239   
      * Adds a deployment tool for Weblogic server.
 240   
      *
 241   
      * @return the deployment tool instance to be configured.
 242   
      */
 243  0
     public WeblogicDeploymentTool createWeblogic() {
 244  0
         WeblogicDeploymentTool tool = new WeblogicDeploymentTool();
 245  0
         addDeploymentTool(tool);
 246  0
         return tool;
 247   
     }
 248   
 
 249   
     /**
 250   
      * Adds a deployment tool for Websphere 4.0 server.
 251   
      *
 252   
      * @return the deployment tool instance to be configured.
 253   
      */
 254  0
     public WebsphereDeploymentTool createWebsphere() {
 255  0
         WebsphereDeploymentTool tool = new WebsphereDeploymentTool();
 256  0
         addDeploymentTool(tool);
 257  0
         return tool;
 258   
     }
 259   
 
 260   
     /**
 261   
      * Adds a deployment tool for Borland server.
 262   
      *
 263   
      * @return the deployment tool instance to be configured.
 264   
      */
 265  0
     public BorlandDeploymentTool createBorland() {
 266  0
         log("Borland deployment tools",  Project.MSG_VERBOSE);
 267   
 
 268  0
         BorlandDeploymentTool tool = new BorlandDeploymentTool();
 269  0
         tool.setTask(this);
 270  0
         deploymentTools.add(tool);
 271  0
         return tool;
 272   
     }
 273   
 
 274   
     /**
 275   
      * Adds a deployment tool for iPlanet Application Server.
 276   
      *
 277   
      * @return the deployment tool instance to be configured.
 278   
      */
 279  0
     public IPlanetDeploymentTool createIplanet() {
 280  0
         log("iPlanet Application Server deployment tools", Project.MSG_VERBOSE);
 281   
 
 282  0
         IPlanetDeploymentTool tool = new IPlanetDeploymentTool();
 283  0
         addDeploymentTool(tool);
 284  0
         return tool;
 285   
     }
 286   
 
 287   
     /**
 288   
      * Adds a deployment tool for JBoss server.
 289   
      *
 290   
      * @return the deployment tool instance to be configured.
 291   
      */
 292  0
     public JbossDeploymentTool createJboss() {
 293  0
         JbossDeploymentTool tool = new JbossDeploymentTool();
 294  0
         addDeploymentTool(tool);
 295  0
         return tool;
 296   
     }
 297   
 
 298   
     /**
 299   
      * Adds a deployment tool for JOnAS server.
 300   
      *
 301   
      * @return the deployment tool instance to be configured.
 302   
      */
 303  0
     public JonasDeploymentTool createJonas() {
 304  0
         log("JOnAS deployment tools",  Project.MSG_VERBOSE);
 305   
 
 306  0
         JonasDeploymentTool tool = new JonasDeploymentTool();
 307  0
         addDeploymentTool(tool);
 308  0
         return tool;
 309   
     }
 310   
 
 311   
     /**
 312   
      * Adds a deployment tool for Weblogic when using the Toplink
 313   
      * Object-Relational mapping.
 314   
      *
 315   
      * @return the deployment tool instance to be configured.
 316   
      */
 317  0
     public WeblogicTOPLinkDeploymentTool createWeblogictoplink() {
 318  0
         log("The <weblogictoplink> element is no longer required. Please use "
 319   
             + "the <weblogic> element and set newCMP=\"true\"",
 320   
             Project.MSG_INFO);
 321  0
         WeblogicTOPLinkDeploymentTool tool
 322   
             = new WeblogicTOPLinkDeploymentTool();
 323  0
         addDeploymentTool(tool);
 324  0
         return tool;
 325   
     }
 326   
 
 327   
     /**
 328   
      * Adds to the classpath used to locate the super classes and
 329   
      * interfaces of the classes that will make up the EJB JAR.
 330   
      *
 331   
      * @return the path to be configured.
 332   
      */
 333  0
     public Path createClasspath() {
 334  0
         if (config.classpath == null) {
 335  0
             config.classpath = new Path(getProject());
 336   
         }
 337  0
         return config.classpath.createPath();
 338   
     }
 339   
 
 340   
     /**
 341   
      * Create a DTD location record. This stores the location of a DTD. The
 342   
      * DTD is identified by its public Id. The location may either be a file
 343   
      * location or a resource location.
 344   
      *
 345   
      * @return the DTD location object to be configured by Ant
 346   
      */
 347  0
     public DTDLocation createDTD() {
 348  0
         DTDLocation dtdLocation = new DTDLocation();
 349  0
         config.dtdLocations.add(dtdLocation);
 350   
 
 351  0
         return dtdLocation;
 352   
     }
 353   
 
 354   
     /**
 355   
      * Adds a fileset for support elements.
 356   
      *
 357   
      * @return a fileset which can be populated with support files.
 358   
      */
 359  0
     public FileSet createSupport() {
 360  0
         FileSet supportFileSet = new FileSet();
 361  0
         config.supportFileSets.add(supportFileSet);
 362  0
         return supportFileSet;
 363   
     }
 364   
 
 365   
 
 366   
     /**
 367   
      * Set the Manifest file to use when jarring. As of EJB 1.1, manifest
 368   
      * files are no longer used to configure the EJB. However, they still
 369   
      * have a vital importance if the EJB is intended to be packaged in an
 370   
      * EAR file. By adding "Class-Path" settings to a Manifest file, the EJB
 371   
      * can look for classes inside the EAR file itself, allowing for easier
 372   
      * deployment. This is outlined in the J2EE specification, and all J2EE
 373   
      * components are meant to support it.
 374   
      *
 375   
      * @param manifest the manifest to be used in the EJB jar
 376   
      */
 377  0
      public void setManifest(File manifest) {
 378  0
          config.manifest = manifest;
 379   
      }
 380   
 
 381   
     /**
 382   
      * Sets the source directory, which is the directory that
 383   
      * contains the classes that will be added to the EJB jar. Typically
 384   
      * this will include the home and remote interfaces and the bean class.
 385   
      *
 386   
      * @param inDir the source directory.
 387   
      */
 388  0
     public void setSrcdir(File inDir) {
 389  0
         config.srcDir = inDir;
 390   
     }
 391   
 
 392   
     /**
 393   
      * Set the descriptor directory. The descriptor directory contains the
 394   
      * EJB deployment descriptors. These are XML files that declare the
 395   
      * properties of a bean in a particular deployment scenario. Such
 396   
      * properties include, for example, the transactional nature of the bean
 397   
      * and the security access control to the bean's methods.
 398   
      *
 399   
      * @param inDir the directory containing the deployment descriptors.
 400   
      */
 401  0
     public void setDescriptordir(File inDir) {
 402  0
         config.descriptorDir = inDir;
 403   
     }
 404   
 
 405   
     /**
 406   
      * Set the analyzer to use when adding in dependencies to the JAR.
 407   
      *
 408   
      * @param analyzer the name of the dependency analyzer or a class.
 409   
      */
 410  0
     public void setDependency(String analyzer) {
 411  0
         config.analyzer = analyzer;
 412   
     }
 413   
 
 414   
     /**
 415   
      * Set the base name of the EJB JAR that is to be created if it is not
 416   
      * to be determined from the name of the deployment descriptor files.
 417   
      *
 418   
      * @param inValue the basename that will be used when writing the jar
 419   
      *      file containing the EJB
 420   
      */
 421  0
     public void setBasejarname(String inValue) {
 422  0
         config.baseJarName = inValue;
 423  0
         if (config.namingScheme == null) {
 424  0
             config.namingScheme = new NamingScheme();
 425  0
             config.namingScheme.setValue(NamingScheme.BASEJARNAME);
 426  0
         } else if (!config.namingScheme.getValue().equals(NamingScheme.BASEJARNAME)) {
 427  0
             throw new BuildException("The basejarname attribute is not compatible with the " +
 428   
                                      config.namingScheme.getValue() + " naming scheme");
 429   
         }
 430   
     }
 431   
 
 432   
     /**
 433   
      * Set the naming scheme used to determine the name of the generated jars
 434   
      * from the deployment descriptor
 435   
      *
 436   
      * @param namingScheme the naming scheme to be used
 437   
      */
 438  0
     public void setNaming(NamingScheme namingScheme) {
 439  0
         config.namingScheme = namingScheme;
 440  0
         if (!config.namingScheme.getValue().equals(NamingScheme.BASEJARNAME) &&
 441   
             config.baseJarName != null) {
 442  0
             throw new BuildException("The basejarname attribute is not compatible with the " +
 443   
                                      config.namingScheme.getValue() + " naming scheme");
 444   
         }
 445   
     }
 446   
 
 447   
 
 448   
     /**
 449   
      * Set the destination directory. The EJB jar files will be written into
 450   
      * this directory. The jar files that exist in this directory are also
 451   
      * used when determining if the contents of the jar file have changed.
 452   
      * Note that this parameter is only used if no deployment tools are
 453   
      * specified. Typically each deployment tool will specify its own
 454   
      * destination directory.
 455   
      *
 456   
      * @param inDir the destination directory in which to generate jars
 457   
      */
 458  0
     public void setDestdir(File inDir) {
 459  0
         this.destDir = inDir;
 460   
     }
 461   
 
 462   
     /**
 463   
      * Set the classpath to use when resolving classes for inclusion in the jar.
 464   
      *
 465   
      * @param classpath the classpath to use.
 466   
      */
 467  0
     public void setClasspath(Path classpath) {
 468  0
         config.classpath = classpath;
 469   
     }
 470   
 
 471   
     /**
 472   
      * Controls whether the
 473   
      * destination JARs are written out in the destination directory with
 474   
      * the same hierarchical structure from which the deployment descriptors
 475   
      * have been read. If this is set to true the generated EJB jars are
 476   
      * written into the root of the destination directory, otherwise they
 477   
      * are written out in the same relative position as the deployment
 478   
      * descriptors in the descriptor directory.
 479   
      *
 480   
      * @param inValue the new value of the flatdestdir flag.
 481   
      */
 482  0
     public void setFlatdestdir(boolean inValue) {
 483  0
         config.flatDestDir = inValue;
 484   
     }
 485   
 
 486   
     /**
 487   
      * Set the suffix for the generated jar file. When generic jars are
 488   
      * generated, they have a suffix which is appended to the the bean name
 489   
      * to create the name of the jar file. Note that this suffix includes
 490   
      * the extension fo te jar file and should therefore end with an
 491   
      * appropriate extension such as .jar or .ear
 492   
      *
 493   
      * @param inString the string to use as the suffix.
 494   
      */
 495  0
     public void setGenericjarsuffix(String inString) {
 496  0
         this.genericJarSuffix = inString;
 497   
     }
 498   
 
 499   
     /**
 500   
      * The string which terminates the bean name.
 501   
      * The convention used by this task is
 502   
      * that bean descriptors are named as the BeanName with some suffix. The
 503   
      * baseNameTerminator string separates the bean name and the suffix and
 504   
      * is used to determine the bean name.
 505   
      *
 506   
      * @param inValue a string which marks the end of the basename.
 507   
      */
 508  0
     public void setBasenameterminator(String inValue) {
 509  0
         config.baseNameTerminator = inValue;
 510   
     }
 511   
 
 512   
     /**
 513   
      * Validate the config that has been configured from the build file
 514   
      *
 515   
      * @throws BuildException if the config is not valid
 516   
      */
 517  0
     private void validateConfig() throws BuildException {
 518  0
         if (config.srcDir == null) {
 519  0
             throw new BuildException("The srcDir attribute must be specified");
 520   
         }
 521   
 
 522  0
         if (config.descriptorDir == null) {
 523  0
             config.descriptorDir = config.srcDir;
 524   
         }
 525   
 
 526  0
         if (config.namingScheme == null) {
 527  0
             config.namingScheme = new NamingScheme();
 528  0
             config.namingScheme.setValue(NamingScheme.DESCRIPTOR);
 529  0
         } else if (config.namingScheme.getValue().equals(NamingScheme.BASEJARNAME) &&
 530   
                  config.baseJarName == null) {
 531  0
             throw new BuildException("The basejarname attribute must be specified " +
 532   
                                      "with the basejarname naming scheme");
 533   
         }
 534   
     }
 535   
 
 536   
     /**
 537   
      * Invoked by Ant after the task is prepared, when it is ready to execute
 538   
      * this task.
 539   
      *
 540   
      * This will configure all of the nested deployment tools to allow them to
 541   
      * process the jar. If no deployment tools have been configured a generic
 542   
      * tool is created to handle the jar.
 543   
      *
 544   
      * A parser is configured and then each descriptor found is passed to all
 545   
      * the deployment tool elements for processing.
 546   
      *
 547   
      * @exception BuildException thrown whenever a problem is
 548   
      *            encountered that cannot be recovered from, to signal to ant
 549   
      *            that a major problem occurred within this task.
 550   
      */
 551  0
     public void execute() throws BuildException {
 552  0
         validateConfig();
 553   
 
 554  0
         if (deploymentTools.size() == 0) {
 555  0
             GenericDeploymentTool genericTool = new GenericDeploymentTool();
 556  0
             genericTool.setTask(this);
 557  0
             genericTool.setDestdir(destDir);
 558  0
             genericTool.setGenericJarSuffix(genericJarSuffix);
 559  0
             deploymentTools.add(genericTool);
 560   
         }
 561   
 
 562  0
         for (Iterator i = deploymentTools.iterator(); i.hasNext();) {
 563  0
             EJBDeploymentTool tool = (EJBDeploymentTool) i.next();
 564  0
             tool.configure(config);
 565  0
             tool.validateConfigured();
 566   
         }
 567   
 
 568  0
         try {
 569   
             // Create the parser using whatever parser the system dictates
 570  0
             SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
 571  0
             saxParserFactory.setValidating(true);
 572  0
             SAXParser saxParser = saxParserFactory.newSAXParser();
 573   
 
 574   
 
 575  0
             DirectoryScanner ds = getDirectoryScanner(config.descriptorDir);
 576  0
             ds.scan();
 577  0
             String[] files = ds.getIncludedFiles();
 578   
 
 579  0
             log(files.length + " deployment descriptors located.",
 580   
                 Project.MSG_VERBOSE);
 581   
 
 582   
             // Loop through the files. Each file represents one deployment
 583   
             // descriptor, and hence one bean in our model.
 584  0
             for (int index = 0; index < files.length; ++index) {
 585   
                 // process the deployment descriptor in each tool
 586  0
                 for (Iterator i = deploymentTools.iterator(); i.hasNext();) {
 587  0
                     EJBDeploymentTool tool = (EJBDeploymentTool) i.next();
 588  0
                     tool.processDescriptor(files[index], saxParser);
 589   
                 }
 590   
             }
 591   
         } catch (SAXException se) {
 592  0
             String msg = "SAXException while creating parser."
 593   
                 + "  Details: "
 594   
                 + se.getMessage();
 595  0
             throw new BuildException(msg, se);
 596   
         } catch (ParserConfigurationException pce) {
 597  0
             String msg = "ParserConfigurationException while creating parser. "
 598   
                        + "Details: " + pce.getMessage();
 599  0
             throw new BuildException(msg, pce);
 600   
         }
 601   
     } // end of execute()
 602   
 }
 603   
 
 604   
 
 605   
 
 606   
 
 607   
 
 608   
 
 609   
 
 610