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-myrmidon/container/src/java/org/apache/myrmidon/components/workspace DefaultWorkspace.java Resources.properties
Date Tue, 25 Jun 2002 11:22:43 GMT
adammurdoch    2002/06/25 04:22:43

  Modified:    container/src/java/org/apache/myrmidon/components/workspace
                        DefaultWorkspace.java Resources.properties
  Log:
  - Set a bunch of properties that describe the current project (name, uri, references, etc).
    These are used by the tests, and will disappear when we add some kind of introspecting
    property resolver.
  - Fix more error messages.
  
  Revision  Changes    Path
  1.100     +14 -4     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java
  
  Index: DefaultWorkspace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- DefaultWorkspace.java	24 Jun 2002 01:50:01 -0000	1.99
  +++ DefaultWorkspace.java	25 Jun 2002 11:22:42 -0000	1.100
  @@ -86,7 +86,7 @@
           if( null == target )
           {
               final String message =
  -                REZ.getString( "workspace.missing.target",
  +                REZ.getString( "workspace.missing-target.error",
                                  project.getProjectDescriptor().getUri(),
                                  targetName );
               throw new TaskException( message );
  @@ -150,6 +150,17 @@
                   propertyStore.setProperty( key, ref.getProject() );
               }
   
  +            // Set some standard properties
  +            // TODO - use an expression language to introspect the Project object directly.
  +            propertyStore.setProperty( "project.name", project.getName() );
  +            propertyStore.setProperty( "project.basedir", project.getBaseDirectory() );
  +            propertyStore.setProperty( "project.uri", project.getProjectDescriptor().getUri()
);
  +            for( int i = 0; i < refs.length; i++ )
  +            {
  +                final ProjectRef ref = refs[ i ];
  +                propertyStore.setProperty( "projectref." + ref.getName() + ".uri", ref.getProject().getUri()
);
  +            }
  +
               return childFrame;
           }
           catch( final Exception e )
  @@ -199,8 +210,7 @@
           catch( final Exception e )
           {
               final String message =
  -                REZ.getString( "nobuild-descriptor.error",
  -                               descriptor.getUri() );
  +                REZ.getString( "nobuild-project.error", descriptor.getUri() );
               throw new TaskException( message, e );
           }
       }
  
  
  
  1.17      +2 -2      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/Resources.properties,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Resources.properties	11 Jun 2002 07:45:11 -0000	1.16
  +++ Resources.properties	25 Jun 2002 11:22:42 -0000	1.17
  @@ -1,12 +1,12 @@
   no-deploy.error=Error deploying type library {0}.
  -nobuild-project.error=Error creating project file at {0}.
  +nobuild-project.error=Could not load project "{0}".
   bad-deployer-config.error=Error configuring deployer.
   bad-frame.error=Error setting up ExecutionFrame.
   no-project.error=Project {0} not found.
   exec-target.notice=Executing project {0}, target {1}.
   exec-task.notice=Executing task {0}.
   target-dependency-cycle.error=Cycle in dependencies for target {0}.
  -workspace.missing-target.error=Unable to locate target named "{1}" in project at "{0}".
  +workspace.missing-target.error=No target named "{1}" in project "{0}".
   
   #DefaultTaskContext
   unknown-prop.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