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/vss MSVSS.java MSVSSCHECKIN.java MSVSSCHECKOUT.java MSVSSGET.java MSVSSHISTORY.java MSVSSLABEL.java
Date Sun, 16 Dec 2001 00:34:17 GMT
donaldp     01/12/15 16:34:17

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss
                        MSVSS.java MSVSSCHECKIN.java MSVSSCHECKOUT.java
                        MSVSSGET.java MSVSSHISTORY.java MSVSSLABEL.java
  Log:
  BuildException -> TaskException
  
  Removed uneeded imports.
  
  Processed code through style formatter.
  
  Revision  Changes    Path
  1.3       +10 -9     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
  
  Index: MSVSS.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MSVSS.java	2001/12/15 14:55:59	1.2
  +++ MSVSS.java	2001/12/16 00:34:17	1.3
  @@ -6,13 +6,14 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.vss;
  -import org.apache.tools.ant.BuildException;
  +
  +import java.io.IOException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.taskdefs.Execute;
   import org.apache.tools.ant.taskdefs.LogStreamHandler;
   import org.apache.tools.ant.types.Commandline;
  -import java.io.IOException;
   
   /**
    * A base class for creating tasks for executing commands on Visual SourceSafe.
  @@ -203,8 +204,8 @@
           try
           {
               Execute exe = new Execute( new LogStreamHandler( this,
  -                Project.MSG_INFO,
  -                Project.MSG_WARN ) );
  +                                                             Project.MSG_INFO,
  +                                                             Project.MSG_WARN ) );
   
               // If location of ss.ini is specified we need to set the
               // environment-variable SSDIR to this value
  @@ -213,14 +214,14 @@
                   String[] env = exe.getEnvironment();
                   if( env == null )
                   {
  -                    env = new String[0];
  +                    env = new String[ 0 ];
                   }
  -                String[] newEnv = new String[env.length + 1];
  +                String[] newEnv = new String[ env.length + 1 ];
                   for( int i = 0; i < env.length; i++ )
                   {
  -                    newEnv[i] = env[i];
  +                    newEnv[ i ] = env[ i ];
                   }
  -                newEnv[env.length] = "SSDIR=" + m_serverPath;
  +                newEnv[ env.length ] = "SSDIR=" + m_serverPath;
   
                   exe.setEnvironment( newEnv );
               }
  @@ -232,7 +233,7 @@
           }
           catch( IOException e )
           {
  -            throw new BuildException( "Error", e );
  +            throw new TaskException( "Error", e );
           }
       }
   }
  
  
  
  1.3       +8 -6      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java
  
  Index: MSVSSCHECKIN.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MSVSSCHECKIN.java	2001/12/15 14:55:59	1.2
  +++ MSVSSCHECKIN.java	2001/12/16 00:34:17	1.3
  @@ -6,8 +6,9 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.vss;
  +
   import java.io.File;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.Path;
   
  @@ -134,6 +135,7 @@
        * @param cmd Description of Parameter
        */
       public void getLocalpathCommand( Commandline cmd )
  +        throws TaskException
       {
           if( m_LocalPath == null )
           {
  @@ -150,7 +152,7 @@
                   {
                       String msg = "Directory " + m_LocalPath + " creation was not " +
                           "succesful for an unknown reason";
  -                    throw new BuildException( msg );
  +                    throw new TaskException( msg );
                   }
                   project.log( "Created dir: " + dir.getAbsolutePath() );
               }
  @@ -195,10 +197,10 @@
        * Builds a command line to execute ss and then calls Exec's run method to
        * execute the command line.
        *
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           Commandline commandLine = new Commandline();
           int result = 0;
  @@ -207,7 +209,7 @@
           if( getVsspath() == null )
           {
               String msg = "vsspath attribute must be set!";
  -            throw new BuildException( msg );
  +            throw new TaskException( msg );
           }
   
           // now look for illegal combinations of things ...
  @@ -237,7 +239,7 @@
           if( result != 0 )
           {
               String msg = "Failed executing: " + commandLine.toString();
  -            throw new BuildException( msg );
  +            throw new TaskException( msg );
           }
       }
   }
  
  
  
  1.3       +8 -6      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java
  
  Index: MSVSSCHECKOUT.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MSVSSCHECKOUT.java	2001/12/15 14:55:59	1.2
  +++ MSVSSCHECKOUT.java	2001/12/16 00:34:17	1.3
  @@ -6,8 +6,9 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.vss;
  +
   import java.io.File;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.Path;
   
  @@ -161,6 +162,7 @@
        * @param cmd Description of Parameter
        */
       public void getLocalpathCommand( Commandline cmd )
  +        throws TaskException
       {
           if( m_LocalPath == null )
           {
  @@ -177,7 +179,7 @@
                   {
                       String msg = "Directory " + m_LocalPath + " creation was not " +
                           "succesful for an unknown reason";
  -                    throw new BuildException( msg );
  +                    throw new TaskException( msg );
                   }
                   project.log( "Created dir: " + dir.getAbsolutePath() );
               }
  @@ -230,10 +232,10 @@
        * Builds a command line to execute ss and then calls Exec's run method to
        * execute the command line.
        *
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           Commandline commandLine = new Commandline();
           int result = 0;
  @@ -242,7 +244,7 @@
           if( getVsspath() == null )
           {
               String msg = "vsspath attribute must be set!";
  -            throw new BuildException( msg );
  +            throw new TaskException( msg );
           }
   
           // now look for illegal combinations of things ...
  @@ -270,7 +272,7 @@
           if( result != 0 )
           {
               String msg = "Failed executing: " + commandLine.toString();
  -            throw new BuildException( msg );
  +            throw new TaskException( msg );
           }
       }
   
  
  
  
  1.3       +8 -6      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java
  
  Index: MSVSSGET.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MSVSSGET.java	2001/12/15 14:55:59	1.2
  +++ MSVSSGET.java	2001/12/16 00:34:17	1.3
  @@ -6,8 +6,9 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.vss;
  +
   import java.io.File;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.Path;
   
  @@ -369,6 +370,7 @@
        * @param cmd Description of Parameter
        */
       public void getLocalpathCommand( Commandline cmd )
  +        throws TaskException
       {
           if( m_LocalPath == null )
           {
  @@ -385,7 +387,7 @@
                   {
                       String msg = "Directory " + m_LocalPath + " creation was not " +
                           "successful for an unknown reason";
  -                    throw new BuildException( msg );
  +                    throw new TaskException( msg );
                   }
                   project.log( "Created dir: " + dir.getAbsolutePath() );
               }
  @@ -461,10 +463,10 @@
        * Builds a command line to execute ss and then calls Exec's run method to
        * execute the command line.
        *
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           Commandline commandLine = new Commandline();
           int result = 0;
  @@ -473,7 +475,7 @@
           if( getVsspath() == null )
           {
               String msg = "vsspath attribute must be set!";
  -            throw new BuildException( msg );
  +            throw new TaskException( msg );
           }
   
           // now look for illegal combinations of things ...
  @@ -505,7 +507,7 @@
           if( result != 0 )
           {
               String msg = "Failed executing: " + commandLine.toString();
  -            throw new BuildException( msg );
  +            throw new TaskException( msg );
           }
       }
   
  
  
  
  1.3       +13 -12    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java
  
  Index: MSVSSHISTORY.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MSVSSHISTORY.java	2001/12/15 14:55:59	1.2
  +++ MSVSSHISTORY.java	2001/12/16 00:34:17	1.3
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.vss;
  +
   import java.io.File;
   import java.text.DateFormat;
   import java.text.ParseException;
  @@ -13,7 +14,7 @@
   import java.util.Calendar;
   import java.util.Date;
   import java.util.GregorianCalendar;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.EnumeratedAttribute;
   
  @@ -160,7 +161,7 @@
           }
           else
           {
  -            throw new BuildException( "Style " + attr + " unknown." );
  +            throw new TaskException( "Style " + attr + " unknown." );
           }
       }
   
  @@ -214,10 +215,10 @@
        * Builds a command line to execute ss and then calls Exec's run method to
        * execute the command line.
        *
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           Commandline commandLine = new Commandline();
           int result = 0;
  @@ -226,7 +227,7 @@
           if( getVsspath() == null )
           {
               String msg = "vsspath attribute must be set!";
  -            throw new BuildException( msg );
  +            throw new TaskException( msg );
           }
   
           // now look for illegal combinations of things ...
  @@ -272,7 +273,7 @@
           if( result != 0 )
           {
               String msg = "Failed executing: " + commandLine.toString();
  -            throw new BuildException( msg );
  +            throw new TaskException( msg );
           }
   
       }
  @@ -322,10 +323,10 @@
        * Builds the version date command.
        *
        * @param cmd the commandline the command is to be added to
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       private void getVersionDateCommand( Commandline cmd )
  -        throws BuildException
  +        throws TaskException
       {
           if( m_FromDate == null && m_ToDate == null && m_NumDays == Integer.MIN_VALUE
)
           {
  @@ -346,7 +347,7 @@
               catch( ParseException ex )
               {
                   String msg = "Error parsing date: " + m_ToDate;
  -                throw new BuildException( msg );
  +                throw new TaskException( msg );
               }
               cmd.createArgument().setValue( FLAG_VERSION_DATE + m_ToDate + VALUE_FROMDATE
+ startDate );
           }
  @@ -360,7 +361,7 @@
               catch( ParseException ex )
               {
                   String msg = "Error parsing date: " + m_FromDate;
  -                throw new BuildException( msg );
  +                throw new TaskException( msg );
               }
               cmd.createArgument().setValue( FLAG_VERSION_DATE + endDate + VALUE_FROMDATE
+ m_FromDate );
           }
  @@ -381,10 +382,10 @@
        * Builds the version date command.
        *
        * @param cmd the commandline the command is to be added to
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       private void getVersionLabelCommand( Commandline cmd )
  -        throws BuildException
  +        throws TaskException
       {
           if( m_FromLabel == null && m_ToLabel == null )
           {
  
  
  
  1.3       +7 -6      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java
  
  Index: MSVSSLABEL.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MSVSSLABEL.java	2001/12/15 14:55:59	1.2
  +++ MSVSSLABEL.java	2001/12/16 00:34:17	1.3
  @@ -6,7 +6,8 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.vss;
  -import org.apache.tools.ant.BuildException;
  +
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.types.Commandline;
   
   /**
  @@ -316,10 +317,10 @@
        * Builds a command line to execute ss and then calls Exec's run method to
        * execute the command line.
        *
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           Commandline commandLine = new Commandline();
           int result = 0;
  @@ -328,12 +329,12 @@
           if( getVsspath() == null )
           {
               String msg = "vsspath attribute must be set!";
  -            throw new BuildException( msg );
  +            throw new TaskException( msg );
           }
           if( getLabel() == null )
           {
               String msg = "label attribute must be set!";
  -            throw new BuildException( msg );
  +            throw new TaskException( msg );
           }
   
           // now look for illegal combinations of things ...
  @@ -368,7 +369,7 @@
           if( result != 0 )
           {
               String msg = "Failed executing: " + commandLine.toString();
  -            throw new BuildException( msg );
  +            throw new TaskException( msg );
           }
   
       }
  
  
  

--
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