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/antlib/core PropertyDump.java
Date Thu, 21 Mar 2002 09:31:12 GMT
donaldp     02/03/21 01:31:12

  Added:       proposal/myrmidon/src/java/org/apache/antlib/core
                        PropertyDump.java
  Log:
  Copy across a debugging task from the frantic proposal
  
  Revision  Changes    Path
  1.1                  jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/PropertyDump.java
  
  Index: PropertyDump.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.antlib.core;
  
  import java.util.Iterator;
  import java.util.Map;
  import org.apache.myrmidon.api.AbstractTask;
  
  /**
   * This is a simple task used to dump out all the proeprtys in the
   * runtime. Useful for debugging behaviour in ant build directives.
   * Could possibly be moved to a new antlib.
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @author <a href="mailto:jimcook@visualxs.com">Jim Cook</a>
   * @version $Revision: 1.1 $ $Date: 2002/03/21 09:31:12 $
   * @ant:task name="property-dump"
   */
  public class PropertyDump
      extends AbstractTask
  {
      /**
       * Printout all the properties in ant runtime.
       */
      public void execute()
      {
          final Map properties = getContext().getProperties();
          final Iterator iterator = properties.keySet().iterator();
          while( iterator.hasNext() )
          {
              final String key = (String)iterator.next();
              final Object value = properties.get( key );
              getContext().warn( key + "=" + value );
          }
      }
  }
  
  
  

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