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/components/model Project.java Target.java
Date Thu, 31 May 2001 17:20:30 GMT
donaldp     01/05/31 10:20:29

  Modified:    proposal/myrmidon/src/java/org/apache/ant/modules/basic
                        AntCall.java Property.java
               proposal/myrmidon/src/java/org/apache/ant/modules/core
                        AbstractResourceRegisterer.java
                        RegisterConverter.java RegisterTasklib.java
               proposal/myrmidon/src/java/org/apache/myrmidon Main.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/builder
                        ProjectBuilder.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer
                        Configurer.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer
                        DefaultTskDeployer.java TskDeployer.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor
                        Embeddor.java MyrmidonEmbeddor.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/executor
                        DefaultExecutor.java Executor.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/manager
                        DefaultProjectManager.java ProjectManager.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/model
                        Project.java Target.java
  Log:
  Implemented "ROLE attribute is role name in interfaces" pattern.
  
  Revision  Changes    Path
  1.10      +2 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/basic/AntCall.java
  
  Index: AntCall.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/basic/AntCall.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AntCall.java	2001/05/29 12:06:07	1.9
  +++ AntCall.java	2001/05/31 17:19:36	1.10
  @@ -45,9 +45,8 @@
           throws ComponentException
       {
           m_componentManager = componentManager;
  -        m_projectEngine = (ProjectManager)componentManager.
  -            lookup( "org.apache.myrmidon.components.manager.ProjectManager" );
  -        m_project = (Project)componentManager.lookup( "org.apache.ant.project.Project"
);
  +        m_projectEngine = (ProjectManager)componentManager.lookup( ProjectManager.ROLE
);
  +        m_project = (Project)componentManager.lookup( Project.ROLE );
       }
   
       public void setTarget( final String target )
  
  
  
  1.9       +1 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/basic/Property.java
  
  Index: Property.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/basic/Property.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Property.java	2001/05/29 12:06:08	1.8
  +++ Property.java	2001/05/31 17:19:38	1.9
  @@ -42,8 +42,7 @@
       public void compose( final ComponentManager componentManager )
           throws ComponentException
       {
  -        m_configurer = (Configurer)componentManager.
  -            lookup( "org.apache.myrmidon.components.configurer.Configurer" );
  +        m_configurer = (Configurer)componentManager.lookup( Configurer.ROLE );
   
           m_engine = (DataTypeEngine)componentManager.
               lookup( "org.apache.ant.tasklet.engine.DataTypeEngine" );
  
  
  
  1.9       +2 -5      jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/AbstractResourceRegisterer.java
  
  Index: AbstractResourceRegisterer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/AbstractResourceRegisterer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AbstractResourceRegisterer.java	2001/05/29 12:06:09	1.8
  +++ AbstractResourceRegisterer.java	2001/05/31 17:19:44	1.9
  @@ -39,11 +39,8 @@
       public void compose( final ComponentManager componentManager )
           throws ComponentException
       {
  -        m_engine = (Executor)componentManager.
  -            lookup( "org.apache.myrmidon.components.executor.Executor" );
  -
  -        m_tskDeployer = (TskDeployer)componentManager.
  -            lookup( "org.apache.myrmidon.components.deployer.TskDeployer" );
  +        m_engine = (Executor)componentManager.lookup( Executor.ROLE );
  +        m_tskDeployer = (TskDeployer)componentManager.lookup( TskDeployer.ROLE );
   
           m_dataTypeEngine = (DataTypeEngine)componentManager.
               lookup( "org.apache.ant.tasklet.engine.DataTypeEngine" );
  
  
  
  1.9       +1 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterConverter.java
  
  Index: RegisterConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterConverter.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- RegisterConverter.java	2001/05/29 12:06:09	1.8
  +++ RegisterConverter.java	2001/05/31 17:19:45	1.9
  @@ -41,8 +41,7 @@
       public void compose( final ComponentManager componentManager )
           throws ComponentException
       {
  -        m_tskDeployer = (TskDeployer)componentManager.
  -            lookup( "org.apache.myrmidon.components.deployer.TskDeployer" );
  +        m_tskDeployer = (TskDeployer)componentManager.lookup( TskDeployer.ROLE );
   
           m_converterEngine = (ConverterEngine)componentManager.
               lookup( "org.apache.ant.convert.engine.ConverterEngine" );
  
  
  
  1.8       +1 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterTasklib.java
  
  Index: RegisterTasklib.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterTasklib.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RegisterTasklib.java	2001/05/29 12:06:10	1.7
  +++ RegisterTasklib.java	2001/05/31 17:19:46	1.8
  @@ -33,8 +33,7 @@
       public void compose( final ComponentManager componentManager )
           throws ComponentException
       {
  -        m_tskDeployer = (TskDeployer)componentManager.
  -            lookup( "org.apache.ant.tasklet.engine.TskDeployer" );
  +        m_tskDeployer = (TskDeployer)componentManager.lookup( TskDeployer.ROLE );
       }
   
       public void setLib( final String lib )
  
  
  
  1.5       +0 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/Main.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Main.java	2001/05/31 09:32:56	1.4
  +++ Main.java	2001/05/31 17:19:52	1.5
  @@ -41,7 +41,6 @@
   import org.apache.myrmidon.components.manager.LogTargetToListenerAdapter;
   import org.apache.myrmidon.components.manager.ProjectManager;
   import org.apache.myrmidon.components.model.Project;
  -import org.apache.myrmidon.launcher.LauncherClassLoader;
   import org.apache.myrmidon.listeners.ProjectListener;
   
   /**
  @@ -281,8 +280,6 @@
           {
               throw new Exception( "myrmidon-home (" + homeDir + ") is not a directory" );
           }
  -
  -        final File libDir = new File( homeDir, "lib" );
   
           final String filename = m_parameters.getParameter( "filename", null );
           final File buildFile = (new File( filename )).getCanonicalFile();
  
  
  
  1.5       +2 -0      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/ProjectBuilder.java
  
  Index: ProjectBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/ProjectBuilder.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProjectBuilder.java	2001/05/29 12:06:18	1.4
  +++ ProjectBuilder.java	2001/05/31 17:19:55	1.5
  @@ -20,6 +20,8 @@
   public interface ProjectBuilder
       extends Component
   {
  +    String ROLE = "org.apache.myrmidon.components.builder.ProjectBuilder";
  +
       /**
        * build a project from source.
        *
  
  
  
  1.2       +2 -0      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/Configurer.java
  
  Index: Configurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/Configurer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Configurer.java	2001/05/28 09:06:51	1.1
  +++ Configurer.java	2001/05/31 17:19:58	1.2
  @@ -20,6 +20,8 @@
   public interface Configurer
       extends Component
   {
  +    String ROLE = "org.apache.myrmidon.components.configurer.Configurer";
  +
       /**
        * Configure an object based on a configuration in a particular context.
        * This configuring can be done in different ways for different
  
  
  
  1.3       +1 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/DefaultTskDeployer.java
  
  Index: DefaultTskDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/DefaultTskDeployer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultTskDeployer.java	2001/05/29 10:47:35	1.2
  +++ DefaultTskDeployer.java	2001/05/31 17:20:02	1.3
  @@ -73,8 +73,7 @@
           throws ComponentException
       {
           //UGLY HACK alert !!!
  -        final Executor executor = (Executor)componentManager.
  -            lookup( "org.apache.myrmidon.components.executor.Executor" );
  +        final Executor executor = (Executor)componentManager.lookup( Executor.ROLE );
           m_taskRegistry = executor.getRegistry();
   
           final ConverterEngine converterEngine = (ConverterEngine)componentManager.
  
  
  
  1.2       +2 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/TskDeployer.java
  
  Index: TskDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/TskDeployer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TskDeployer.java	2001/05/29 09:56:00	1.1
  +++ TskDeployer.java	2001/05/31 17:20:03	1.2
  @@ -10,8 +10,6 @@
   import java.net.URL;
   import org.apache.avalon.framework.camelot.Deployer;
   import org.apache.avalon.framework.camelot.DeploymentException;
  -import org.apache.avalon.framework.logger.Loggable;
  -import org.apache.log.Logger;
   
   /**
    * This class deploys a .tsk file into a registry.
  @@ -21,6 +19,8 @@
   public interface TskDeployer
       extends Deployer
   {
  +    String ROLE = "org.apache.myrmidon.components.deployer.TskDeployer";
  +
       void deployConverter( String name, String location, URL url )
           throws DeploymentException;
   
  
  
  
  1.5       +2 -0      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/Embeddor.java
  
  Index: Embeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/Embeddor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Embeddor.java	2001/05/29 09:13:32	1.4
  +++ Embeddor.java	2001/05/31 17:20:08	1.5
  @@ -23,6 +23,8 @@
   public interface Embeddor
       extends Component, Parameterizable, Initializable, Startable, Disposable
   {
  +    String ROLE = "org.apache.myrmidon.components.embeddor.Embeddor";
  +
       /**
        * Retrieve builder for runtime.
        * Valid after initialize() call
  
  
  
  1.10      +5 -5      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/MyrmidonEmbeddor.java
  
  Index: MyrmidonEmbeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/MyrmidonEmbeddor.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MyrmidonEmbeddor.java	2001/05/29 15:24:15	1.9
  +++ MyrmidonEmbeddor.java	2001/05/31 17:20:09	1.10
  @@ -200,15 +200,15 @@
           componentManager.put( "org.apache.avalon.framework.camelot.Factory", m_factory
);
   
           //Following components required when Myrmidon is used as build tool
  -        componentManager.put( "org.apache.myrmidon.components.manager.ProjectManager",
m_projectManager );
  -        componentManager.put( "org.apache.myrmidon.components.builder.ProjectBuilder",
m_builder );
  +        componentManager.put( ProjectManager.ROLE, m_projectManager );
  +        componentManager.put( ProjectBuilder.ROLE, m_builder );
   
           //Following components required when Myrmidon allows user deployment of tasks etal.
  -        componentManager.put( "org.apache.myrmidon.components.deployer.TskDeployer", m_deployer
);
  +        componentManager.put( TskDeployer.ROLE, m_deployer );
   
           //Following components required when allowing Container tasks
  -        componentManager.put( "org.apache.myrmidon.components.configurer.Configurer", m_configurer
);
  -        componentManager.put( "org.apache.myrmidon.components.executor.Executor", m_executor
);
  +        componentManager.put( Configurer.ROLE, m_configurer );
  +        componentManager.put( Executor.ROLE, m_executor );
   
           return componentManager;
       }
  
  
  
  1.4       +1 -2      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultExecutor.java	2001/05/29 12:06:21	1.3
  +++ DefaultExecutor.java	2001/05/31 17:20:15	1.4
  @@ -64,8 +64,7 @@
   
           m_factory = (Factory)componentManager.lookup( "org.apache.avalon.framework.camelot.Factory"
);
   
  -        m_configurer = (Configurer)componentManager.
  -            lookup( "org.apache.myrmidon.components.configurer.Configurer" );
  +        m_configurer = (Configurer)componentManager.lookup( Configurer.ROLE );
       }
   
       public void execute( final Configuration taskData, final TaskContext context )
  
  
  
  1.4       +2 -0      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/Executor.java
  
  Index: Executor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/Executor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Executor.java	2001/05/29 12:06:22	1.3
  +++ Executor.java	2001/05/31 17:20:16	1.4
  @@ -21,6 +21,8 @@
   public interface Executor
       extends Component
   {
  +    String ROLE = "org.apache.myrmidon.components.executor.Executor";
  +
       /**
        * Retrieve locator registry associated with engine.
        * TODO: Remove this as it violates IOC
  
  
  
  1.4       +2 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/manager/DefaultProjectManager.java
  
  Index: DefaultProjectManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/manager/DefaultProjectManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultProjectManager.java	2001/05/29 12:06:23	1.3
  +++ DefaultProjectManager.java	2001/05/31 17:20:19	1.4
  @@ -70,8 +70,7 @@
           throws ComponentException
       {
           m_componentManager = (DefaultComponentManager)componentManager;
  -        m_executor = (Executor)componentManager.
  -            lookup( "org.apache.myrmidon.components.executor.Executor" );
  +        m_executor = (Executor)componentManager.lookup( Executor.ROLE );
       }
   
       /**
  @@ -86,7 +85,7 @@
           throws TaskException
       {
           //HACK: should do this a better way !!!!!!
  -        m_componentManager.put( "org.apache.ant.project.Project", project );
  +        m_componentManager.put( Project.ROLE, project );
   
           m_listenerSupport.projectStarted();
   
  
  
  
  1.4       +2 -0      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/manager/ProjectManager.java
  
  Index: ProjectManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/manager/ProjectManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProjectManager.java	2001/05/29 12:06:23	1.3
  +++ ProjectManager.java	2001/05/31 17:20:20	1.4
  @@ -22,6 +22,8 @@
   public interface ProjectManager
       extends Component
   {
  +    String ROLE = "org.apache.myrmidon.components.manager.ProjectManager";
  +
       /**
        * Add a listener to project events.
        *
  
  
  
  1.2       +2 -0      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/Project.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Project.java	2001/05/29 07:39:29	1.1
  +++ Project.java	2001/05/31 17:20:23	1.2
  @@ -22,6 +22,8 @@
   public interface Project
       extends Component
   {
  +    String ROLE = "org.apache.myrmidon.components.model.Project";
  +
       // the name of currently executing project
       String PROJECT          = "ant.project.name";
   
  
  
  
  1.2       +2 -0      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/Target.java
  
  Index: Target.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/Target.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Target.java	2001/05/29 07:39:29	1.1
  +++ Target.java	2001/05/31 17:20:25	1.2
  @@ -19,6 +19,8 @@
   public interface Target
       extends Component
   {
  +    String ROLE = "org.apache.myrmidon.components.model.Target";
  +
       /**
        * Get dependencies of target
        *
  
  
  

Mime
View raw message