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 IContract.java
Date Sun, 30 Dec 2001 08:19:53 GMT
donaldp     01/12/30 00:19:53

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional
                        IContract.java
  Log:
  Made into a ProjectListener rather than a BuildListener
  
  Revision  Changes    Path
  1.13      +10 -29    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java
  
  Index: IContract.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- IContract.java	30 Dec 2001 00:21:51 -0000	1.12
  +++ IContract.java	30 Dec 2001 08:19:53 -0000	1.13
  @@ -15,8 +15,7 @@
   import java.util.Date;
   import java.util.Properties;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.BuildEvent;
  -import org.apache.tools.ant.BuildListener;
  +import org.apache.myrmidon.listeners.AbstractProjectListener;
   import org.apache.tools.ant.DirectoryScanner;
   import org.apache.tools.ant.taskdefs.Java;
   import org.apache.tools.ant.taskdefs.Javac;
  @@ -715,7 +714,7 @@
   
               // We want to be notified if iContract jar is missing. This makes life easier
for the user
               // who didn't understand that iContract is a separate library (duh!)
  -            getProject().addBuildListener( new IContractPresenceDetector() );
  +            getProject().addProjectListener( new IContractPresenceDetector() );
   
               // Prepare the directories for iContract. iContract will make them if they
               // don't exist, but for some reason I don't know, it will complain about the
REP files
  @@ -1079,38 +1078,20 @@
        * about missing iContract is missing. Used to indicate a more verbose error
        * to the user, with advice about how to solve the problem
        */
  -    private class IContractPresenceDetector implements BuildListener
  +    private class IContractPresenceDetector
  +        extends AbstractProjectListener
       {
  -        public void buildFinished( BuildEvent event )
  -        {
  -        }
  -
  -        public void buildStarted( BuildEvent event )
  -        {
  -        }
  -
  -        public void messageLogged( BuildEvent event )
  +        /**
  +         * Notify listener of log message event.
  +         *
  +         * @param message the message
  +         */
  +        public void log( final String message )
           {
               if( "java.lang.NoClassDefFoundError: com/reliablesystems/iContract/Tool".equals(
event.getMessage() ) )
               {
                   iContractMissing = true;
               }
  -        }
  -
  -        public void targetFinished( BuildEvent event )
  -        {
  -        }
  -
  -        public void targetStarted( BuildEvent event )
  -        {
  -        }
  -
  -        public void taskFinished( BuildEvent event )
  -        {
  -        }
  -
  -        public void taskStarted( BuildEvent event )
  -        {
           }
       }
   }
  
  
  

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