ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/property MapPropertyStore.java Resources.properties PropertyResolver.java
Date Tue, 09 Apr 2002 02:26:35 GMT
adammurdoch    02/04/08 19:26:35

  Modified:    proposal/myrmidon/src/test/org/apache/myrmidon/components/embeddor/test
                        DefaultEmbeddorTest.java
               proposal/myrmidon/src/test/org/apache/myrmidon/components/property/test
                        AbstractPropertyResolverTestCase.java
                        ClassicPropertyResolverTestCase.java
                        DefaultPropertyResolverTestCase.java
               proposal/myrmidon/src/test/org/apache/myrmidon/framework/file/test
                        PathTestCase.java TestFileList.java path.ant
               proposal/myrmidon/src/java/org/apache/antlib/core
                        AbstractAntTask.java AntCallTask.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor
                        DefaultEmbeddor.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/executor
                        AspectAwareExecutor.java DefaultExecutor.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/property
                        ClassicPropertyResolver.java
                        DefaultPropertyResolver.java Resources.properties
               proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace
                        DefaultExecutionFrame.java DefaultTaskContext.java
                        DefaultWorkspace.java
               proposal/myrmidon/src/java/org/apache/myrmidon/frontends
                        EmbeddedAnt.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/embeddor
                        Embeddor.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/executor
                        ExecutionFrame.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/property
                        PropertyResolver.java
  Added:       proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/executor
                        ExecutionContainer.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/property
                        MapPropertyStore.java Resources.properties
  Log:
  * Rolled back change to PropertyResolver.resolveProperties(), so that it
    uses a TaskContext again.  Added some regression tests.
  
  * Changed Embeddor.createWorkspace() to use a Map, rather than a Parameters,
    to supply initial workspace properties.  Initial properties can be Objects,
    rather than only Strings.  Got rid of the Object -> String convertion from
    <ant> and <antcall>.
  
  * Generalised ExecutionFrame, so that it can represent any execution scope
    (root, workspace, project, task, inherited, etc), rather than just task scope:
    - Replaced getTaskContext() with getPropertyStore().
    - Replaced getTypeManager() with getServiceManager().
  
  * Executor is now responsible for creating TaskContext.
  
  * Changed DefaultExecutor to use the configurer provided by the execution frame.
  
  * Added ExecutionContainer, a lifecycle interface which is used to supply the
    root execution frame to a service which executes tasks (directly or indirectly).
  
  * Changed interaction between DefaultEmbeddor and workspaces.  Embeddor is now
    responsible for creating the base property store for workspaces.  ExecutionContainer
    is used to pass this to workspaces.  Parameterizable is now used to pass
    container params to workspaces (which matches how it is used with all the
    other services).
  
  Revision  Changes    Path
  1.3       +3 -2      jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/components/embeddor/test/DefaultEmbeddorTest.java
  
  Index: DefaultEmbeddorTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/components/embeddor/test/DefaultEmbeddorTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultEmbeddorTest.java	3 Apr 2002 10:58:20 -0000	1.2
  +++ DefaultEmbeddorTest.java	9 Apr 2002 02:26:34 -0000	1.3
  @@ -8,6 +8,7 @@
   package org.apache.myrmidon.components.embeddor.test;
   
   import java.io.File;
  +import java.util.HashMap;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.myrmidon.AbstractProjectTest;
  @@ -23,7 +24,7 @@
    * Test cases for the default embeddor.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/03 10:58:20 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/09 02:26:34 $
    */
   public class DefaultEmbeddorTest
       extends AbstractProjectTest
  @@ -118,7 +119,7 @@
           final Project project = embeddor.createProject( projectFile.getAbsolutePath(), null, null );
   
           // Build the workspace
  -        final Workspace workspace = embeddor.createWorkspace( new Parameters() );
  +        final Workspace workspace = embeddor.createWorkspace( new HashMap() );
   
           // Install a listener
           final LogMessageTracker listener = new LogMessageTracker();
  
  
  
  1.7       +28 -22    jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/components/property/test/AbstractPropertyResolverTestCase.java
  
  Index: AbstractPropertyResolverTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/components/property/test/AbstractPropertyResolverTestCase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractPropertyResolverTestCase.java	8 Apr 2002 10:45:06 -0000	1.6
  +++ AbstractPropertyResolverTestCase.java	9 Apr 2002 02:26:34 -0000	1.7
  @@ -11,8 +11,11 @@
   import java.util.Date;
   import org.apache.aut.converter.lib.ObjectToStringConverter;
   import org.apache.avalon.excalibur.i18n.Resources;
  +import org.apache.avalon.framework.service.DefaultServiceManager;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.components.AbstractComponentTest;
  +import org.apache.myrmidon.components.workspace.DefaultTaskContext;
   import org.apache.myrmidon.components.property.DefaultPropertyResolver;
   import org.apache.myrmidon.components.store.DefaultPropertyStore;
   import org.apache.myrmidon.interfaces.property.PropertyResolver;
  @@ -22,13 +25,13 @@
    * General-purpose property resolver test cases.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.6 $ $Date: 2002/04/08 10:45:06 $
  + * @version $Revision: 1.7 $ $Date: 2002/04/09 02:26:34 $
    */
   public abstract class AbstractPropertyResolverTestCase
       extends AbstractComponentTest
   {
       protected PropertyResolver m_resolver;
  -    protected PropertyStore m_store;
  +    protected TaskContext m_context;
   
       public AbstractPropertyResolverTestCase( final String name )
       {
  @@ -39,9 +42,12 @@
       {
           m_resolver = (PropertyResolver)getServiceManager().lookup( PropertyResolver.ROLE );
   
  -        m_store = new DefaultPropertyStore();
  -        m_store.setProperty( "intProp", new Integer( 333 ) );
  -        m_store.setProperty( "stringProp", "String property" );
  +        final PropertyStore store = new DefaultPropertyStore();
  +        m_context =
  +            new DefaultTaskContext( new DefaultServiceManager(), getLogger(), store );
  +
  +        m_context.setProperty( "intProp", new Integer( 333 ) );
  +        m_context.setProperty( "stringProp", "String property" );
   
           registerConverter( ObjectToStringConverter.class, Object.class, String.class );
       }
  @@ -87,14 +93,14 @@
       private void testPropertyValue( final Object propObject )
           throws Exception
       {
  -        m_store.setProperty( "typedProp", propObject );
  +        m_context.setProperty( "typedProp", propObject );
           final String propString = propObject.toString();
   
  -        doTestResolution( "${typedProp}", propObject, m_store );
  +        doTestResolution( "${typedProp}", propObject, m_context );
           doTestResolution( "${typedProp} with following text",
  -                          propString + " with following text", m_store );
  +                          propString + " with following text", m_context );
           doTestResolution( "Preceding text with ${typedProp}",
  -                          "Preceding text with " + propString, m_store );
  +                          "Preceding text with " + propString, m_context );
       }
   
       /**
  @@ -102,15 +108,15 @@
        */
       public void testMultipleProperties() throws Exception
       {
  -        m_store.setProperty( "prop1", "value1" );
  -        m_store.setProperty( "prop2", "value2" );
  -        m_store.setProperty( "int1", new Integer( 123 ) );
  +        m_context.setProperty( "prop1", "value1" );
  +        m_context.setProperty( "prop2", "value2" );
  +        m_context.setProperty( "int1", new Integer( 123 ) );
   
  -        doTestResolution( "${prop1}${prop2}", "value1value2", m_store );
  -        doTestResolution( "${prop1}${prop1}${prop1}", "value1value1value1", m_store );
  +        doTestResolution( "${prop1}${prop2}", "value1value2", m_context );
  +        doTestResolution( "${prop1}${prop1}${prop1}", "value1value1value1", m_context );
           doTestResolution( "before ${prop2} between ${prop1} after",
  -                          "before value2 between value1 after", m_store );
  -        doTestResolution( "${prop1}-${int1}-${prop2}", "value1-123-value2", m_store );
  +                          "before value2 between value1 after", m_context );
  +        doTestResolution( "${prop1}-${int1}-${prop2}", "value1-123-value2", m_context );
       }
   
       /**
  @@ -121,10 +127,10 @@
           final Resources rez = getResourcesForTested( DefaultPropertyResolver.class );
           doTestFailure( "${unclosed",
                          rez.getString( "prop.mismatched-braces.error" ),
  -                       m_store );
  +                       m_context );
           doTestFailure( "${",
                          rez.getString( "prop.mismatched-braces.error" ),
  -                       m_store );
  +                       m_context );
   
           /* TODO - need to handle these cases. */
           //        testFailure( "${bad${}", "", m_context );
  @@ -136,10 +142,10 @@
        */
       protected void doTestResolution( final String value,
                                        final Object expected,
  -                                     final PropertyStore properties )
  +                                     final TaskContext context )
           throws Exception
       {
  -        final Object resolved = m_resolver.resolveProperties( value, properties );
  +        final Object resolved = m_resolver.resolveProperties( value, context );
   
           assertEquals( expected, resolved );
       }
  @@ -150,11 +156,11 @@
        */
       protected void doTestFailure( final String value,
                                     final String expectedErrorMessage,
  -                                  final PropertyStore properties )
  +                                  final TaskContext context )
       {
           try
           {
  -            m_resolver.resolveProperties( value, properties );
  +            m_resolver.resolveProperties( value, context );
               fail( "Unexpected sucess - test should have failed." );
           }
           catch( TaskException e )
  
  
  
  1.3       +2 -2      jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/components/property/test/ClassicPropertyResolverTestCase.java
  
  Index: ClassicPropertyResolverTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/components/property/test/ClassicPropertyResolverTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ClassicPropertyResolverTestCase.java	8 Apr 2002 10:45:06 -0000	1.2
  +++ ClassicPropertyResolverTestCase.java	9 Apr 2002 02:26:34 -0000	1.3
  @@ -15,7 +15,7 @@
    * A test for {@link org.apache.myrmidon.components.property.ClassicPropertyResolver}.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/08 10:45:06 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/09 02:26:34 $
    */
   public class ClassicPropertyResolverTestCase
       extends AbstractPropertyResolverTestCase
  @@ -37,6 +37,6 @@
       {
           final String undefinedProp = "undefinedProperty";
           final String propRef = "${" + undefinedProp + "}";
  -        doTestResolution( propRef, propRef, m_store );
  +        doTestResolution( propRef, propRef, m_context );
       }
   }
  
  
  
  1.3       +3 -3      jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/components/property/test/DefaultPropertyResolverTestCase.java
  
  Index: DefaultPropertyResolverTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/components/property/test/DefaultPropertyResolverTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultPropertyResolverTestCase.java	8 Apr 2002 10:45:06 -0000	1.2
  +++ DefaultPropertyResolverTestCase.java	9 Apr 2002 02:26:34 -0000	1.3
  @@ -17,7 +17,7 @@
    * Functional tests for {@link org.apache.myrmidon.components.property.DefaultPropertyResolver}.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/08 10:45:06 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/09 02:26:34 $
    */
   public class DefaultPropertyResolverTestCase
       extends AbstractPropertyResolverTestCase
  @@ -41,11 +41,11 @@
           final String undefinedProp = "undefinedProperty";
           doTestFailure( "${" + undefinedProp + "}",
                          rez.getString( "unknown-prop.error", undefinedProp ),
  -                       m_store );
  +                       m_context );
   
           //TODO - "" should be disallowed as a property name
           doTestFailure( "${}",
                          rez.getString( "unknown-prop.error", "" ),
  -                       m_store );
  +                       m_context );
       }
   }
  
  
  
  1.2       +30 -9     jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/framework/file/test/PathTestCase.java
  
  Index: PathTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/framework/file/test/PathTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PathTestCase.java	22 Mar 2002 04:12:37 -0000	1.1
  +++ PathTestCase.java	9 Apr 2002 02:26:34 -0000	1.2
  @@ -8,6 +8,7 @@
   package org.apache.myrmidon.framework.file.test;
   
   import java.io.File;
  +import org.apache.aut.nativelib.PathUtil;
   import org.apache.avalon.excalibur.io.FileUtil;
   import org.apache.myrmidon.AbstractProjectTest;
   import org.apache.myrmidon.LogMessageTracker;
  @@ -16,7 +17,7 @@
    * Test-cases for the <path> data type.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/03/22 04:12:37 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/09 02:26:34 $
    */
   public class PathTestCase
       extends AbstractProjectTest
  @@ -31,7 +32,7 @@
        */
       public void testLocationAttribute() throws Exception
       {
  -        testPathContent( "set-location", new String[] { "location" } );
  +        testPathContent( "set-location", new String[]{"location"} );
       }
   
       /**
  @@ -40,13 +41,13 @@
       public void testPathAttribute() throws Exception
       {
           // Test a path with a single file
  -        testPathContent( "set-path", new String[] { "single-file" } );
  +        testPathContent( "set-path", new String[]{"single-file"} );
   
           // Test a path with several files, using ; separator
  -        testPathContent( "set-multi-path", new String[] { "file1", "file2", ".." } );
  +        testPathContent( "set-multi-path", new String[]{"file1", "file2", ".."} );
   
           // Test a path with several files, using : separator
  -        testPathContent( "set-multi-path2", new String[] { "file1", "file2", ".." } );
  +        testPathContent( "set-multi-path2", new String[]{"file1", "file2", ".."} );
       }
   
       /**
  @@ -54,8 +55,8 @@
        */
       public void testPathElement() throws Exception
       {
  -        testPathContent( "nested-path", new String[] { "some-file" } );
  -        testPathContent( "mixed-path", new String[] { "file1", "file2", "file3", "file4", "file5" } );
  +        testPathContent( "nested-path", new String[]{"some-file"} );
  +        testPathContent( "mixed-path", new String[]{"file1", "file2", "file3", "file4", "file5"} );
       }
   
       /**
  @@ -63,7 +64,7 @@
        */
       public void testFilesetElement() throws Exception
       {
  -        testPathContent( "set-fileset", new String[] { "path.ant" } );
  +        testPathContent( "set-fileset", new String[]{"path.ant"} );
       }
   
       /**
  @@ -71,7 +72,27 @@
        */
       public void testCustomFileList() throws Exception
       {
  -        testPathContent( "test-custom-file-list", new String[] { "file1" } );
  +        testPathContent( "test-custom-file-list", new String[]{"file1"} );
  +    }
  +
  +    /**
  +     * Test converting between string and path.
  +     */
  +    public void testConvert() throws Exception
  +    {
  +        testPathContent( "convert-string-to-path", new String[]{"file1", "file2"} );
  +
  +        // Test conversion from path -> string
  +        final File[] files = {
  +            getTestResource( "file1", false ),
  +            getTestResource( "file2", false )
  +        };
  +        final String path = PathUtil.formatPath( files );
  +        final LogMessageTracker listener = new LogMessageTracker();
  +        listener.addExpectedMessage( "convert-path-to-string", "test-path = " + path );
  +
  +        final File projectFile = getTestResource( "path.ant" );
  +        executeTarget( projectFile, "convert-path-to-string", listener );
       }
   
       /**
  
  
  
  1.3       +26 -5     jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/framework/file/test/TestFileList.java
  
  Index: TestFileList.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/framework/file/test/TestFileList.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestFileList.java	23 Mar 2002 04:01:27 -0000	1.2
  +++ TestFileList.java	9 Apr 2002 02:26:34 -0000	1.3
  @@ -7,16 +7,18 @@
    */
   package org.apache.myrmidon.framework.file.test;
   
  -import org.apache.myrmidon.framework.file.FileList;
  +import java.io.File;
  +import java.util.ArrayList;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  -import java.io.File;
  +import org.apache.myrmidon.framework.file.FileList;
  +import org.apache.myrmidon.framework.file.Path;
   
   /**
    * A test FileList implementation.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/03/23 04:01:27 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/09 02:26:34 $
    *
    * @ant.type type="path" name="test-file-list"
    */
  @@ -24,19 +26,38 @@
       implements FileList
   {
       private String m_name;
  +    private Path m_path;
   
       public void setName( final String name )
       {
           m_name = name;
       }
   
  +    public void setPath( final Path path )
  +    {
  +        m_path = path;
  +    }
  +
       /**
        * Returns the files in this list.
        */
       public String[] listFiles( final TaskContext context )
           throws TaskException
       {
  -        final File file = context.resolveFile( m_name );
  -        return new String[] { file.getAbsolutePath() };
  +        final ArrayList files = new ArrayList();
  +        if( m_name != null )
  +        {
  +            final File file = context.resolveFile( m_name );
  +            files.add( file.getAbsolutePath() );
  +        }
  +        if( m_path != null )
  +        {
  +            final String[] fileNames = m_path.listFiles( context );
  +            for( int i = 0; i < fileNames.length; i++ )
  +            {
  +                files.add( fileNames[ i ] );
  +            }
  +        }
  +        return (String[])files.toArray( new String[ files.size() ] );
       }
   }
  
  
  
  1.2       +15 -2     jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/framework/file/test/path.ant
  
  Index: path.ant
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/framework/file/test/path.ant,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- path.ant	22 Mar 2002 04:12:37 -0000	1.1
  +++ path.ant	9 Apr 2002 02:26:34 -0000	1.2
  @@ -13,14 +13,14 @@
           </list-path>
       </target>
   
  -    <!-- Test setting the path attribute -->
  +    <!-- Test setting the path attribute with ; delims -->
       <target name="set-multi-path">
           <list-path>
               <path path="file1;file2;.."/>
           </list-path>
       </target>
   
  -    <!-- Test setting the path attribute -->
  +    <!-- Test setting the path attribute with : delims -->
       <target name="set-multi-path2">
           <list-path>
               <path path="file1:file2:.."/>
  @@ -62,6 +62,19 @@
                   <test-file-list name="file1"/>
               </path>
           </list-path>
  +    </target>
  +
  +    <!-- Test converting a string to a path -->
  +    <target name="convert-string-to-path">
  +        <list-path>
  +            <test-file-list path="file1;file2"/>
  +        </list-path>
  +    </target>
  +
  +    <!-- Test converting a path to a string -->
  +    <target name="convert-path-to-string">
  +        <path id="test-path" path="file1:file2"/>
  +        <log>test-path = ${test-path}</log>
       </target>
   
   </project>
  
  
  
  1.3       +14 -37    jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/AbstractAntTask.java
  
  Index: AbstractAntTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/AbstractAntTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractAntTask.java	30 Mar 2002 06:56:04 -0000	1.2
  +++ AbstractAntTask.java	9 Apr 2002 02:26:34 -0000	1.3
  @@ -7,24 +7,24 @@
    */
   package org.apache.antlib.core;
   
  +import java.util.ArrayList;
  +import java.util.HashMap;
  +import java.util.Map;
   import org.apache.myrmidon.api.AbstractTask;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.interfaces.embeddor.Embeddor;
   import org.apache.myrmidon.interfaces.model.Project;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
  -import org.apache.myrmidon.interfaces.embeddor.Embeddor;
  -import org.apache.avalon.framework.parameters.Parameters;
  -import java.util.Map;
  -import java.util.Iterator;
  -import java.util.ArrayList;
   
   /**
    * Abstract base class for Tasks which execute targets.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.2 $ $Date: 2002/03/30 06:56:04 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/09 02:26:34 $
    */
  -public abstract class AbstractAntTask extends AbstractTask
  +public abstract class AbstractAntTask
  +    extends AbstractTask
   {
       /**
        * If true, inherit all properties from parent Project
  @@ -32,6 +32,7 @@
        * inside the ant call itself
        */
       private boolean m_inheritAll;
  +
       /**
        * The target to process in build file. If not specified
        * will use default in specified build file.
  @@ -90,6 +91,7 @@
               final Workspace workspace =
                   embeddor.createWorkspace( buildParameters() );
   
  +            // TODO - inherit listeners, and services (TypeManager specifically)
               workspace.addProjectListener( embeddor.createListener("default"));
   
               if( null == m_target )
  @@ -134,21 +136,14 @@
        *
        * @return the created parameters
        */
  -    private Parameters buildParameters()
  +    private Map buildParameters()
           throws TaskException
       {
  -        final Parameters parameters = new Parameters();
  +        final Map parameters = new HashMap();
   
           if( m_inheritAll )
           {
  -            final Map properties = getContext().getProperties();
  -            final Iterator keys = properties.keySet().iterator();
  -            while( keys.hasNext() )
  -            {
  -                final String key = (String)keys.next();
  -                final Object value = properties.get( key );
  -                setProperty( parameters, key, value );
  -            }
  +            parameters.putAll( getContext().getProperties() );
           }
   
           final int size = m_parameters.size();
  @@ -157,28 +152,10 @@
               final AntParam param = (AntParam)m_parameters.get( i );
               param.validate();
               final String name = param.getName();
  -            final String value = param.getValue().toString();
  -            setProperty( parameters, name, value );
  +            final Object value = param.getValue();
  +            parameters.put( name, value );
           }
   
           return parameters;
  -    }
  -
  -    /**
  -     * Utility method to add the property into parameters object.
  -     *
  -     * @param parameters where to put property
  -     * @param name the property
  -     * @param value the value of property
  -     * @todo allow non-string params to be passed down
  -     */
  -    private void setProperty( final Parameters parameters,
  -                              final String name,
  -                              final Object value )
  -    {
  -        if( !name.startsWith( "myrmidon." ) )
  -        {
  -            parameters.setParameter( name, value.toString() );
  -        }
       }
   }
  
  
  
  1.3       +3 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/AntCallTask.java
  
  Index: AntCallTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/AntCallTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AntCallTask.java	29 Mar 2002 12:57:20 -0000	1.2
  +++ AntCallTask.java	9 Apr 2002 02:26:34 -0000	1.3
  @@ -17,10 +17,11 @@
    * or a referenced project.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.2 $ $Date: 2002/03/29 12:57:20 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/09 02:26:34 $
    * @ant.task name="ant-call"
    */
  -public class AntCallTask extends AbstractAntTask
  +public class AntCallTask
  +    extends AbstractAntTask
   {
       private static final Resources REZ =
           ResourceManager.getPackageResources( AntCallTask.class );
  
  
  
  1.44      +55 -9     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java
  
  Index: DefaultEmbeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- DefaultEmbeddor.java	8 Apr 2002 10:45:05 -0000	1.43
  +++ DefaultEmbeddor.java	9 Apr 2002 02:26:34 -0000	1.44
  @@ -12,6 +12,7 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   import java.util.List;
  +import java.util.Map;
   import org.apache.aut.converter.Converter;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  @@ -37,22 +38,27 @@
   import org.apache.myrmidon.interfaces.deployer.TypeDeployer;
   import org.apache.myrmidon.interfaces.embeddor.Embeddor;
   import org.apache.myrmidon.interfaces.executor.Executor;
  +import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
  +import org.apache.myrmidon.interfaces.executor.ExecutionContainer;
   import org.apache.myrmidon.interfaces.extensions.ExtensionManager;
   import org.apache.myrmidon.interfaces.model.Project;
   import org.apache.myrmidon.interfaces.property.PropertyResolver;
  +import org.apache.myrmidon.interfaces.property.PropertyStore;
   import org.apache.myrmidon.interfaces.role.RoleManager;
   import org.apache.myrmidon.interfaces.service.MultiSourceServiceManager;
   import org.apache.myrmidon.interfaces.type.TypeFactory;
   import org.apache.myrmidon.interfaces.type.TypeManager;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
   import org.apache.myrmidon.listeners.ProjectListener;
  +import org.apache.myrmidon.components.workspace.DefaultExecutionFrame;
  +import org.apache.myrmidon.components.store.DefaultPropertyStore;
   
   /**
    * Default implementation of Embeddor.
    * Instantiate this to embed inside other applications.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.43 $ $Date: 2002/04/08 10:45:05 $
  + * @version $Revision: 1.44 $ $Date: 2002/04/09 02:26:34 $
    */
   public class DefaultEmbeddor
       extends AbstractLogEnabled
  @@ -72,8 +78,6 @@
       private DefaultServiceManager m_serviceManager = new DefaultServiceManager();
       private Parameters m_parameters;
   
  -    private static final String MYRMIDON_HOME = "myrmidon.home";
  -
       /**
        * Setup basic properties of engine.
        * Called before init() and can be used to specify alternate components in system.
  @@ -121,22 +125,29 @@
       {
           final TypeFactory factory = m_typeManager.getFactory( ProjectBuilder.ROLE );
           final ProjectBuilder builder = (ProjectBuilder)factory.create( type );
  -        setupObject( builder, m_workspaceServiceManager, parameters );
  +        setupObject( builder, m_serviceManager, parameters );
           return builder;
       }
   
       /**
        * Creates a workspace.
        */
  -    public Workspace createWorkspace( final Parameters parameters )
  +    public Workspace createWorkspace( final Map properties )
           throws Exception
       {
           final Workspace workspace =
               (Workspace)createService( Workspace.class, PREFIX + "workspace.DefaultWorkspace" );
  -        // TODO - don't do this; need some way to pass separate sets of defines and config
  -        // to the workspace
  -        parameters.setParameter( MYRMIDON_HOME, m_parameters.getParameter( MYRMIDON_HOME ) );
  -        setupObject( workspace, m_workspaceServiceManager, parameters );
  +        setupObject( workspace, m_workspaceServiceManager, m_parameters );
  +
  +        // Create the property store
  +        final PropertyStore propStore = createBaseStore( properties );
  +
  +        // Create an execution frame, and attach it to the workspace
  +        final ExecutionFrame frame =
  +            new DefaultExecutionFrame( getLogger(),
  +                                       propStore,
  +                                       m_workspaceServiceManager);
  +        ( (ExecutionContainer)workspace ).setRootExecutionFrame( frame );
   
           // TODO - should keep track of workspaces, to dispose them later
           return workspace;
  @@ -393,6 +404,41 @@
                   final String message = REZ.getString( "bad-filename.error", files[ i ] );
                   throw new DeploymentException( message, e );
               }
  +        }
  +    }
  +
  +    /**
  +     * Creates the root property store for a workspace
  +     */
  +    private PropertyStore createBaseStore( final Map properties )
  +        throws Exception
  +    {
  +        final DefaultPropertyStore store = new DefaultPropertyStore();
  +
  +        addToStore( store, properties );
  +
  +        //Add system properties so that they overide user-defined properties
  +        addToStore( store, System.getProperties() );
  +
  +        return store;
  +    }
  +
  +    /**
  +     * Helper method to add values to a store.
  +     *
  +     * @param store the store
  +     * @param map the map of names->values
  +     */
  +    private void addToStore( final PropertyStore store, final Map map )
  +        throws Exception
  +    {
  +        final Iterator keys = map.keySet().iterator();
  +
  +        while( keys.hasNext() )
  +        {
  +            final String key = (String)keys.next();
  +            final Object value = map.get( key );
  +            store.setProperty( key, value );
           }
       }
   }
  
  
  
  1.25      +7 -5      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java
  
  Index: AspectAwareExecutor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- AspectAwareExecutor.java	29 Mar 2002 12:56:03 -0000	1.24
  +++ AspectAwareExecutor.java	9 Apr 2002 02:26:34 -0000	1.25
  @@ -18,8 +18,10 @@
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.myrmidon.api.Task;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.interfaces.aspect.AspectManager;
   import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
   
  @@ -28,10 +30,11 @@
    * the aspects helpers.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.24 $ $Date: 2002/03/29 12:56:03 $
  + * @version $Revision: 1.25 $ $Date: 2002/04/09 02:26:34 $
    */
   public class AspectAwareExecutor
       extends DefaultExecutor
  +    implements Serviceable
   {
       private static final Resources REZ =
           ResourceManager.getPackageResources( AspectAwareExecutor.class );
  @@ -49,8 +52,6 @@
       public void service( final ServiceManager serviceManager )
           throws ServiceException
       {
  -        super.service( serviceManager );
  -
           m_aspectManager = (AspectManager)serviceManager.lookup( AspectManager.ROLE );
       }
   
  @@ -90,11 +91,12 @@
               getAspectManager().preLogEnabled( logger );
   
               debug( "contextualizing.notice", taskName );
  -            doContextualize( task, taskModel, frame.getContext() );
  +            final TaskContext context = doCreateContext( frame );
  +            doContextualize( task, taskModel, context, frame );
   
               debug( "configuring.notice", taskName );
               getAspectManager().preConfigure( taskModel );
  -            doConfigure( task, taskModel, frame.getContext() );
  +            doConfigure( task, taskModel, context, frame );
   
               debug( "executing.notice", taskName );
               getAspectManager().preExecute();
  
  
  
  1.35      +30 -30    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java
  
  Index: DefaultExecutor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- DefaultExecutor.java	1 Apr 2002 09:56:26 -0000	1.34
  +++ DefaultExecutor.java	9 Apr 2002 02:26:34 -0000	1.35
  @@ -10,47 +10,30 @@
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.service.ServiceException;
  -import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.Serviceable;
   import org.apache.myrmidon.api.Task;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.components.workspace.DefaultTaskContext;
   import org.apache.myrmidon.interfaces.configurer.Configurer;
   import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
   import org.apache.myrmidon.interfaces.executor.Executor;
  -import org.apache.myrmidon.interfaces.type.TypeException;
   import org.apache.myrmidon.interfaces.type.TypeFactory;
  +import org.apache.myrmidon.interfaces.type.TypeManager;
   
   /**
    * The basic executor that just executes the tasks.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.34 $ $Date: 2002/04/01 09:56:26 $
  + * @version $Revision: 1.35 $ $Date: 2002/04/09 02:26:34 $
    */
   public class DefaultExecutor
       extends AbstractLogEnabled
  -    implements Executor, Serviceable
  +    implements Executor
   {
       private static final Resources REZ =
           ResourceManager.getPackageResources( DefaultExecutor.class );
   
  -    private Configurer m_configurer;
  -
  -    /**
  -     * Retrieve relevent services needed to deploy.
  -     *
  -     * @param serviceManager the ServiceManager
  -     * @exception ServiceException if an error occurs
  -     */
  -    public void service( final ServiceManager serviceManager )
  -        throws ServiceException
  -    {
  -        m_configurer = (Configurer)serviceManager.lookup( Configurer.ROLE );
  -    }
  -
       /**
        * Executes a task.
        */
  @@ -64,10 +47,11 @@
               final Task task = doCreateTask( taskName, frame );
   
               debug( "contextualizing.notice", taskName );
  -            doContextualize( task, taskModel, frame.getContext() );
  +            final TaskContext context = doCreateContext( frame );
  +            doContextualize( task, taskModel, context, frame );
   
               debug( "configuring.notice", taskName );
  -            doConfigure( task, taskModel, frame.getContext() );
  +            doConfigure( task, taskModel, context, frame );
   
               debug( "executing.notice", taskName );
               task.execute();
  @@ -91,6 +75,18 @@
       }
   
       /**
  +     * Creates a context for the task.
  +     */
  +    protected TaskContext doCreateContext( final ExecutionFrame frame )
  +    {
  +        // TODO - need to deactivate the context once the task has finished
  +        // executing
  +        return new DefaultTaskContext( frame.getServiceManager(),
  +                                       frame.getLogger(),
  +                                       frame.getProperties() );
  +    }
  +
  +    /**
        * Creates a task instance.
        */
       protected final Task doCreateTask( final String name, final ExecutionFrame frame )
  @@ -98,10 +94,11 @@
       {
           try
           {
  -            final TypeFactory factory = frame.getTypeManager().getFactory( Task.ROLE );
  +            final TypeManager typeManager = (TypeManager)frame.getServiceManager().lookup( TypeManager.ROLE );
  +            final TypeFactory factory = typeManager.getFactory( Task.ROLE );
               return (Task)factory.create( name );
           }
  -        catch( final TypeException te )
  +        catch( final Exception te )
           {
               final String message = REZ.getString( "create.error", name );
               throw new TaskException( message, te );
  @@ -113,10 +110,12 @@
        */
       protected final void doConfigure( final Task task,
                                         final Configuration taskModel,
  -                                      final TaskContext taskContext )
  -        throws ConfigurationException
  +                                      final TaskContext taskContext,
  +                                      final ExecutionFrame frame )
  +        throws Exception
       {
  -        m_configurer.configureElement( task, taskModel, taskContext );
  +        final Configurer configurer = (Configurer)frame.getServiceManager().lookup( Configurer.ROLE );
  +        configurer.configureElement( task, taskModel, taskContext );
       }
   
       /**
  @@ -124,12 +123,13 @@
        */
       protected final void doContextualize( final Task task,
                                             final Configuration taskModel,
  -                                          final TaskContext context )
  +                                          final TaskContext taskContext,
  +                                          final ExecutionFrame frame )
           throws TaskException
       {
           try
           {
  -            task.contextualize( context );
  +            task.contextualize( taskContext );
           }
           catch( final Throwable throwable )
           {
  
  
  
  1.6       +10 -5     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/property/ClassicPropertyResolver.java
  
  Index: ClassicPropertyResolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/property/ClassicPropertyResolver.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ClassicPropertyResolver.java	8 Apr 2002 10:45:05 -0000	1.5
  +++ ClassicPropertyResolver.java	9 Apr 2002 02:26:34 -0000	1.6
  @@ -10,13 +10,14 @@
   import org.apache.myrmidon.interfaces.property.PropertyResolver;
   import org.apache.myrmidon.interfaces.property.PropertyStore;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.TaskContext;
   
   /**
    * A {@link PropertyResolver} implementation which resolves properties
    * as per Ant1, ignoring undefined properties.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.5 $ $Date: 2002/04/08 10:45:05 $
  + * @version $Revision: 1.6 $ $Date: 2002/04/09 02:26:34 $
    *
    * @ant.type type="property-resolver" name="classic"
    */
  @@ -29,16 +30,20 @@
        * If there is no such value, returns the original property reference.
        *
        * @param propertyName the name of the property to retrieve
  -     * @param properties the set of known properties
  +     * @param context the set of known properties
        */
       protected Object getPropertyValue( final String propertyName,
  -                                       final PropertyStore properties )
  +                                       final TaskContext context )
           throws TaskException
       {
  -        if( ! properties.isPropertySet( propertyName ) )
  +        final Object value = context.getProperty( propertyName );
  +        if( value != null )
  +        {
  +            return value;
  +        }
  +        else
           {
               return "${" + propertyName + "}";
           }
  -        return properties.getProperty( propertyName );
       }
   }
  
  
  
  1.8       +25 -17    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/property/DefaultPropertyResolver.java
  
  Index: DefaultPropertyResolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/property/DefaultPropertyResolver.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultPropertyResolver.java	8 Apr 2002 10:45:05 -0000	1.7
  +++ DefaultPropertyResolver.java	9 Apr 2002 02:26:34 -0000	1.8
  @@ -15,6 +15,7 @@
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.interfaces.property.PropertyResolver;
   import org.apache.myrmidon.interfaces.property.PropertyStore;
   
  @@ -23,7 +24,7 @@
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.7 $ $Date: 2002/04/08 10:45:05 $
  + * @version $Revision: 1.8 $ $Date: 2002/04/09 02:26:34 $
    *
    * @ant.type type="property-resolver" name="default"
    */
  @@ -51,12 +52,12 @@
        * <code>toString()</code> called on the property value.
        *
        * @param content the property to resolve
  -     * @param properties the context in which to resolve property
  +     * @param context the context in which to resolve property
        * @return the reolved property
        * @exception TaskException if an error occurs
        */
       public Object resolveProperties( final String content,
  -                                     final PropertyStore properties )
  +                                     final TaskContext context )
           throws TaskException
       {
           int start = findNextProperty( content, 0 );
  @@ -72,7 +73,7 @@
           if( 0 == start && end == ( length - 1 ) )
           {
               return getPropertyValue( content.substring( start + 2, end ),
  -                                     properties );
  +                                     context );
           }
   
           final StringBuffer sb = new StringBuffer( length * 2 );
  @@ -82,7 +83,7 @@
           {
               final String propertyValue =
                   getPropertyStringValue( content.substring( start + 2, end ),
  -                                        properties );
  +                                        context );
   
               sb.append( content.substring( lastPlace, start ) );
               sb.append( propertyValue );
  @@ -108,12 +109,12 @@
        * substitutions based on specified context.
        *
        * @param content the property to resolve
  -     * @param properties the context in which to resolve property
  +     * @param context the context in which to resolve property
        * @return the reolved property
        * @exception TaskException if an error occurs
        */
       private Object recursiveResolveProperty( final String content,
  -                                             final PropertyStore properties )
  +                                             final TaskContext context )
           throws TaskException
       {
           int start = findNextProperty( content, 0 );
  @@ -129,8 +130,8 @@
           if( 0 == start && end == ( length - 1 ) )
           {
               final String propertyName = content.substring( start + 2, end );
  -            final Object key = recursiveResolveProperty( propertyName, properties );
  -            return getPropertyValue( key.toString(), properties );
  +            final Object key = recursiveResolveProperty( propertyName, context );
  +            return getPropertyValue( key.toString(), context );
           }
   
           final StringBuffer sb = new StringBuffer( length * 2 );
  @@ -140,8 +141,8 @@
           while( true )
           {
               final String propertyName = content.substring( start + 2, end );
  -            final Object key = recursiveResolveProperty( propertyName, properties );
  -            final String value = getPropertyStringValue( key.toString(), properties );
  +            final Object key = recursiveResolveProperty( propertyName, context );
  +            final String value = getPropertyStringValue( key.toString(), context );
   
               sb.append( content.substring( lastPlace, start ) );
               sb.append( value );
  @@ -246,17 +247,17 @@
        * Returns a property's value, converted to a String.
        */
       private String getPropertyStringValue( final String propertyName,
  -                                           final PropertyStore properties )
  +                                           final TaskContext context )
           throws TaskException
       {
  -        final Object value = getPropertyValue( propertyName, properties );
  +        final Object value = getPropertyValue( propertyName, context );
           if( value instanceof String )
           {
               return (String)value;
           }
           try
           {
  -            return (String)m_converter.convert( String.class, value, properties );
  +            return (String)m_converter.convert( String.class, value, context );
           }
           catch( final ConverterException e )
           {
  @@ -268,15 +269,22 @@
        * Retrieve a value from the specified context using the specified key.
        *
        * @param propertyName the key of value in context
  -     * @param properties the set of known properties
  +     * @param context the set of known properties
        * @return the object retrieved from context
        * @exception TaskException if the property is undefined
        */
       protected Object getPropertyValue( final String propertyName,
  -                                       final PropertyStore properties )
  +                                       final TaskContext context )
           throws TaskException
       {
  -        return properties.getProperty( propertyName );
  +        final Object value = context.getProperty( propertyName );
  +        if( value != null )
  +        {
  +            return value;
  +        }
  +
  +        final String message = REZ.getString( "prop.missing-value.error", propertyName );
  +        throw new TaskException( message );
       }
   }
   
  
  
  
  1.2       +1 -1      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/property/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/property/Resources.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Resources.properties	13 Mar 2002 07:35:18 -0000	1.1
  +++ Resources.properties	9 Apr 2002 02:26:34 -0000	1.2
  @@ -1,3 +1,3 @@
   #AbstractPropertyResolver
   prop.mismatched-braces.error=Malformed property with mismatched }'s.
  -prop.missing-value.error=Unable to find "{0}" to expand during property resolution.
  +prop.missing-value.error=Unknown property "{0}".
  
  
  
  1.6       +26 -16    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultExecutionFrame.java
  
  Index: DefaultExecutionFrame.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultExecutionFrame.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultExecutionFrame.java	21 Feb 2002 11:06:40 -0000	1.5
  +++ DefaultExecutionFrame.java	9 Apr 2002 02:26:35 -0000	1.6
  @@ -8,44 +8,54 @@
   package org.apache.myrmidon.components.workspace;
   
   import org.apache.avalon.framework.logger.Logger;
  -import org.apache.myrmidon.api.TaskContext;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
  -import org.apache.myrmidon.interfaces.type.TypeManager;
  +import org.apache.myrmidon.interfaces.property.PropertyStore;
   
   /**
    * Frames in which tasks are executed.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.5 $ $Date: 2002/02/21 11:06:40 $
  + * @version $Revision: 1.6 $ $Date: 2002/04/09 02:26:35 $
    */
  -class DefaultExecutionFrame
  +public class DefaultExecutionFrame
       implements ExecutionFrame
   {
       private final Logger m_logger;
  -    private final TaskContext m_context;
  -    private final TypeManager m_typeManager;
  +    private final PropertyStore m_propertyStore;
  +    private final ServiceManager m_serviceManager;
   
       public DefaultExecutionFrame( final Logger logger,
  -                                  final TaskContext context,
  -                                  final TypeManager typeManager )
  +                                  final PropertyStore propertyStore,
  +                                  final ServiceManager serviceManager )
       {
           m_logger = logger;
  -        m_context = context;
  -        m_typeManager = typeManager;
  +        m_propertyStore = propertyStore;
  +        m_serviceManager = serviceManager;
       }
   
  -    public TypeManager getTypeManager()
  +    /**
  +     * Returns the logger which is to be supplied to tasks.
  +     */
  +    public Logger getLogger()
       {
  -        return m_typeManager;
  +        return m_logger;
       }
   
  -    public Logger getLogger()
  +    /**
  +     * Returns the set of services to use to create, configure, and execute
  +     * tasks.
  +     */
  +    public ServiceManager getServiceManager()
       {
  -        return m_logger;
  +        return m_serviceManager;
       }
   
  -    public TaskContext getContext()
  +    /**
  +     * Returns the set of properties to be supplied to tasks.
  +     */
  +    public PropertyStore getProperties()
       {
  -        return m_context;
  +        return m_propertyStore;
       }
   }
  
  
  
  1.36      +2 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
  
  Index: DefaultTaskContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- DefaultTaskContext.java	8 Apr 2002 10:45:05 -0000	1.35
  +++ DefaultTaskContext.java	9 Apr 2002 02:26:35 -0000	1.36
  @@ -25,7 +25,7 @@
    * Default implementation of TaskContext.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.35 $ $Date: 2002/04/08 10:45:05 $
  + * @version $Revision: 1.36 $ $Date: 2002/04/09 02:26:35 $
    */
   public class DefaultTaskContext
       implements TaskContext
  @@ -149,7 +149,7 @@
                   m_propertyResolver = (PropertyResolver)getService( PropertyResolver.class );
               }
               final Object object =
  -                m_propertyResolver.resolveProperties( value, m_store );
  +                m_propertyResolver.resolveProperties( value, this );
               if( null == object )
               {
                   final String message = REZ.getString( "null-resolved-value.error", value );
  
  
  
  1.40      +20 -79    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java
  
  Index: DefaultWorkspace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- DefaultWorkspace.java	8 Apr 2002 10:45:05 -0000	1.39
  +++ DefaultWorkspace.java	9 Apr 2002 02:26:35 -0000	1.40
  @@ -9,11 +9,8 @@
   
   import java.io.File;
   import java.util.HashMap;
  -import java.util.Iterator;
  -import java.util.Map;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.Logger;
  @@ -21,35 +18,33 @@
   import org.apache.avalon.framework.parameters.Parameterizable;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.service.DefaultServiceManager;
  -import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.Serviceable;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.interfaces.deployer.Deployer;
   import org.apache.myrmidon.interfaces.deployer.DeploymentException;
   import org.apache.myrmidon.interfaces.deployer.TypeDeployer;
  +import org.apache.myrmidon.interfaces.executor.ExecutionContainer;
   import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
   import org.apache.myrmidon.interfaces.executor.Executor;
   import org.apache.myrmidon.interfaces.model.Dependency;
   import org.apache.myrmidon.interfaces.model.Project;
   import org.apache.myrmidon.interfaces.model.Target;
   import org.apache.myrmidon.interfaces.model.TypeLib;
  +import org.apache.myrmidon.interfaces.property.PropertyStore;
   import org.apache.myrmidon.interfaces.type.TypeManager;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
  -import org.apache.myrmidon.interfaces.property.PropertyStore;
   import org.apache.myrmidon.listeners.ProjectListener;
  -import org.apache.myrmidon.components.store.DefaultPropertyStore;
   
   /**
    * This is the default implementation of Workspace.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.39 $ $Date: 2002/04/08 10:45:05 $
  + * @version $Revision: 1.40 $ $Date: 2002/04/09 02:26:35 $
    */
   public class DefaultWorkspace
       extends AbstractLogEnabled
  -    implements Workspace, Serviceable, Parameterizable, Initializable
  +    implements Workspace, ExecutionContainer, Parameterizable
   {
       private static final Resources REZ =
           ResourceManager.getPackageResources( DefaultWorkspace.class );
  @@ -59,10 +54,12 @@
       private ServiceManager m_serviceManager;
       private Parameters m_parameters;
       private PropertyStore m_baseStore;
  -    private HashMap m_entries = new HashMap();
       private TypeManager m_typeManager;
       private Deployer m_deployer;
   
  +    /** A map from Project object -> ProjectEntry for that project. */
  +    private HashMap m_entries = new HashMap();
  +
       /**
        * Add a listener to project events.
        *
  @@ -84,18 +81,15 @@
       }
   
       /**
  -     * Retrieve relevent services needed for engine.
  -     *
  -     * @param serviceManager the ServiceManager
  -     * @exception ServiceException if an error occurs
  +     * Sets the root execution frame.
        */
  -    public void service( final ServiceManager serviceManager )
  -        throws ServiceException
  +    public void setRootExecutionFrame( final ExecutionFrame frame ) throws Exception
       {
  -        m_serviceManager = serviceManager;
  -        m_typeManager = (TypeManager)serviceManager.lookup( TypeManager.ROLE );
  -        m_executor = (Executor)serviceManager.lookup( Executor.ROLE );
  -        m_deployer = (Deployer)serviceManager.lookup( Deployer.ROLE );
  +        m_baseStore = frame.getProperties();
  +        m_serviceManager = frame.getServiceManager();
  +        m_typeManager = (TypeManager)m_serviceManager.lookup( TypeManager.ROLE );
  +        m_executor = (Executor)m_serviceManager.lookup( Executor.ROLE );
  +        m_deployer = (Deployer)m_serviceManager.lookup( Deployer.ROLE );
       }
   
       public void parameterize( final Parameters parameters )
  @@ -104,12 +98,6 @@
           m_parameters = parameters;
       }
   
  -    public void initialize()
  -        throws Exception
  -    {
  -        m_baseStore = createBaseStore();
  -    }
  -
       /**
        * Execute a target in a particular project.
        * Execute in the project context.
  @@ -130,24 +118,6 @@
           m_listenerSupport.projectFinished( project.getProjectName() );
       }
   
  -    private PropertyStore createBaseStore()
  -        throws Exception
  -    {
  -        final DefaultPropertyStore store = new DefaultPropertyStore();
  -
  -        final String[] names = m_parameters.getNames();
  -        for( int i = 0; i < names.length; i++ )
  -        {
  -            final String value = m_parameters.getParameter( names[ i ], null );
  -            store.setProperty( names[ i ], value );
  -        }
  -
  -        //Add system properties so that they overide user-defined properties
  -        addToStore( store, System.getProperties() );
  -
  -        return store;
  -    }
  -
       private File findTypeLib( final String libraryName )
           throws Exception
       {
  @@ -227,7 +197,7 @@
           final TypeManager typeManager = m_typeManager.createChildTypeManager();
           serviceManager.put( TypeManager.ROLE, typeManager );
   
  -        // TODO - Add child role manager
  +        // TODO - Add child role manager and configurer
   
           //We need to create a new deployer so that it deploys
           //to project specific TypeManager
  @@ -239,31 +209,20 @@
   
           //We need to place projects and ProjectManager
           //in ComponentManager so as to support project-local call()
  +        // TODO - add project to properties, not services
           serviceManager.put( Workspace.ROLE, this );
           serviceManager.put( Project.ROLE, project );
   
  -        final String[] names = project.getProjectNames();
  -        for( int i = 0; i < names.length; i++ )
  -        {
  -            final String name = names[ i ];
  -            final Project other = project.getProject( name );
  -            serviceManager.put( Project.ROLE + "/" + name, other );
  -        }
  -
           // Create a logger
           final Logger logger =
               new RoutingLogger( getLogger(), m_listenerSupport );
   
  -        //TODO: Put this in Execution Frame
  +        // Properties
           final PropertyStore store = m_baseStore.createChildStore("");
  -
  -       // Create and configure the context
  -        final DefaultTaskContext context =
  -            new DefaultTaskContext( serviceManager, logger, store );
  -        context.setProperty( TaskContext.BASE_DIRECTORY, project.getBaseDirectory() );
  +        store.setProperty( TaskContext.BASE_DIRECTORY, project.getBaseDirectory() );
   
           final DefaultExecutionFrame frame =
  -            new DefaultExecutionFrame( logger, context, typeManager );
  +            new DefaultExecutionFrame( logger, store, serviceManager );
   
           /**
            *  @todo Should no occur but done for the time being to simplify evolution.
  @@ -462,7 +421,7 @@
           }
   
           //is setting name even necessary ???
  -        frame.getContext().setProperty( TaskContext.NAME, name );
  +        frame.getProperties().setProperty( TaskContext.NAME, name );
   
           //notify listeners
           m_listenerSupport.taskStarted( name );
  @@ -474,22 +433,4 @@
           m_listenerSupport.taskFinished();
       }
   
  -    /**
  -     * Helper method to add values to a store.
  -     *
  -     * @param store the store
  -     * @param map the map of names->values
  -     */
  -    private void addToStore( final PropertyStore store, final Map map )
  -        throws Exception
  -    {
  -        final Iterator keys = map.keySet().iterator();
  -
  -        while( keys.hasNext() )
  -        {
  -            final String key = (String)keys.next();
  -            final Object value = map.get( key );
  -            store.setProperty( key, value );
  -        }
  -    }
   }
  
  
  
  1.8       +6 -5      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/EmbeddedAnt.java
  
  Index: EmbeddedAnt.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/EmbeddedAnt.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- EmbeddedAnt.java	7 Apr 2002 06:51:40 -0000	1.7
  +++ EmbeddedAnt.java	9 Apr 2002 02:26:35 -0000	1.8
  @@ -9,6 +9,8 @@
   
   import java.io.File;
   import java.util.ArrayList;
  +import java.util.HashMap;
  +import java.util.Map;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.excalibur.io.FileUtil;
  @@ -35,7 +37,7 @@
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.7 $ $Date: 2002/04/07 06:51:40 $
  + * @version $Revision: 1.8 $ $Date: 2002/04/09 02:26:35 $
    */
   public class EmbeddedAnt
       extends AbstractLogEnabled
  @@ -50,9 +52,9 @@
       private Project m_project;
       private String m_listenerName = "default";
       private ArrayList m_listeners = new ArrayList();
  -    private Parameters m_workspaceProps = new Parameters();
       private Parameters m_builderProps = new Parameters();
       private Parameters m_embeddorParameters = new Parameters();
  +    private Map m_workspaceProperties = new HashMap();
       private ClassLoader m_sharedClassLoader;
       private Embeddor m_embeddor;
       private File m_homeDir;
  @@ -122,8 +124,7 @@
        */
       public void setWorkspaceProperty( final String name, final Object value )
       {
  -        // TODO - Make properties Objects, not Strings
  -        m_workspaceProps.setParameter( name, value.toString() );
  +        m_workspaceProperties.put( name, value );
       }
   
       /**
  @@ -174,7 +175,7 @@
           final Project project = prepareProjectModel( embeddor );
   
           // Create a new workspace
  -        final Workspace workspace = embeddor.createWorkspace( m_workspaceProps );
  +        final Workspace workspace = embeddor.createWorkspace( m_workspaceProperties );
           prepareListeners( embeddor, workspace );
   
           //execute the project
  
  
  
  1.12      +6 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/embeddor/Embeddor.java
  
  Index: Embeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/embeddor/Embeddor.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Embeddor.java	1 Apr 2002 09:56:27 -0000	1.11
  +++ Embeddor.java	9 Apr 2002 02:26:35 -0000	1.12
  @@ -11,12 +11,13 @@
   import org.apache.myrmidon.interfaces.model.Project;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
   import org.apache.myrmidon.listeners.ProjectListener;
  +import java.util.Map;
   
   /**
    * Interface through which you embed Myrmidon into applications.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.11 $ $Date: 2002/04/01 09:56:27 $
  + * @version $Revision: 1.12 $ $Date: 2002/04/09 02:26:35 $
    */
   public interface Embeddor
   {
  @@ -53,10 +54,12 @@
       /**
        * Creates a {@link Workspace} that can be used to execute projects.
        *
  -     * @param parameters The properties to define in the workspace
  +     * @param properties The properties to define in the workspace.  These
  +     *                   are added to the properties in the embeddor's
  +     *                   root execution frame.
        * @return the Workspace
        * @throws Exception If the workspace could not be created.
        */
  -    Workspace createWorkspace( Parameters parameters )
  +    Workspace createWorkspace( Map properties )
           throws Exception;
   }
  
  
  
  1.11      +16 -9     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/executor/ExecutionFrame.java
  
  Index: ExecutionFrame.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/executor/ExecutionFrame.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ExecutionFrame.java	1 Apr 2002 09:56:27 -0000	1.10
  +++ ExecutionFrame.java	9 Apr 2002 02:26:35 -0000	1.11
  @@ -8,14 +8,20 @@
   package org.apache.myrmidon.interfaces.executor;
   
   import org.apache.avalon.framework.logger.Logger;
  -import org.apache.myrmidon.api.TaskContext;
  -import org.apache.myrmidon.interfaces.type.TypeManager;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.myrmidon.interfaces.property.PropertyStore;
   
   /**
  - * Frames in which tasks are executed.
  + * An Execution Frame represents the scope in which tasks are executed.
  + * The scope may include an entire workspace, a project, target, or
  + * individual task.
  + *
  + * <p>An Execution Frame bundles together all of the context required to
  + * execute tasks - that is, a set of properties, a set of services, and
  + * a logger.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.10 $ $Date: 2002/04/01 09:56:27 $
  + * @version $Revision: 1.11 $ $Date: 2002/04/09 02:26:35 $
    */
   public interface ExecutionFrame
   {
  @@ -23,17 +29,18 @@
       String ROLE = ExecutionFrame.class.getName();
   
       /**
  -     * @return The TypeManager to use for creating Tasks.
  +     * Returns the set of services to use to create, configure, and execute
  +     * tasks.
        */
  -    TypeManager getTypeManager();
  +    ServiceManager getServiceManager();
   
       /**
  -     * @return The logger which is used for execution messages.
  +     * Returns the logger which is to be supplied to tasks.
        */
       Logger getLogger();
   
       /**
  -     * @return The TaskContext in which the task is executed.
  +     * Returns the set of properties to be supplied to tasks.
        */
  -    TaskContext getContext();
  +    PropertyStore getProperties();
   }
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/executor/ExecutionContainer.java
  
  Index: ExecutionContainer.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.myrmidon.interfaces.executor;
  
  /**
   * This interface is used to supply a root execution frame to a container
   * that executes tasks.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/04/09 02:26:35 $
   */
  public interface ExecutionContainer
  {
      /**
       * Sets the root execution frame for the container.
       */
      void setRootExecutionFrame( ExecutionFrame frame ) throws Exception;
  }
  
  
  
  1.7       +4 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/property/PropertyResolver.java
  
  Index: PropertyResolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/property/PropertyResolver.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PropertyResolver.java	8 Apr 2002 10:45:06 -0000	1.6
  +++ PropertyResolver.java	9 Apr 2002 02:26:35 -0000	1.7
  @@ -8,6 +8,7 @@
   package org.apache.myrmidon.interfaces.property;
   
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.TaskContext;
   
   /**
    *
  @@ -15,7 +16,7 @@
    * String content.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.6 $ $Date: 2002/04/08 10:45:06 $
  + * @version $Revision: 1.7 $ $Date: 2002/04/09 02:26:35 $
    *
    * @ant:role shorthand="property-resolver"
    */
  @@ -30,11 +31,11 @@
        * Rules used for property resolution are implementation dependent.
        *
        * @param value the value to resolve, which may contain property identifiers
  -     * @param properties the set of properties to resolve against.
  +     * @param context the set of properties to resolve against.
        * @return the resolved content
        * @exception TaskException if an error occurs
        */
       Object resolveProperties( final String value,
  -                              final PropertyStore properties )
  +                              final TaskContext context )
           throws TaskException;
   }
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/property/MapPropertyStore.java
  
  Index: MapPropertyStore.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.myrmidon.interfaces.property;
  
  import java.util.Map;
  import java.util.HashMap;
  import org.apache.myrmidon.api.TaskException;
  import org.apache.avalon.excalibur.i18n.ResourceManager;
  import org.apache.avalon.excalibur.i18n.Resources;
  
  /**
   * A simple unscoped, unsynchronized property store which is backed by a Map.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/04/09 02:26:35 $
   */
  public class MapPropertyStore
      implements PropertyStore
  {
      private static final Resources REZ =
          ResourceManager.getPackageResources( MapPropertyStore.class );
  
      private final Map m_properties = new HashMap();
  
      /**
       * Creates an empty store.
       */
      public MapPropertyStore()
      {
      }
  
      /**
       * Creates a store containing the given properties.
       */
      public MapPropertyStore( final Map properties )
      {
          m_properties.putAll( properties );
      }
  
      /**
       * Return <code>true</code> if the specified property is set.
       *
       * @param name the name of property
       */
      public boolean isPropertySet( final String name )
      {
          return m_properties.containsKey( name );
      }
  
      /**
       * Retrieve the value of specified property.
       *
       * @param name the name of the property
       * @return the value of the property.  Never returns null.
       * @throws TaskException if there is no such property, or on error
       *         retrieving property, such as an invalid property name.
       */
      public Object getProperty( final String name )
          throws TaskException
      {
          final Object value = m_properties.get( name );
          if( value == null )
          {
              final String message = REZ.getString( "unknown-property.error", name );
              throw new TaskException( message );
          }
          return value;
      }
  
      /**
       * Retrieve a copy of all the properties that are "in-scope"
       * for store.
       *
       * @return a copy of all the properties that are "in-scope"
       *         for store.
       * @throws TaskException if theres an error retrieving propertys
       */
      public Map getProperties()
          throws TaskException
      {
          return new HashMap( m_properties );
      }
  
      /**
       * Set the property with specified name to specified value.
       * The specific implementation will apply various rules
       * before setting the property.
       *
       * @param name the name of property
       * @param value the value of property
       * @throws TaskException if property can not be set
       */
      public void setProperty( String name, Object value )
          throws TaskException
      {
          m_properties.put( name, value );
      }
  
      /**
       * Return a child PropertyStore with specified name.
       * This is to allow support for scoped stores. However a
       * store may choose to be unscoped and just return a
       * reference to itself.
       *
       * @param name the name of child store
       * @return the child store
       * @throws TaskException if theres an error creating child store
       */
      public PropertyStore createChildStore( String name )
          throws TaskException
      {
          return this;
      }
  }
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/property/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  unknown-property.error=Unknown property "{0}".
  
  

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