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/java/org/apache/myrmidon/libs/ant1 Ant1Project.java TaskAdapter.java
Date Sun, 16 Dec 2001 06:42:23 GMT
donaldp     01/12/15 22:42:23

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/libs/ant1
                        Ant1Project.java TaskAdapter.java
  Log:
  Remove some cruft to keep it compiling. The ant1 compatability layer (if it is ever implemented)
will need to be rewritten anyway.
  
  Revision  Changes    Path
  1.4       +28 -44    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/libs/ant1/Ant1Project.java
  
  Index: Ant1Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/libs/ant1/Ant1Project.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Ant1Project.java	2001/12/16 05:23:24	1.3
  +++ Ant1Project.java	2001/12/16 06:42:23	1.4
  @@ -14,17 +14,17 @@
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.*;
   import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.Task;
   
   public class Ant1Project
       extends Project
       implements LogEnabled, Contextualizable
   {
  -    private Logger   m_logger;
  +    private Logger m_logger;
   
       ///Variable to hold context for use by sub-classes
  -    private TaskContext            m_context;
  +    private TaskContext m_context;
   
       public void enableLogging( final Logger logger )
       {
  @@ -62,18 +62,16 @@
   
       public void setProperty( final String name, final String value )
       {
  -        try { getContext().setProperty( name, value ); }
  +        try
  +        {
  +            getContext().setProperty( name, value );
  +        }
           catch( final Exception e )
           {
               getLogger().warn( "Failed to set property " + name + " to " + value, e );
           }
       }
   
  -    public void setUserProperty( final String name, final String value )
  -    {
  -        setProperty( name, value );
  -    }
  -
       public String getProperty( final String name )
       {
           return "" + getContext().getProperty( name );
  @@ -103,52 +101,38 @@
   
       public File resolveFile( final String fileName )
       {
  -        try { return getContext().resolveFile( fileName ); }
  +        try
  +        {
  +            return getContext().resolveFile( fileName );
  +        }
           catch( final Exception e )
           {
               return null;
           }
       }
   
  -    protected void fireBuildStarted() {}
  -    protected void fireBuildFinished(Throwable exception) {}
  -    protected void fireTargetStarted(Target target) {}
  -    protected void fireTargetFinished(Target target, Throwable exception) {}
  -    protected void fireTaskStarted(Task task) {}
  -    protected void fireTaskFinished(Task task, Throwable exception) {}
  -
  -    private void fireMessageLoggedEvent(BuildEvent event, String message, int priority)
  -    {
  -        messageLogged( message, priority );
  -    }
  -
  -    protected void fireMessageLogged(Project project, String message, int priority)
  -    {
  -        messageLogged( message, priority );
  -    }
  -
  -    protected void fireMessageLogged(Target target, String message, int priority)
  -    {
  -        messageLogged( message, priority );
  -    }
  -
  -    protected void fireMessageLogged(Task task, String message, int priority)
  -    {
  -        messageLogged( message, priority );
  -    }
  -
       private void messageLogged( String message, int priority )
       {
           switch( priority )
           {
  -        case MSG_ERR: getLogger().error( message ); break;
  -        case MSG_WARN: getLogger().warn( message ); break;
  -        case MSG_INFO: getLogger().info( message ); break;
  -        case MSG_VERBOSE: getLogger().debug( message ); break;
  -        case MSG_DEBUG: getLogger().debug( message ); break;
  +            case MSG_ERR:
  +                getLogger().error( message );
  +                break;
  +            case MSG_WARN:
  +                getLogger().warn( message );
  +                break;
  +            case MSG_INFO:
  +                getLogger().info( message );
  +                break;
  +            case MSG_VERBOSE:
  +                getLogger().debug( message );
  +                break;
  +            case MSG_DEBUG:
  +                getLogger().debug( message );
  +                break;
   
  -        default:
  -            getLogger().debug( message );
  +            default:
  +                getLogger().debug( message );
           }
       }
   }
  
  
  
  1.7       +0 -1      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/libs/ant1/TaskAdapter.java
  
  Index: TaskAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/libs/ant1/TaskAdapter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TaskAdapter.java	2001/12/16 05:23:25	1.6
  +++ TaskAdapter.java	2001/12/16 06:42:23	1.7
  @@ -64,7 +64,6 @@
               getProject().init();
   
               getTask().setProject( getProject() );
  -            getTask().init();
               getTask().execute();
           }
           catch( final Exception e )
  
  
  

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