ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb BorlandDeploymentTool.java BorlandGenerateClient.java DDCreator.java DDCreatorHelper.java DescriptorHandler.java EJBDeploymentTool.java EjbJar.java Ejbc.java EjbcHelper.java GenericDeploymentTool.java IPlanetDeploymentTool.java IPlanetEjbc.java IPlanetEjbcTask.java InnerClassFilenameFilter.java JbossDeploymentTool.java WLRun.java WLStop.java WeblogicDeploymentTool.java WeblogicTOPLinkDeploymentTool.java
Date Sun, 16 Dec 2001 00:37:03 GMT
donaldp     01/12/15 16:37:03

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        BorlandDeploymentTool.java
                        BorlandGenerateClient.java DDCreator.java
                        DDCreatorHelper.java DescriptorHandler.java
                        EJBDeploymentTool.java EjbJar.java Ejbc.java
                        EjbcHelper.java GenericDeploymentTool.java
                        IPlanetDeploymentTool.java IPlanetEjbc.java
                        IPlanetEjbcTask.java InnerClassFilenameFilter.java
                        JbossDeploymentTool.java WLRun.java WLStop.java
                        WeblogicDeploymentTool.java
                        WeblogicTOPLinkDeploymentTool.java
  Log:
  BuildException -> TaskException
  
  Removed uneeded imports.
  
  Processed code through style formatter.
  
  Revision  Changes    Path
  1.3       +30 -28    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
  
  Index: BorlandDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BorlandDeploymentTool.java	2001/12/15 14:55:58	1.2
  +++ BorlandDeploymentTool.java	2001/12/16 00:37:02	1.3
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.BufferedReader;
   import java.io.File;
   import java.io.IOException;
  @@ -15,7 +16,7 @@
   import java.util.Hashtable;
   import java.util.Iterator;
   import java.util.Vector;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.taskdefs.Execute;
   import org.apache.tools.ant.taskdefs.ExecuteStreamHandler;
  @@ -23,7 +24,6 @@
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.Path;
   
  -
   /**
    * BorlandDeploymentTool is dedicated to the Borland Application Server 4.5 and
    * 4.5.1 This task generates and compiles the stubs and skeletons for all ejb
  @@ -60,13 +60,13 @@
   public class BorlandDeploymentTool extends GenericDeploymentTool implements ExecuteStreamHandler
   {
       public final static String PUBLICID_BORLAND_EJB
  -         = "-//Inprise Corporation//DTD Enterprise JavaBeans 1.1//EN";
  +        = "-//Inprise Corporation//DTD Enterprise JavaBeans 1.1//EN";
   
       protected final static String DEFAULT_BAS45_EJB11_DTD_LOCATION
  -         = "/com/inprise/j2ee/xml/dtds/ejb-jar.dtd";
  +        = "/com/inprise/j2ee/xml/dtds/ejb-jar.dtd";
   
       protected final static String DEFAULT_BAS_DTD_LOCATION
  -         = "/com/inprise/j2ee/xml/dtds/ejb-inprise.dtd";
  +        = "/com/inprise/j2ee/xml/dtds/ejb-inprise.dtd";
   
       protected final static String BAS_DD = "ejb-inprise.xml";
   
  @@ -130,7 +130,6 @@
           this.java2iiopdebug = debug;
       }
   
  -
       /**
        * setter used to store whether the task will include the generate client
        * task. (see : BorlandGenerateClient task)
  @@ -158,7 +157,9 @@
       }
   
       public void setProcessInputStream( OutputStream param1 )
  -        throws IOException { }
  +        throws IOException
  +    {
  +    }
   
       /**
        * @param is
  @@ -188,11 +189,10 @@
           catch( Exception e )
           {
               String msg = "Exception while parsing  java2iiop output. Details: " + e.toString();
  -            throw new BuildException( msg, e );
  +            throw new TaskException( msg, e );
           }
       }
   
  -
       /**
        * Setter used to store the suffix for the generated borland jar file.
        *
  @@ -213,7 +213,6 @@
           this.verify = verify;
       }
   
  -
       /**
        * sets some additional args to send to verify command
        *
  @@ -227,10 +226,13 @@
       // implementation of org.apache.tools.ant.taskdefs.ExecuteStreamHandler interface
   
       public void start()
  -        throws IOException { }
  -
  -    public void stop() { }
  +        throws IOException
  +    {
  +    }
   
  +    public void stop()
  +    {
  +    }
   
       protected DescriptorHandler getBorlandDescriptorHandler( final File srcDir )
       {
  @@ -245,7 +247,7 @@
                           String fileNameWithMETA = currentText;
                           //trim the META_INF\ off of the file name
                           String fileName = fileNameWithMETA.substring( META_DIR.length(),
  -                            fileNameWithMETA.length() );
  +                                                                      fileNameWithMETA.length() );
                           File descriptorFile = new File( srcDir, fileName );
   
                           ejbFiles.put( fileNameWithMETA, descriptorFile );
  @@ -253,11 +255,11 @@
                   }
               };
           handler.registerDTD( PUBLICID_BORLAND_EJB,
  -            borlandDTD == null ? DEFAULT_BAS_DTD_LOCATION : borlandDTD );
  +                             borlandDTD == null ? DEFAULT_BAS_DTD_LOCATION : borlandDTD );
   
  -        for( Iterator i = getConfig().dtdLocations.iterator(); i.hasNext();  )
  +        for( Iterator i = getConfig().dtdLocations.iterator(); i.hasNext(); )
           {
  -            EjbJar.DTDLocation dtdLocation = ( EjbJar.DTDLocation )i.next();
  +            EjbJar.DTDLocation dtdLocation = (EjbJar.DTDLocation)i.next();
               handler.registerDTD( dtdLocation.getPublicId(), dtdLocation.getLocation() );
           }
           return handler;
  @@ -281,7 +283,7 @@
           else
           {
               log( "Unable to locate borland deployment descriptor. It was expected to be in " +
  -                borlandDD.getPath(), Project.MSG_WARN );
  +                 borlandDD.getPath(), Project.MSG_WARN );
               return;
           }
       }
  @@ -295,17 +297,17 @@
        * @param jarFile Description of Parameter
        * @param files Description of Parameter
        * @param publicId Description of Parameter
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       protected void writeJar( String baseName, File jarFile, Hashtable files, String publicId )
  -        throws BuildException
  +        throws TaskException
       {
           //build the home classes list.
           Vector homes = new Vector();
           Iterator it = files.keySet().iterator();
           while( it.hasNext() )
           {
  -            String clazz = ( String )it.next();
  +            String clazz = (String)it.next();
               if( clazz.endsWith( "Home.class" ) )
               {
                   //remove .class extension
  @@ -396,13 +398,13 @@
               if( result != 0 )
               {
                   String msg = "Failed executing java2iiop (ret code is " + result + ")";
  -                throw new BuildException( msg );
  +                throw new TaskException( msg );
               }
           }
           catch( java.io.IOException e )
           {
               log( "java2iiop exception :" + e.getMessage(), Project.MSG_ERR );
  -            throw new BuildException( "Error", e );
  +            throw new TaskException( "Error", e );
           }
       }
   
  @@ -415,7 +417,7 @@
       private void generateClient( File sourceJar )
       {
           getTask().getProject().addTaskDefinition( "internal_bas_generateclient",
  -            org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient.class );
  +                                                  org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient.class );
   
           org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient gentask = null;
           log( "generate client for " + sourceJar, Project.MSG_INFO );
  @@ -424,7 +426,7 @@
               String args = verifyArgs;
               args += " " + sourceJar.getPath();
   
  -            gentask = ( BorlandGenerateClient )getTask().getProject().createTask( "internal_bas_generateclient" );
  +            gentask = (BorlandGenerateClient)getTask().getProject().createTask( "internal_bas_generateclient" );
               gentask.setEjbjar( sourceJar );
               gentask.setDebug( java2iiopdebug );
               Path classpath = getCombinedClasspath();
  @@ -439,7 +441,7 @@
           {
               //TO DO : delete the file if it is not a valid file.
               String msg = "Exception while calling " + VERIFY + " Details: " + e.toString();
  -            throw new BuildException( msg, e );
  +            throw new TaskException( msg, e );
           }
       }
   
  @@ -487,7 +489,7 @@
               String args = verifyArgs;
               args += " " + sourceJar.getPath();
   
  -            javaTask = ( Java )getTask().getProject().createTask( "java" );
  +            javaTask = (Java)getTask().getProject().createTask( "java" );
               javaTask.setTaskName( "verify" );
               javaTask.setClassname( VERIFY );
               Commandline.Argument arguments = javaTask.createArg();
  @@ -506,7 +508,7 @@
           {
               //TO DO : delete the file if it is not a valid file.
               String msg = "Exception while calling " + VERIFY + " Details: " + e.toString();
  -            throw new BuildException( msg, e );
  +            throw new TaskException( msg, e );
           }
       }
   
  
  
  
  1.2       +13 -14    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java
  
  Index: BorlandGenerateClient.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BorlandGenerateClient.java	2001/12/15 12:06:26	1.1
  +++ BorlandGenerateClient.java	2001/12/16 00:37:02	1.2
  @@ -6,8 +6,9 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.taskdefs.ExecTask;
  @@ -15,7 +16,6 @@
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.Reference;
   
  -
   /**
    * BorlandGenerateClient is dedicated to the Borland Application Server 4.5 This
    * task generates the client jar using as input the ejb jar file. Two mode are
  @@ -100,20 +100,19 @@
           return this.classpath.createPath();
       }
   
  -
       /**
        * Do the work. The work is actually done by creating a separate JVM to run
        * a java task.
        *
  -     * @exception BuildException if someting goes wrong with the build
  +     * @exception TaskException if someting goes wrong with the build
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           if( ejbjarfile == null ||
               ejbjarfile.isDirectory() )
           {
  -            throw new BuildException( "invalid ejb jar file." );
  +            throw new TaskException( "invalid ejb jar file." );
           }// end of if ()
   
           if( clientjarfile == null ||
  @@ -149,17 +148,17 @@
       /**
        * launch the generate client using system api
        *
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       protected void executeFork()
  -        throws BuildException
  +        throws TaskException
       {
           try
           {
               log( "mode : fork" );
   
               org.apache.tools.ant.taskdefs.ExecTask execTask = null;
  -            execTask = ( ExecTask )getProject().createTask( "exec" );
  +            execTask = (ExecTask)getProject().createTask( "exec" );
   
               execTask.setDir( new File( "." ) );
               execTask.setExecutable( "iastool" );
  @@ -186,7 +185,7 @@
           {
               // Have to catch this because of the semantics of calling main()
               String msg = "Exception while calling generateclient Details: " + e.toString();
  -            throw new BuildException( msg, e );
  +            throw new TaskException( msg, e );
           }
   
       }
  @@ -194,17 +193,17 @@
       /**
        * launch the generate client using java api
        *
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       protected void executeJava()
  -        throws BuildException
  +        throws TaskException
       {
           try
           {
               log( "mode : java" );
   
               org.apache.tools.ant.taskdefs.Java execTask = null;
  -            execTask = ( Java )getProject().createTask( "java" );
  +            execTask = (Java)getProject().createTask( "java" );
   
               execTask.setDir( new File( "." ) );
               execTask.setClassname( "com.inprise.server.commandline.EJBUtilities" );
  @@ -238,7 +237,7 @@
           {
               // Have to catch this because of the semantics of calling main()
               String msg = "Exception while calling generateclient Details: " + e.toString();
  -            throw new BuildException( msg, e );
  +            throw new TaskException( msg, e );
           }
       }
   }
  
  
  
  1.2       +11 -10    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java
  
  Index: DDCreator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DDCreator.java	2001/12/15 12:06:26	1.1
  +++ DDCreator.java	2001/12/16 00:37:02	1.2
  @@ -6,8 +6,9 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
   import org.apache.tools.ant.taskdefs.Java;
   import org.apache.tools.ant.taskdefs.MatchingTask;
  @@ -86,22 +87,22 @@
        * interfaces to be available in the classpath, this also avoids having to
        * start ant with the class path of the project it is building.
        *
  -     * @exception BuildException if someting goes wrong with the build
  +     * @exception TaskException if someting goes wrong with the build
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           if( descriptorDirectory == null ||
               !descriptorDirectory.isDirectory() )
           {
  -            throw new BuildException( "descriptors directory " + descriptorDirectory.getPath() +
  -                " is not valid" );
  +            throw new TaskException( "descriptors directory " + descriptorDirectory.getPath() +
  +                                     " is not valid" );
           }
           if( generatedFilesDirectory == null ||
               !generatedFilesDirectory.isDirectory() )
           {
  -            throw new BuildException( "dest directory " + generatedFilesDirectory.getPath() +
  -                " is not valid" );
  +            throw new TaskException( "dest directory " + generatedFilesDirectory.getPath() +
  +                                     " is not valid" );
           }
   
           String args = descriptorDirectory + " " + generatedFilesDirectory;
  @@ -113,12 +114,12 @@
   
           for( int i = 0; i < files.length; ++i )
           {
  -            args += " " + files[i];
  +            args += " " + files[ i ];
           }
   
           String systemClassPath = System.getProperty( "java.class.path" );
           String execClassPath = project.translatePath( systemClassPath + ":" + classpath );
  -        Java ddCreatorTask = ( Java )project.createTask( "java" );
  +        Java ddCreatorTask = (Java)project.createTask( "java" );
           ddCreatorTask.setTaskName( getTaskName() );
           ddCreatorTask.setFork( true );
           ddCreatorTask.setClassname( "org.apache.tools.ant.taskdefs.optional.ejb.DDCreatorHelper" );
  @@ -127,7 +128,7 @@
           ddCreatorTask.setClasspath( new Path( project, execClassPath ) );
           if( ddCreatorTask.executeJava() != 0 )
           {
  -            throw new BuildException( "Execution of ddcreator helper failed" );
  +            throw new TaskException( "Execution of ddcreator helper failed" );
           }
       }
   }
  
  
  
  1.2       +13 -12    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreatorHelper.java
  
  Index: DDCreatorHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreatorHelper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DDCreatorHelper.java	2001/12/15 12:06:26	1.1
  +++ DDCreatorHelper.java	2001/12/16 00:37:02	1.2
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
   import java.io.FileInputStream;
   import java.io.ObjectInputStream;
  @@ -48,13 +49,13 @@
       private DDCreatorHelper( String[] args )
       {
           int index = 0;
  -        descriptorDirectory = new File( args[index++] );
  -        generatedFilesDirectory = new File( args[index++] );
  +        descriptorDirectory = new File( args[ index++ ] );
  +        generatedFilesDirectory = new File( args[ index++ ] );
   
  -        descriptors = new String[args.length - index];
  +        descriptors = new String[ args.length - index ];
           for( int i = 0; index < args.length; ++i )
           {
  -            descriptors[i] = args[index++];
  +            descriptors[ i ] = args[ index++ ];
           }
       }
   
  @@ -85,7 +86,7 @@
       {
           for( int i = 0; i < descriptors.length; ++i )
           {
  -            String descriptorName = descriptors[i];
  +            String descriptorName = descriptors[ i ];
               File descriptorFile = new File( descriptorDirectory, descriptorName );
   
               int extIndex = descriptorName.lastIndexOf( "." );
  @@ -102,13 +103,13 @@
   
               // do we need to regenerate the file
               if( !serFile.exists() || serFile.lastModified() < descriptorFile.lastModified()
  -                 || regenerateSerializedFile( serFile ) )
  +                || regenerateSerializedFile( serFile ) )
               {
   
                   String[] args = {"-noexit",
  -                    "-d", serFile.getParent(),
  -                    "-outputfile", serFile.getName(),
  -                    descriptorFile.getPath()};
  +                                 "-d", serFile.getParent(),
  +                                 "-outputfile", serFile.getName(),
  +                                 descriptorFile.getPath()};
                   try
                   {
                       weblogic.ejb.utils.DDCreator.main( args );
  @@ -117,8 +118,8 @@
                   {
                       // there was an exception - run with no exit to get proper error
                       String[] newArgs = {"-d", generatedFilesDirectory.getPath(),
  -                        "-outputfile", serFile.getName(),
  -                        descriptorFile.getPath()};
  +                                        "-outputfile", serFile.getName(),
  +                                        descriptorFile.getPath()};
                       weblogic.ejb.utils.DDCreator.main( newArgs );
                   }
               }
  @@ -141,7 +142,7 @@
   
               FileInputStream fis = new FileInputStream( serFile );
               ObjectInputStream ois = new ObjectInputStream( fis );
  -            DeploymentDescriptor dd = ( DeploymentDescriptor )ois.readObject();
  +            DeploymentDescriptor dd = (DeploymentDescriptor)ois.readObject();
               fis.close();
   
               // Since the descriptor read properly, everything should be o.k.
  
  
  
  1.2       +5 -7      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java
  
  Index: DescriptorHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DescriptorHandler.java	2001/12/15 12:06:26	1.1
  +++ DescriptorHandler.java	2001/12/16 00:37:02	1.2
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
   import java.io.FileInputStream;
   import java.io.FileNotFoundException;
  @@ -164,7 +165,6 @@
           currentText += new String( ch, start, length );
       }
   
  -
       /**
        * SAX parser call-back method that is invoked when an element is exited.
        * Used to blank out (set to the empty string, not nullify) the name of the
  @@ -255,7 +255,7 @@
       {
           this.publicId = publicId;
   
  -        File dtdFile = ( File )fileDTDs.get( publicId );
  +        File dtdFile = (File)fileDTDs.get( publicId );
           if( dtdFile != null )
           {
               try
  @@ -269,7 +269,7 @@
               }
           }
   
  -        String dtdResourceName = ( String )resourceDTDs.get( publicId );
  +        String dtdResourceName = (String)resourceDTDs.get( publicId );
           if( dtdResourceName != null )
           {
               InputStream is = this.getClass().getResourceAsStream( dtdResourceName );
  @@ -280,7 +280,7 @@
               }
           }
   
  -        URL dtdUrl = ( URL )urlDTDs.get( publicId );
  +        URL dtdUrl = (URL)urlDTDs.get( publicId );
           if( dtdUrl != null )
           {
               try
  @@ -296,7 +296,7 @@
           }
   
           owningTask.log( "Could not resolve ( publicId: " + publicId + ", systemId: " + systemId + ") to a local entity",
  -            Project.MSG_INFO );
  +                        Project.MSG_INFO );
   
           return null;
       }
  @@ -315,7 +315,6 @@
           inEJBRef = false;
       }
   
  -
       /**
        * SAX parser call-back method that is invoked when a new element is entered
        * into. Used to store the context (attribute name) in the currentAttribute
  @@ -355,7 +354,6 @@
               parseState = STATE_IN_MESSAGE;
           }
       }
  -
   
       protected void processElement()
       {
  
  
  
  1.2       +6 -6      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EJBDeploymentTool.java
  
  Index: EJBDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EJBDeploymentTool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EJBDeploymentTool.java	2001/12/15 12:06:26	1.1
  +++ EJBDeploymentTool.java	2001/12/16 00:37:02	1.2
  @@ -6,11 +6,11 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import javax.xml.parsers.SAXParser;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.Task;
   
  -
   public interface EJBDeploymentTool
   {
       /**
  @@ -20,18 +20,18 @@
        * @param descriptorFilename the name of the deployment descriptor
        * @param saxParser a SAX parser which can be used to parse the deployment
        *      descriptor.
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       void processDescriptor( String descriptorFilename, SAXParser saxParser )
  -        throws BuildException;
  +        throws TaskException;
   
       /**
        * Called to validate that the tool parameters have been configured.
        *
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       void validateConfigured()
  -        throws BuildException;
  +        throws TaskException;
   
       /**
        * Set the task which owns this tool
  
  
  
  1.2       +24 -25    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
  
  Index: EjbJar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EjbJar.java	2001/12/15 12:06:26	1.1
  +++ EjbJar.java	2001/12/16 00:37:02	1.2
  @@ -6,14 +6,15 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;// Standard java imports
  +
   import java.io.File;
   import java.util.ArrayList;
   import java.util.Iterator;
   import java.util.List;
  -import javax.xml.parsers.ParserConfigurationException;// XML imports
  +import javax.xml.parsers.ParserConfigurationException;
   import javax.xml.parsers.SAXParser;
  -import javax.xml.parsers.SAXParserFactory;// Apache/Ant imports
  -import org.apache.tools.ant.BuildException;
  +import javax.xml.parsers.SAXParserFactory;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.taskdefs.MatchingTask;
  @@ -94,8 +95,8 @@
           }
           else if( !config.namingScheme.getValue().equals( NamingScheme.BASEJARNAME ) )
           {
  -            throw new BuildException( "The basejarname attribute is not compatible with the " +
  -                config.namingScheme.getValue() + " naming scheme" );
  +            throw new TaskException( "The basejarname attribute is not compatible with the " +
  +                                     config.namingScheme.getValue() + " naming scheme" );
           }
       }
   
  @@ -137,7 +138,6 @@
           config.descriptorDir = inDir;
       }
   
  -
       /**
        * Set the destination directory. The EJB jar files will be written into
        * this directory. The jar files that exist in this directory are also used
  @@ -183,7 +183,6 @@
           this.genericJarSuffix = inString;
       }
   
  -
       /**
        * Set the Manifest file to use when jarring. As of EJB 1.1, manifest files
        * are no longer used to configure the EJB. However, they still have a vital
  @@ -212,8 +211,8 @@
           if( !config.namingScheme.getValue().equals( NamingScheme.BASEJARNAME ) &&
               config.baseJarName != null )
           {
  -            throw new BuildException( "The basejarname attribute is not compatible with the " +
  -                config.namingScheme.getValue() + " naming scheme" );
  +            throw new TaskException( "The basejarname attribute is not compatible with the " +
  +                                     config.namingScheme.getValue() + " naming scheme" );
           }
       }
   
  @@ -368,12 +367,12 @@
        * configured and then each descriptor found is passed to all the deployment
        * tool elements for processing.
        *
  -     * @exception BuildException thrown whenever a problem is encountered that
  +     * @exception TaskException thrown whenever a problem is encountered that
        *      cannot be recovered from, to signal to ant that a major problem
        *      occurred within this task.
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           validateConfig();
   
  @@ -386,9 +385,9 @@
               deploymentTools.add( genericTool );
           }
   
  -        for( Iterator i = deploymentTools.iterator(); i.hasNext();  )
  +        for( Iterator i = deploymentTools.iterator(); i.hasNext(); )
           {
  -            EJBDeploymentTool tool = ( EJBDeploymentTool )i.next();
  +            EJBDeploymentTool tool = (EJBDeploymentTool)i.next();
               tool.configure( config );
               tool.validateConfigured();
           }
  @@ -405,32 +404,32 @@
               String[] files = ds.getIncludedFiles();
   
               log( files.length + " deployment descriptors located.",
  -                Project.MSG_VERBOSE );
  +                 Project.MSG_VERBOSE );
   
               // Loop through the files. Each file represents one deployment
               // descriptor, and hence one bean in our model.
               for( int index = 0; index < files.length; ++index )
               {
                   // process the deployment descriptor in each tool
  -                for( Iterator i = deploymentTools.iterator(); i.hasNext();  )
  +                for( Iterator i = deploymentTools.iterator(); i.hasNext(); )
                   {
  -                    EJBDeploymentTool tool = ( EJBDeploymentTool )i.next();
  -                    tool.processDescriptor( files[index], saxParser );
  +                    EJBDeploymentTool tool = (EJBDeploymentTool)i.next();
  +                    tool.processDescriptor( files[ index ], saxParser );
                   }
               }
           }
           catch( SAXException se )
           {
               String msg = "SAXException while creating parser."
  -                 + "  Details: "
  -                 + se.getMessage();
  -            throw new BuildException( msg, se );
  +                + "  Details: "
  +                + se.getMessage();
  +            throw new TaskException( msg, se );
           }
           catch( ParserConfigurationException pce )
           {
               String msg = "ParserConfigurationException while creating parser. "
  -                 + "Details: " + pce.getMessage();
  -            throw new BuildException( msg, pce );
  +                + "Details: " + pce.getMessage();
  +            throw new TaskException( msg, pce );
           }
       }
   
  @@ -438,7 +437,7 @@
       {
           if( config.srcDir == null )
           {
  -            throw new BuildException( "The srcDir attribute must be specified" );
  +            throw new TaskException( "The srcDir attribute must be specified" );
           }
   
           if( config.descriptorDir == null )
  @@ -454,8 +453,8 @@
           else if( config.namingScheme.getValue().equals( NamingScheme.BASEJARNAME ) &&
               config.baseJarName == null )
           {
  -            throw new BuildException( "The basejarname attribute must be specified " +
  -                "with the basejarname naming scheme" );
  +            throw new TaskException( "The basejarname attribute must be specified " +
  +                                     "with the basejarname naming scheme" );
           }
       }
   
  
  
  
  1.2       +14 -13    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java
  
  Index: Ejbc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Ejbc.java	2001/12/15 12:06:26	1.1
  +++ Ejbc.java	2001/12/16 00:37:02	1.2
  @@ -6,8 +6,9 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
   import org.apache.tools.ant.taskdefs.Java;
   import org.apache.tools.ant.taskdefs.MatchingTask;
  @@ -132,40 +133,40 @@
        * avoids having to start ant with the class path of the project it is
        * building.
        *
  -     * @exception BuildException if someting goes wrong with the build
  +     * @exception TaskException if someting goes wrong with the build
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           if( descriptorDirectory == null ||
               !descriptorDirectory.isDirectory() )
           {
  -            throw new BuildException( "descriptors directory " + descriptorDirectory.getPath() +
  -                " is not valid" );
  +            throw new TaskException( "descriptors directory " + descriptorDirectory.getPath() +
  +                                     " is not valid" );
           }
           if( generatedFilesDirectory == null ||
               !generatedFilesDirectory.isDirectory() )
           {
  -            throw new BuildException( "dest directory " + generatedFilesDirectory.getPath() +
  -                " is not valid" );
  +            throw new TaskException( "dest directory " + generatedFilesDirectory.getPath() +
  +                                     " is not valid" );
           }
   
           if( sourceDirectory == null ||
               !sourceDirectory.isDirectory() )
           {
  -            throw new BuildException( "src directory " + sourceDirectory.getPath() +
  -                " is not valid" );
  +            throw new TaskException( "src directory " + sourceDirectory.getPath() +
  +                                     " is not valid" );
           }
   
           String systemClassPath = System.getProperty( "java.class.path" );
           String execClassPath = project.translatePath( systemClassPath + ":" + classpath +
  -            ":" + generatedFilesDirectory );
  +                                                      ":" + generatedFilesDirectory );
           // get all the files in the descriptor directory
           DirectoryScanner ds = super.getDirectoryScanner( descriptorDirectory );
   
           String[] files = ds.getIncludedFiles();
   
  -        Java helperTask = ( Java )project.createTask( "java" );
  +        Java helperTask = (Java)project.createTask( "java" );
           helperTask.setTaskName( getTaskName() );
           helperTask.setFork( true );
           helperTask.setClassname( "org.apache.tools.ant.taskdefs.optional.ejb.EjbcHelper" );
  @@ -178,7 +179,7 @@
   
           for( int i = 0; i < files.length; ++i )
           {
  -            args += " " + files[i];
  +            args += " " + files[ i ];
           }
   
           Commandline.Argument arguments = helperTask.createArg();
  @@ -186,7 +187,7 @@
           helperTask.setClasspath( new Path( project, execClassPath ) );
           if( helperTask.executeJava() != 0 )
           {
  -            throw new BuildException( "Execution of ejbc helper failed" );
  +            throw new TaskException( "Execution of ejbc helper failed" );
           }
       }
   }
  
  
  
  1.2       +15 -15    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbcHelper.java
  
  Index: EjbcHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbcHelper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EjbcHelper.java	2001/12/15 12:06:26	1.1
  +++ EjbcHelper.java	2001/12/16 00:37:02	1.2
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
   import java.io.FileInputStream;
   import java.io.FileWriter;
  @@ -16,7 +17,6 @@
   import javax.ejb.deployment.DeploymentDescriptor;
   import javax.ejb.deployment.EntityDescriptor;
   
  -
   /**
    * A helper class which performs the actual work of the ejbc task. This class is
    * run with a classpath which includes the weblogic tools and the home and
  @@ -72,16 +72,16 @@
       private EjbcHelper( String[] args )
       {
           int index = 0;
  -        descriptorDirectory = new File( args[index++] );
  -        generatedFilesDirectory = new File( args[index++] );
  -        sourceDirectory = new File( args[index++] );
  -        manifestFile = new File( args[index++] );
  -        keepGenerated = Boolean.valueOf( args[index++] ).booleanValue();
  +        descriptorDirectory = new File( args[ index++ ] );
  +        generatedFilesDirectory = new File( args[ index++ ] );
  +        sourceDirectory = new File( args[ index++ ] );
  +        manifestFile = new File( args[ index++ ] );
  +        keepGenerated = Boolean.valueOf( args[ index++ ] ).booleanValue();
   
  -        descriptors = new String[args.length - index];
  +        descriptors = new String[ args.length - index ];
           for( int i = 0; index < args.length; ++i )
           {
  -            descriptors[i] = args[index++];
  +            descriptors[ i ] = args[ index++ ];
           }
       }
   
  @@ -113,7 +113,7 @@
           v.addElement( generatedFilesDirectory.getPath() );
           v.addElement( descriptorFile.getPath() );
   
  -        String[] args = new String[v.size()];
  +        String[] args = new String[ v.size() ];
           v.copyInto( args );
           return args;
       }
  @@ -142,7 +142,7 @@
           {
               fis = new FileInputStream( descriptorFile );
               ObjectInputStream ois = new ObjectInputStream( fis );
  -            DeploymentDescriptor dd = ( DeploymentDescriptor )ois.readObject();
  +            DeploymentDescriptor dd = (DeploymentDescriptor)ois.readObject();
               fis.close();
   
               String homeInterfacePath = dd.getHomeInterfaceClassName().replace( '.', '/' ) + ".java";
  @@ -150,7 +150,7 @@
               String primaryKeyClassPath = null;
               if( dd instanceof EntityDescriptor )
               {
  -                primaryKeyClassPath = ( ( EntityDescriptor )dd ).getPrimaryKeyClassName().replace( '.', '/' ) + ".java";
  +                primaryKeyClassPath = ( (EntityDescriptor)dd ).getPrimaryKeyClassName().replace( '.', '/' ) + ".java";
                   ;
               }
   
  @@ -167,11 +167,11 @@
               // of the above or the .ser file itself.
               String beanClassBase = dd.getEnterpriseBeanClassName().replace( '.', '/' );
               File ejbImplentationClass
  -                 = new File( generatedFilesDirectory, beanClassBase + "EOImpl.class" );
  +                = new File( generatedFilesDirectory, beanClassBase + "EOImpl.class" );
               File homeImplementationClass
  -                 = new File( generatedFilesDirectory, beanClassBase + "HomeImpl.class" );
  +                = new File( generatedFilesDirectory, beanClassBase + "HomeImpl.class" );
               File beanStubClass
  -                 = new File( generatedFilesDirectory, beanClassBase + "EOImpl_WLStub.class" );
  +                = new File( generatedFilesDirectory, beanClassBase + "EOImpl_WLStub.class" );
   
               // if the implementation classes don;t exist regenerate
               if( !ejbImplentationClass.exists() || !homeImplementationClass.exists() ||
  @@ -234,7 +234,7 @@
           String manifest = "Manifest-Version: 1.0\n\n";
           for( int i = 0; i < descriptors.length; ++i )
           {
  -            String descriptorName = descriptors[i];
  +            String descriptorName = descriptors[ i ];
               File descriptorFile = new File( descriptorDirectory, descriptorName );
   
               if( isRegenRequired( descriptorFile ) )
  
  
  
  1.4       +20 -21    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
  
  Index: GenericDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GenericDeploymentTool.java	2001/12/15 15:20:24	1.3
  +++ GenericDeploymentTool.java	2001/12/16 00:37:02	1.4
  @@ -27,7 +27,6 @@
   import org.apache.bcel.classfile.*;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.AntClassLoader;
  -import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.DirectoryScanner;
   import org.apache.tools.ant.Location;
   import org.apache.tools.ant.Project;
  @@ -279,7 +278,7 @@
                   + "'. This probably indicates badly-formed XML."
                   + "  Details: "
                   + se.getMessage();
  -            throw new BuildException( msg, se );
  +            throw new TaskException( msg, se );
           }
           catch( IOException ioe )
           {
  @@ -288,23 +287,23 @@
                   + "'.  This probably indicates that the descriptor"
                   + " doesn't exist. Details: "
                   + ioe.getMessage();
  -            throw new BuildException( msg, ioe );
  +            throw new TaskException( msg, ioe );
           }
       }
   
       /**
        * Called to validate that the tool parameters have been configured.
        *
  -     * @throws BuildException If the Deployment Tool's configuration isn't valid
  +     * @throws TaskException If the Deployment Tool's configuration isn't valid
        */
       public void validateConfigured()
  -        throws BuildException
  +        throws TaskException
       {
           if( ( destDir == null ) || ( !destDir.isDirectory() ) )
           {
               String msg = "A valid destination directory must be specified "
                   + "using the \"destdir\" attribute.";
  -            throw new BuildException( msg );
  +            throw new TaskException( msg );
           }
       }
   
  @@ -499,12 +498,12 @@
        * @param logicalFilename A String representing the name, including all
        *      relevant path information, that should be stored for the entry being
        *      added.
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       protected void addFileToJar( JarOutputStream jStream,
                                    File inputFile,
                                    String logicalFilename )
  -        throws BuildException
  +        throws TaskException
       {
           FileInputStream iStream = null;
           try
  @@ -593,10 +592,10 @@
        *
        * @param checkEntries files, that are extracted from the deployment
        *      descriptor
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       protected void checkAndAddDependants( Hashtable checkEntries )
  -        throws BuildException
  +        throws TaskException
       {
           Dependencies visitor = new Dependencies();
           Set set = new TreeSet();
  @@ -659,22 +658,22 @@
        * This method is called as the first step in the processDescriptor method
        * to allow vendor-specific subclasses to validate the task configuration
        * prior to processing the descriptor. If the configuration is invalid, a
  -     * BuildException should be thrown.
  +     * TaskException should be thrown.
        *
        * @param descriptorFileName String representing the file name of an EJB
        *      descriptor to be processed
        * @param saxParser SAXParser which may be used to parse the XML descriptor
  -     * @exception BuildException Description of Exception
  -     * @thows BuildException Thrown if the configuration is invalid
  +     * @exception TaskException Description of Exception
  +     * @thows TaskException Thrown if the configuration is invalid
        */
       protected void checkConfiguration( String descriptorFileName,
                                          SAXParser saxParser )
  -        throws BuildException
  +        throws TaskException
       {
   
           /*
            * For the GenericDeploymentTool, do nothing.  Vendor specific
  -         * subclasses should throw a BuildException if the configuration is
  +         * subclasses should throw a TaskException if the configuration is
            * invalid for their server.
            */
       }
  @@ -816,11 +815,11 @@
        * @param jarfile Description of Parameter
        * @param files Description of Parameter
        * @param publicId Description of Parameter
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       protected void writeJar( String baseName, File jarfile, Hashtable files,
                                String publicId )
  -        throws BuildException
  +        throws TaskException
       {
   
           JarOutputStream jarStream = null;
  @@ -856,7 +855,7 @@
                       in = new FileInputStream( config.manifest );
                       if( in == null )
                       {
  -                        throw new BuildException( "Could not find manifest file: " + config.manifest );
  +                        throw new TaskException( "Could not find manifest file: " + config.manifest );
                       }
                   }
                   else
  @@ -865,7 +864,7 @@
                       in = this.getClass().getResourceAsStream( defaultManifest );
                       if( in == null )
                       {
  -                        throw new BuildException( "Could not find default manifest: " + defaultManifest );
  +                        throw new TaskException( "Could not find default manifest: " + defaultManifest );
                       }
                   }
   
  @@ -873,7 +872,7 @@
               }
               catch( IOException e )
               {
  -                throw new BuildException( "Unable to read manifest", e );
  +                throw new TaskException( "Unable to read manifest", e );
               }
               finally
               {
  @@ -933,7 +932,7 @@
                   + jarfile.toString()
                   + "'. Details: "
                   + ioe.getMessage();
  -            throw new BuildException( msg, ioe );
  +            throw new TaskException( msg, ioe );
           }
           finally
           {
  
  
  
  1.3       +25 -24    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetDeploymentTool.java
  
  Index: IPlanetDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetDeploymentTool.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IPlanetDeploymentTool.java	2001/12/15 14:55:58	1.2
  +++ IPlanetDeploymentTool.java	2001/12/16 00:37:02	1.3
  @@ -6,11 +6,12 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
   import java.io.IOException;
   import java.util.Hashtable;
   import javax.xml.parsers.SAXParser;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.Project;
   import org.xml.sax.SAXException;
   
  @@ -122,7 +123,7 @@
           log( "Since a generic JAR file is not created during processing, the "
                + "iPlanet Deployment Tool does not support the "
                + "\"genericjarsuffix\" attribute.  It will be ignored.",
  -            Project.MSG_WARN );
  +             Project.MSG_WARN );
       }
   
       /**
  @@ -194,7 +195,7 @@
       protected void addVendorFiles( Hashtable ejbFiles, String ddPrefix )
       {
           ejbFiles.put( META_DIR + IAS_DD, new File( getConfig().descriptorDir,
  -            getIasDescriptorName() ) );
  +                                                   getIasDescriptorName() ) );
       }
   
       /**
  @@ -203,11 +204,11 @@
        * @param descriptorFileName String representing the file name of an EJB
        *      descriptor to be processed
        * @param saxParser SAXParser which may be used to parse the XML descriptor
  -     * @throws BuildException If the user selections are invalid.
  +     * @throws TaskException If the user selections are invalid.
        */
       protected void checkConfiguration( String descriptorFileName,
                                          SAXParser saxParser )
  -        throws BuildException
  +        throws TaskException
       {
   
           int startOfName = descriptorFileName.lastIndexOf( File.separatorChar ) + 1;
  @@ -215,26 +216,26 @@
           if( stdXml.equals( EJB_DD ) && ( getConfig().baseJarName == null ) )
           {
               String msg = "No name specified for the completed JAR file.  The EJB"
  -                 + " descriptor should be prepended with the JAR "
  -                 + "name or it should be specified using the "
  -                 + "attribute \"basejarname\" in the \"ejbjar\" task.";
  -            throw new BuildException( msg );
  +                + " descriptor should be prepended with the JAR "
  +                + "name or it should be specified using the "
  +                + "attribute \"basejarname\" in the \"ejbjar\" task.";
  +            throw new TaskException( msg );
           }
   
           File iasDescriptor = new File( getConfig().descriptorDir,
  -            getIasDescriptorName() );
  +                                       getIasDescriptorName() );
           if( ( !iasDescriptor.exists() ) || ( !iasDescriptor.isFile() ) )
           {
               String msg = "The iAS-specific EJB descriptor ("
  -                 + iasDescriptor + ") was not found.";
  -            throw new BuildException( msg );
  +                + iasDescriptor + ") was not found.";
  +            throw new TaskException( msg );
           }
   
           if( ( iashome != null ) && ( !iashome.isDirectory() ) )
           {
               String msg = "If \"iashome\" is specified, it must be a valid "
  -                 + "directory (it was set to " + iashome + ").";
  -            throw new BuildException( msg );
  +                + "directory (it was set to " + iashome + ").";
  +            throw new TaskException( msg );
           }
       }
   
  @@ -264,9 +265,9 @@
            */
           IPlanetEjbc ejbc = new IPlanetEjbc(
               new File( getConfig().descriptorDir,
  -            descriptorFileName ),
  +                      descriptorFileName ),
               new File( getConfig().descriptorDir,
  -            getIasDescriptorName() ),
  +                      getIasDescriptorName() ),
               getConfig().srcDir,
               getCombinedClasspath().toString(),
               saxParser );
  @@ -286,8 +287,8 @@
           }
           catch( IPlanetEjbc.EjbcException e )
           {
  -            throw new BuildException( "An error has occurred while trying to "
  -                 + "execute the iAS ejbc utility", e );
  +            throw new TaskException( "An error has occurred while trying to "
  +                                     + "execute the iAS ejbc utility", e );
           }
   
           displayName = ejbc.getDisplayName();
  @@ -306,16 +307,16 @@
   
               for( int i = 0; i < cmpDescriptors.length; i++ )
               {
  -                int endOfCmp = cmpDescriptors[i].lastIndexOf( '/' );
  -                String cmpDescriptor = cmpDescriptors[i].substring( endOfCmp + 1 );
  +                int endOfCmp = cmpDescriptors[ i ].lastIndexOf( '/' );
  +                String cmpDescriptor = cmpDescriptors[ i ].substring( endOfCmp + 1 );
   
                   File cmpFile = new File( baseDir, relativePath + cmpDescriptor );
                   if( !cmpFile.exists() )
                   {
  -                    throw new BuildException( "The CMP descriptor file ("
  -                         + cmpFile + ") could not be found." );
  +                    throw new TaskException( "The CMP descriptor file ("
  +                                             + cmpFile + ") could not be found." );
                   }
  -                files.put( cmpDescriptors[i], cmpFile );
  +                files.put( cmpDescriptors[ i ], cmpFile );
               }
           }
   
  @@ -398,7 +399,7 @@
               }
   
               basename = descriptorName.substring( startOfFileName + 1,
  -                endOfBaseName + 1 );
  +                                                 endOfBaseName + 1 );
               remainder = descriptorName.substring( endOfBaseName + 1 );
           }
   
  
  
  
  1.2       +82 -84    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java
  
  Index: IPlanetEjbc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IPlanetEjbc.java	2001/12/15 12:06:26	1.1
  +++ IPlanetEjbc.java	2001/12/16 00:37:02	1.2
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.BufferedReader;
   import java.io.File;
   import java.io.FileInputStream;
  @@ -145,13 +146,13 @@
           if( classpath != null )
           {
               StringTokenizer st = new StringTokenizer( classpath,
  -                File.pathSeparator );
  +                                                      File.pathSeparator );
               while( st.hasMoreTokens() )
               {
                   elements.add( st.nextToken() );
               }
               classpathElements
  -                 = ( String[] )elements.toArray( new String[elements.size()] );
  +                = (String[])elements.toArray( new String[ elements.size() ] );
           }
       }
   
  @@ -179,24 +180,24 @@
               return;
           }
   
  -        stdDescriptor = new File( args[args.length - 2] );
  -        iasDescriptor = new File( args[args.length - 1] );
  +        stdDescriptor = new File( args[ args.length - 2 ] );
  +        iasDescriptor = new File( args[ args.length - 1 ] );
   
           for( int i = 0; i < args.length - 2; i++ )
           {
  -            if( args[i].equals( "-classpath" ) )
  +            if( args[ i ].equals( "-classpath" ) )
               {
  -                classpath = args[++i];
  +                classpath = args[ ++i ];
               }
  -            else if( args[i].equals( "-d" ) )
  +            else if( args[ i ].equals( "-d" ) )
               {
  -                destDirectory = new File( args[++i] );
  +                destDirectory = new File( args[ ++i ] );
               }
  -            else if( args[i].equals( "-debug" ) )
  +            else if( args[ i ].equals( "-debug" ) )
               {
                   debug = true;
               }
  -            else if( args[i].equals( "-keepsource" ) )
  +            else if( args[ i ].equals( "-keepsource" ) )
               {
                   retainSource = true;
               }
  @@ -248,7 +249,7 @@
            * Build and populate an instance of the ejbc utility
            */
           ejbc = new IPlanetEjbc( stdDescriptor, iasDescriptor, destDirectory,
  -            classpath, parser );
  +                                classpath, parser );
           ejbc.setDebugOutput( debug );
           ejbc.setRetainSource( retainSource );
   
  @@ -262,19 +263,19 @@
           catch( IOException e )
           {
               System.out.println( "An IOException has occurred while reading the "
  -                 + "XML descriptors (" + e.getMessage() + ")." );
  +                                + "XML descriptors (" + e.getMessage() + ")." );
               return;
           }
           catch( SAXException e )
           {
               System.out.println( "A SAXException has occurred while reading the "
  -                 + "XML descriptors (" + e.getMessage() + ")." );
  +                                + "XML descriptors (" + e.getMessage() + ")." );
               return;
           }
           catch( IPlanetEjbc.EjbcException e )
           {
               System.out.println( "An error has occurred while executing the ejbc "
  -                 + "utility (" + e.getMessage() + ")." );
  +                                + "utility (" + e.getMessage() + ")." );
               return;
           }
       }
  @@ -353,11 +354,11 @@
   
           for( int i = 0; i < ejbs.length; i++ )
           {
  -            List descriptors = ( List )ejbs[i].getCmpDescriptors();
  +            List descriptors = (List)ejbs[ i ].getCmpDescriptors();
               returnList.addAll( descriptors );
           }
   
  -        return ( String[] )returnList.toArray( new String[returnList.size()] );
  +        return (String[])returnList.toArray( new String[ returnList.size() ] );
       }
   
       /**
  @@ -407,12 +408,12 @@
           for( int i = 0; i < ejbs.length; i++ )
           {
               log( "EJBInfo..." );
  -            log( ejbs[i].toString() );
  +            log( ejbs[ i ].toString() );
           }
   
           for( int i = 0; i < ejbs.length; i++ )
           {
  -            EjbInfo ejb = ejbs[i];
  +            EjbInfo ejb = ejbs[ i ];
   
               ejb.checkConfiguration( destDirectory );// Throws EjbcException
   
  @@ -588,7 +589,7 @@
           /*
            * Convert the List into an Array and return it
            */
  -        return ( String[] )arguments.toArray( new String[arguments.size()] );
  +        return (String[])arguments.toArray( new String[ arguments.size() ] );
       }
   
       /**
  @@ -605,7 +606,7 @@
           StringBuffer args = new StringBuffer();
           for( int i = 0; i < arguments.length; i++ )
           {
  -            args.append( arguments[i] ).append( " " );
  +            args.append( arguments[ i ] ).append( " " );
           }
   
           /*
  @@ -619,7 +620,7 @@
           else
           {
               command = iasHomeDir.toString() + File.separator + "bin"
  -                 + File.separator;
  +                + File.separator;
           }
           command += "ejbc ";
   
  @@ -745,7 +746,7 @@
           public File getClassFile( File directory )
           {
               String pathToFile = qualifiedName.replace( '.', File.separatorChar )
  -                 + ".class";
  +                + ".class";
               return new File( directory, pathToFile );
           }
   
  @@ -805,7 +806,6 @@
           }
       }// End of EjbcHandler inner class
   
  -
       /**
        * This inner class represents an EJB that will be compiled using ejbc.
        *
  @@ -1005,13 +1005,13 @@
           public String toString()
           {
               String s = "EJB name: " + name
  -                 + "\n\r              home:      " + home
  -                 + "\n\r              remote:    " + remote
  -                 + "\n\r              impl:      " + implementation
  -                 + "\n\r              beantype:  " + beantype
  -                 + "\n\r              cmp:       " + cmp
  -                 + "\n\r              iiop:      " + iiop
  -                 + "\n\r              hasession: " + hasession;
  +                + "\n\r              home:      " + home
  +                + "\n\r              remote:    " + remote
  +                + "\n\r              impl:      " + implementation
  +                + "\n\r              beantype:  " + beantype
  +                + "\n\r              cmp:       " + cmp
  +                + "\n\r              iiop:      " + iiop
  +                + "\n\r              hasession: " + hasession;
   
               Iterator i = cmpDescriptors.iterator();
               while( i.hasNext() )
  @@ -1040,40 +1040,40 @@
               if( home == null )
               {
                   throw new EjbcException( "A home interface was not found "
  -                     + "for the " + name + " EJB." );
  +                                         + "for the " + name + " EJB." );
               }
               if( remote == null )
               {
                   throw new EjbcException( "A remote interface was not found "
  -                     + "for the " + name + " EJB." );
  +                                         + "for the " + name + " EJB." );
               }
               if( implementation == null )
               {
                   throw new EjbcException( "An EJB implementation class was not "
  -                     + "found for the " + name + " EJB." );
  +                                         + "found for the " + name + " EJB." );
               }
   
               if( ( !beantype.equals( ENTITY_BEAN ) )
  -                 && ( !beantype.equals( STATELESS_SESSION ) )
  -                 && ( !beantype.equals( STATEFUL_SESSION ) ) )
  +                && ( !beantype.equals( STATELESS_SESSION ) )
  +                && ( !beantype.equals( STATEFUL_SESSION ) ) )
               {
                   throw new EjbcException( "The beantype found (" + beantype + ") "
  -                     + "isn't valid in the " + name + " EJB." );
  +                                         + "isn't valid in the " + name + " EJB." );
               }
   
               if( cmp && ( !beantype.equals( ENTITY_BEAN ) ) )
               {
                   System.out.println( "CMP stubs and skeletons may not be generated"
  -                     + " for a Session Bean -- the \"cmp\" attribute will be"
  -                     + " ignoredfor the " + name + " EJB." );
  +                                    + " for a Session Bean -- the \"cmp\" attribute will be"
  +                                    + " ignoredfor the " + name + " EJB." );
               }
   
               if( hasession && ( !beantype.equals( STATEFUL_SESSION ) ) )
               {
                   System.out.println( "Highly available stubs and skeletons may "
  -                     + "only be generated for a Stateful Session Bean -- the "
  -                     + "\"hasession\" attribute will be ignored for the "
  -                     + name + " EJB." );
  +                                    + "only be generated for a Stateful Session Bean -- the "
  +                                    + "\"hasession\" attribute will be ignored for the "
  +                                    + name + " EJB." );
               }
   
               /*
  @@ -1082,20 +1082,20 @@
               if( !remote.getClassFile( buildDir ).exists() )
               {
                   throw new EjbcException( "The remote interface "
  -                     + remote.getQualifiedClassName() + " could not be "
  -                     + "found." );
  +                                         + remote.getQualifiedClassName() + " could not be "
  +                                         + "found." );
               }
               if( !home.getClassFile( buildDir ).exists() )
               {
                   throw new EjbcException( "The home interface "
  -                     + home.getQualifiedClassName() + " could not be "
  -                     + "found." );
  +                                         + home.getQualifiedClassName() + " could not be "
  +                                         + "found." );
               }
               if( !implementation.getClassFile( buildDir ).exists() )
               {
                   throw new EjbcException( "The EJB implementation class "
  -                     + implementation.getQualifiedClassName() + " could "
  -                     + "not be found." );
  +                                         + implementation.getQualifiedClassName() + " could "
  +                                         + "not be found." );
               }
           }
   
  @@ -1111,7 +1111,7 @@
            */
           private String[] classesToGenerate()
           {
  -            String[] classnames = ( iiop ) ? new String[15] : new String[9];
  +            String[] classnames = ( iiop ) ? new String[ 15 ] : new String[ 9 ];
   
               final String remotePkg = remote.getPackageName() + ".";
               final String remoteClass = remote.getClassName();
  @@ -1123,30 +1123,30 @@
   
               String fullPath;
   
  -            classnames[index++] = implPkg + "ejb_fac_" + implFullClass;
  -            classnames[index++] = implPkg + "ejb_home_" + implFullClass;
  -            classnames[index++] = implPkg + "ejb_skel_" + implFullClass;
  -            classnames[index++] = remotePkg + "ejb_kcp_skel_" + remoteClass;
  -            classnames[index++] = homePkg + "ejb_kcp_skel_" + homeClass;
  -            classnames[index++] = remotePkg + "ejb_kcp_stub_" + remoteClass;
  -            classnames[index++] = homePkg + "ejb_kcp_stub_" + homeClass;
  -            classnames[index++] = remotePkg + "ejb_stub_" + remoteClass;
  -            classnames[index++] = homePkg + "ejb_stub_" + homeClass;
  +            classnames[ index++ ] = implPkg + "ejb_fac_" + implFullClass;
  +            classnames[ index++ ] = implPkg + "ejb_home_" + implFullClass;
  +            classnames[ index++ ] = implPkg + "ejb_skel_" + implFullClass;
  +            classnames[ index++ ] = remotePkg + "ejb_kcp_skel_" + remoteClass;
  +            classnames[ index++ ] = homePkg + "ejb_kcp_skel_" + homeClass;
  +            classnames[ index++ ] = remotePkg + "ejb_kcp_stub_" + remoteClass;
  +            classnames[ index++ ] = homePkg + "ejb_kcp_stub_" + homeClass;
  +            classnames[ index++ ] = remotePkg + "ejb_stub_" + remoteClass;
  +            classnames[ index++ ] = homePkg + "ejb_stub_" + homeClass;
   
               if( !iiop )
               {
                   return classnames;
               }
   
  -            classnames[index++] = remotePkg + "_" + remoteClass + "_Stub";
  -            classnames[index++] = homePkg + "_" + homeClass + "_Stub";
  -            classnames[index++] = remotePkg + "_ejb_RmiCorbaBridge_"
  -                 + remoteClass + "_Tie";
  -            classnames[index++] = homePkg + "_ejb_RmiCorbaBridge_" + homeClass
  -                 + "_Tie";
  -            classnames[index++] = remotePkg + "ejb_RmiCorbaBridge_"
  -                 + remoteClass;
  -            classnames[index++] = homePkg + "ejb_RmiCorbaBridge_" + homeClass;
  +            classnames[ index++ ] = remotePkg + "_" + remoteClass + "_Stub";
  +            classnames[ index++ ] = homePkg + "_" + homeClass + "_Stub";
  +            classnames[ index++ ] = remotePkg + "_ejb_RmiCorbaBridge_"
  +                + remoteClass + "_Tie";
  +            classnames[ index++ ] = homePkg + "_ejb_RmiCorbaBridge_" + homeClass
  +                + "_Tie";
  +            classnames[ index++ ] = remotePkg + "ejb_RmiCorbaBridge_"
  +                + remoteClass;
  +            classnames[ index++ ] = homePkg + "ejb_RmiCorbaBridge_" + homeClass;
   
               return classnames;
           }
  @@ -1161,7 +1161,7 @@
            * @return The modification timestamp for the "oldest" EJB stub or
            *      skeleton. If one of the classes cannot be found, <code>-1
            *         </code> is returned.
  -         * @throws BuildException If the canonical path of the destination
  +         * @throws TaskException If the canonical path of the destination
            *      directory cannot be found.
            */
           private long destClassesModified( File destDir )
  @@ -1178,7 +1178,7 @@
               {
   
                   String pathToClass =
  -                    classnames[i].replace( '.', File.separatorChar ) + ".class";
  +                    classnames[ i ].replace( '.', File.separatorChar ) + ".class";
                   File classFile = new File( destDir, pathToClass );
   
                   /*
  @@ -1210,7 +1210,7 @@
            *
            * @param buildDir Description of Parameter
            * @return The modification timestamp for the "oldest" EJB source class.
  -         * @throws BuildException If one of the EJB source classes cannot be
  +         * @throws TaskException If one of the EJB source classes cannot be
            *      found on the classpath.
            */
           private long sourceClassesModified( File buildDir )
  @@ -1229,8 +1229,8 @@
               if( modified == -1 )
               {
                   System.out.println( "The class "
  -                     + remote.getQualifiedClassName() + " couldn't "
  -                     + "be found on the classpath" );
  +                                    + remote.getQualifiedClassName() + " couldn't "
  +                                    + "be found on the classpath" );
                   return -1;
               }
               latestModified = modified;
  @@ -1243,8 +1243,8 @@
               if( modified == -1 )
               {
                   System.out.println( "The class "
  -                     + home.getQualifiedClassName() + " couldn't be "
  -                     + "found on the classpath" );
  +                                    + home.getQualifiedClassName() + " couldn't be "
  +                                    + "found on the classpath" );
                   return -1;
               }
               latestModified = Math.max( latestModified, modified );
  @@ -1264,8 +1264,8 @@
               if( modified == -1 )
               {
                   System.out.println( "The class "
  -                     + implementation.getQualifiedClassName()
  -                     + " couldn't be found on the classpath" );
  +                                    + implementation.getQualifiedClassName()
  +                                    + " couldn't be found on the classpath" );
                   return -1;
               }
   
  @@ -1286,7 +1286,6 @@
   
       }// End of EjbcException inner class
   
  -
       /**
        * This inner class is an XML document handler that can be used to parse EJB
        * descriptors (both the standard EJB descriptor as well as the iAS-specific
  @@ -1358,7 +1357,7 @@
            */
           public EjbInfo[] getEjbs()
           {
  -            return ( EjbInfo[] )ejbs.values().toArray( new EjbInfo[ejbs.size()] );
  +            return (EjbInfo[])ejbs.values().toArray( new EjbInfo[ ejbs.size() ] );
           }
   
           /**
  @@ -1471,15 +1470,15 @@
                   /*
                    * Search the resource Map and (if not found) file Map
                    */
  -                String location = ( String )resourceDtds.get( publicId );
  +                String location = (String)resourceDtds.get( publicId );
                   if( location != null )
                   {
                       inputStream
  -                         = ClassLoader.getSystemResource( location ).openStream();
  +                        = ClassLoader.getSystemResource( location ).openStream();
                   }
                   else
                   {
  -                    location = ( String )fileDtds.get( publicId );
  +                    location = (String)fileDtds.get( publicId );
                       if( location != null )
                       {
                           inputStream = new FileInputStream( location );
  @@ -1555,7 +1554,7 @@
   
               if( currentLoc.equals( base + "\\ejb-name" ) )
               {
  -                currentEjb = ( EjbInfo )ejbs.get( value );
  +                currentEjb = (EjbInfo)ejbs.get( value );
                   if( currentEjb == null )
                   {
                       currentEjb = new EjbInfo( value );
  @@ -1571,7 +1570,7 @@
                   currentEjb.setHasession( value );
               }
               else if( currentLoc.equals( base + "\\persistence-manager"
  -                 + "\\properties-file-location" ) )
  +                                        + "\\properties-file-location" ) )
               {
                   currentEjb.addCmpDescriptor( value );
               }
  @@ -1598,7 +1597,7 @@
   
               if( currentLoc.equals( base + "\\ejb-name" ) )
               {
  -                currentEjb = ( EjbInfo )ejbs.get( value );
  +                currentEjb = (EjbInfo)ejbs.get( value );
                   if( currentEjb == null )
                   {
                       currentEjb = new EjbInfo( value );
  @@ -1627,7 +1626,6 @@
               }
           }
       }// End of Classname inner class
  -
   
       /**
        * Thread class used to redirect output from an <code>InputStream</code> to
  
  
  
  1.3       +36 -35    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java
  
  Index: IPlanetEjbcTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IPlanetEjbcTask.java	2001/12/15 14:55:58	1.2
  +++ IPlanetEjbcTask.java	2001/12/16 00:37:02	1.3
  @@ -6,12 +6,13 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
   import java.io.IOException;
   import javax.xml.parsers.ParserConfigurationException;
   import javax.xml.parsers.SAXParser;
   import javax.xml.parsers.SAXParserFactory;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.Path;
   import org.xml.sax.SAXException;
  @@ -183,10 +184,10 @@
       /**
        * Does the work.
        *
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           checkConfiguration();
   
  @@ -213,10 +214,10 @@
        * Returns a SAXParser that may be used to process the XML descriptors.
        *
        * @return Parser which may be used to process the EJB descriptors.
  -     * @throws BuildException If the parser cannot be created or configured.
  +     * @throws TaskException If the parser cannot be created or configured.
        */
       private SAXParser getParser()
  -        throws BuildException
  +        throws TaskException
       {
   
           SAXParser saxParser = null;
  @@ -229,12 +230,12 @@
           catch( SAXException e )
           {
               String msg = "Unable to create a SAXParser: " + e.getMessage();
  -            throw new BuildException( msg, e );
  +            throw new TaskException( msg, e );
           }
           catch( ParserConfigurationException e )
           {
               String msg = "Unable to create a SAXParser: " + e.getMessage();
  -            throw new BuildException( msg, e );
  +            throw new TaskException( msg, e );
           }
   
           return saxParser;
  @@ -243,56 +244,56 @@
       /**
        * Verifies that the user selections are valid.
        *
  -     * @throws BuildException If the user selections are invalid.
  +     * @throws TaskException If the user selections are invalid.
        */
       private void checkConfiguration()
  -        throws BuildException
  +        throws TaskException
       {
   
           if( ejbdescriptor == null )
           {
               String msg = "The standard EJB descriptor must be specified using "
  -                 + "the \"ejbdescriptor\" attribute.";
  -            throw new BuildException( msg );
  +                + "the \"ejbdescriptor\" attribute.";
  +            throw new TaskException( msg );
           }
           if( ( !ejbdescriptor.exists() ) || ( !ejbdescriptor.isFile() ) )
           {
               String msg = "The standard EJB descriptor (" + ejbdescriptor
  -                 + ") was not found or isn't a file.";
  -            throw new BuildException( msg );
  +                + ") was not found or isn't a file.";
  +            throw new TaskException( msg );
           }
   
           if( iasdescriptor == null )
           {
               String msg = "The iAS-speific XML descriptor must be specified using"
  -                 + " the \"iasdescriptor\" attribute.";
  -            throw new BuildException( msg );
  +                + " the \"iasdescriptor\" attribute.";
  +            throw new TaskException( msg );
           }
           if( ( !iasdescriptor.exists() ) || ( !iasdescriptor.isFile() ) )
           {
               String msg = "The iAS-specific XML descriptor (" + iasdescriptor
  -                 + ") was not found or isn't a file.";
  -            throw new BuildException( msg );
  +                + ") was not found or isn't a file.";
  +            throw new TaskException( msg );
           }
   
           if( dest == null )
           {
               String msg = "The destination directory must be specified using "
  -                 + "the \"dest\" attribute.";
  -            throw new BuildException( msg );
  +                + "the \"dest\" attribute.";
  +            throw new TaskException( msg );
           }
           if( ( !dest.exists() ) || ( !dest.isDirectory() ) )
           {
               String msg = "The destination directory (" + dest + ") was not "
  -                 + "found or isn't a directory.";
  -            throw new BuildException( msg );
  +                + "found or isn't a directory.";
  +            throw new TaskException( msg );
           }
   
           if( ( iashome != null ) && ( !iashome.isDirectory() ) )
           {
               String msg = "If \"iashome\" is specified, it must be a valid "
  -                 + "directory (it was set to " + iashome + ").";
  -            throw new BuildException( msg );
  +                + "directory (it was set to " + iashome + ").";
  +            throw new TaskException( msg );
           }
       }
   
  @@ -301,17 +302,17 @@
        *
        * @param saxParser SAXParser that may be used to process the EJB
        *      descriptors
  -     * @throws BuildException If there is an error reading or parsing the XML
  +     * @throws TaskException If there is an error reading or parsing the XML
        *      descriptors
        */
       private void executeEjbc( SAXParser saxParser )
  -        throws BuildException
  +        throws TaskException
       {
           IPlanetEjbc ejbc = new IPlanetEjbc( ejbdescriptor,
  -            iasdescriptor,
  -            dest,
  -            getClasspath().toString(),
  -            saxParser );
  +                                            iasdescriptor,
  +                                            dest,
  +                                            getClasspath().toString(),
  +                                            saxParser );
           ejbc.setRetainSource( keepgenerated );
           ejbc.setDebugOutput( debug );
           if( iashome != null )
  @@ -326,20 +327,20 @@
           catch( IOException e )
           {
               String msg = "An IOException occurred while trying to read the XML "
  -                 + "descriptor file: " + e.getMessage();
  -            throw new BuildException( msg, e );
  +                + "descriptor file: " + e.getMessage();
  +            throw new TaskException( msg, e );
           }
           catch( SAXException e )
           {
               String msg = "A SAXException occurred while trying to read the XML "
  -                 + "descriptor file: " + e.getMessage();
  -            throw new BuildException( msg, e );
  +                + "descriptor file: " + e.getMessage();
  +            throw new TaskException( msg, e );
           }
           catch( IPlanetEjbc.EjbcException e )
           {
               String msg = "An exception occurred while trying to run the ejbc "
  -                 + "utility: " + e.getMessage();
  -            throw new BuildException( msg, e );
  +                + "utility: " + e.getMessage();
  +            throw new TaskException( msg, e );
           }
       }
   }
  
  
  
  1.2       +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/InnerClassFilenameFilter.java
  
  Index: InnerClassFilenameFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/InnerClassFilenameFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InnerClassFilenameFilter.java	2001/12/15 12:06:26	1.1
  +++ InnerClassFilenameFilter.java	2001/12/16 00:37:02	1.2
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
   import java.io.FilenameFilter;
   
  @@ -26,7 +27,7 @@
       public boolean accept( File Dir, String filename )
       {
           if( ( filename.lastIndexOf( "." ) != filename.lastIndexOf( ".class" ) )
  -             || ( filename.indexOf( baseClassName + "$" ) != 0 ) )
  +            || ( filename.indexOf( baseClassName + "$" ) != 0 ) )
           {
               return false;
           }
  
  
  
  1.2       +1 -0      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java
  
  Index: JbossDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JbossDeploymentTool.java	2001/12/15 12:06:26	1.1
  +++ JbossDeploymentTool.java	2001/12/16 00:37:02	1.2
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
   import java.util.Hashtable;
   import org.apache.tools.ant.Project;
  
  
  
  1.3       +21 -22    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
  
  Index: WLRun.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WLRun.java	2001/12/15 14:55:58	1.2
  +++ WLRun.java	2001/12/16 00:37:02	1.3
  @@ -6,8 +6,9 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.taskdefs.Java;
   import org.apache.tools.ant.types.Path;
  @@ -109,7 +110,6 @@
           this.beaHome = beaHome;
       }
   
  -
       /**
        * Set the classpath to be used for this execution.
        *
  @@ -171,7 +171,6 @@
           this.pkPassword = pkpassword;
       }
   
  -
       /**
        * Set the management password of the server
        *
  @@ -213,7 +212,6 @@
           this.managementUsername = username;
       }
   
  -
       public void setWeblogicMainClass( String c )
       {
           weblogicMainClass = c;
  @@ -266,19 +264,19 @@
        * avoids having to start ant with the class path of the project it is
        * building.
        *
  -     * @exception BuildException if someting goes wrong with the build
  +     * @exception TaskException if someting goes wrong with the build
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           if( weblogicSystemHome == null )
           {
  -            throw new BuildException( "weblogic home must be set" );
  +            throw new TaskException( "weblogic home must be set" );
           }
           if( !weblogicSystemHome.isDirectory() )
           {
  -            throw new BuildException( "weblogic home directory " + weblogicSystemHome.getPath() +
  -                " is not valid" );
  +            throw new TaskException( "weblogic home directory " + weblogicSystemHome.getPath() +
  +                                     " is not valid" );
           }
   
           if( beaHome != null )
  @@ -292,6 +290,7 @@
       }
   
       private void executeWLS()
  +        throws TaskException
       {
           File securityPolicyFile = findSecurityPolicyFile( DEFAULT_WL51_POLICY_FILE );
           File propertiesFile = null;
  @@ -307,13 +306,13 @@
               propertiesFile = resolveFile( weblogicPropertiesFile );
               if( !propertiesFile.exists() )
               {
  -                throw new BuildException( "Properties file " + weblogicPropertiesFile +
  -                    " not found in weblogic home " + weblogicSystemHome +
  -                    " or as absolute file" );
  +                throw new TaskException( "Properties file " + weblogicPropertiesFile +
  +                                         " not found in weblogic home " + weblogicSystemHome +
  +                                         " or as absolute file" );
               }
           }
   
  -        Java weblogicServer = ( Java )project.createTask( "java" );
  +        Java weblogicServer = (Java)project.createTask( "java" );
           weblogicServer.setTaskName( getTaskName() );
           weblogicServer.setFork( true );
           weblogicServer.setClassname( weblogicMainClass );
  @@ -339,7 +338,7 @@
           }
           if( weblogicServer.executeJava() != 0 )
           {
  -            throw new BuildException( "Execution of weblogic server failed" );
  +            throw new TaskException( "Execution of weblogic server failed" );
           }
       }
   
  @@ -348,22 +347,22 @@
           File securityPolicyFile = findSecurityPolicyFile( DEFAULT_WL60_POLICY_FILE );
           if( !beaHome.isDirectory() )
           {
  -            throw new BuildException( "BEA home " + beaHome.getPath() +
  -                " is not valid" );
  +            throw new TaskException( "BEA home " + beaHome.getPath() +
  +                                     " is not valid" );
           }
   
           File configFile = new File( weblogicSystemHome, "config/" + weblogicDomainName + "/config.xml" );
           if( !configFile.exists() )
           {
  -            throw new BuildException( "Server config file " + configFile + " not found." );
  +            throw new TaskException( "Server config file " + configFile + " not found." );
           }
   
           if( managementPassword == null )
           {
  -            throw new BuildException( "You must supply a management password to start the server" );
  +            throw new TaskException( "You must supply a management password to start the server" );
           }
   
  -        Java weblogicServer = ( Java )project.createTask( "java" );
  +        Java weblogicServer = (Java)project.createTask( "java" );
           weblogicServer.setTaskName( getTaskName() );
           weblogicServer.setFork( true );
           weblogicServer.setDir( weblogicSystemHome );
  @@ -395,7 +394,7 @@
   
           if( weblogicServer.executeJava() != 0 )
           {
  -            throw new BuildException( "Execution of weblogic server failed" );
  +            throw new TaskException( "Execution of weblogic server failed" );
           }
       }
   
  @@ -416,8 +415,8 @@
           // If we still can't find it, complain
           if( !securityPolicyFile.exists() )
           {
  -            throw new BuildException( "Security policy " + securityPolicy +
  -                " was not found." );
  +            throw new TaskException( "Security policy " + securityPolicy +
  +                                     " was not found." );
           }
           return securityPolicyFile;
       }
  
  
  
  1.2       +7 -7      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java
  
  Index: WLStop.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WLStop.java	2001/12/15 12:06:26	1.1
  +++ WLStop.java	2001/12/16 00:37:02	1.2
  @@ -6,8 +6,9 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.taskdefs.Java;
   import org.apache.tools.ant.types.Path;
  @@ -70,7 +71,6 @@
           this.classpath = path;
       }
   
  -
       /**
        * Set the delay (in seconds) before shutting down the server.
        *
  @@ -130,22 +130,22 @@
        * the weblogic admin task This approach allows the classpath of the helper
        * task to be set.
        *
  -     * @exception BuildException if someting goes wrong with the build
  +     * @exception TaskException if someting goes wrong with the build
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           if( username == null || password == null )
           {
  -            throw new BuildException( "weblogic username and password must both be set" );
  +            throw new TaskException( "weblogic username and password must both be set" );
           }
   
           if( serverURL == null )
           {
  -            throw new BuildException( "The url of the weblogic server must be provided." );
  +            throw new TaskException( "The url of the weblogic server must be provided." );
           }
   
  -        Java weblogicAdmin = ( Java )project.createTask( "java" );
  +        Java weblogicAdmin = (Java)project.createTask( "java" );
           weblogicAdmin.setFork( true );
           weblogicAdmin.setClassname( "weblogic.Admin" );
           String args;
  
  
  
  1.3       +1 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
  
  Index: WeblogicDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WeblogicDeploymentTool.java	2001/12/15 15:20:24	1.2
  +++ WeblogicDeploymentTool.java	2001/12/16 00:37:02	1.3
  @@ -23,9 +23,9 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.AntClassLoader;
   import org.apache.tools.ant.Project;
  -import org.apache.tools.ant.util.FileUtils;
   import org.apache.tools.ant.taskdefs.Java;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.util.FileUtils;
   import org.xml.sax.InputSource;
   
   public class WeblogicDeploymentTool extends GenericDeploymentTool
  
  
  
  1.2       +9 -8      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicTOPLinkDeploymentTool.java
  
  Index: WeblogicTOPLinkDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicTOPLinkDeploymentTool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WeblogicTOPLinkDeploymentTool.java	2001/12/15 12:06:26	1.1
  +++ WeblogicTOPLinkDeploymentTool.java	2001/12/16 00:37:02	1.2
  @@ -6,9 +6,10 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ejb;
  +
   import java.io.File;
   import java.util.Hashtable;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.Project;
   
   public class WeblogicTOPLinkDeploymentTool extends WeblogicDeploymentTool
  @@ -46,15 +47,15 @@
       /**
        * Called to validate that the tool parameters have been configured.
        *
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       public void validateConfigured()
  -        throws BuildException
  +        throws TaskException
       {
           super.validateConfigured();
           if( toplinkDescriptor == null )
           {
  -            throw new BuildException( "The toplinkdescriptor attribute must be specified" );
  +            throw new TaskException( "The toplinkdescriptor attribute must be specified" );
           }
       }
   
  @@ -64,12 +65,12 @@
           if( toplinkDTD != null )
           {
               handler.registerDTD( "-//The Object People, Inc.//DTD TOPLink for WebLogic CMP 2.5.1//EN",
  -                toplinkDTD );
  +                                 toplinkDTD );
           }
           else
           {
               handler.registerDTD( "-//The Object People, Inc.//DTD TOPLink for WebLogic CMP 2.5.1//EN",
  -                TL_DTD_LOC );
  +                                 TL_DTD_LOC );
           }
           return handler;
       }
  @@ -93,12 +94,12 @@
           if( toplinkDD.exists() )
           {
               ejbFiles.put( META_DIR + toplinkDescriptor,
  -                toplinkDD );
  +                          toplinkDD );
           }
           else
           {
               log( "Unable to locate toplink deployment descriptor. It was expected to be in " +
  -                toplinkDD.getPath(), Project.MSG_WARN );
  +                 toplinkDD.getPath(), Project.MSG_WARN );
           }
       }
   }
  
  
  

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


Mime
View raw message