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-myrmidon/container/src/java/org/apache/myrmidon/components/builder DefaultProject.java
Date Fri, 07 Jun 2002 06:12:39 GMT
donaldp     2002/06/06 23:12:39

  Modified:    container/src/java/org/apache/myrmidon/components/builder
                        DefaultProject.java
  Log:
  Expose Project name via getProjectName() and make sure that getName() returns default target
name (as project implements TargetMetaData)
  
  Revision  Changes    Path
  1.21      +13 -8     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultProject.java
  
  Index: DefaultProject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultProject.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- DefaultProject.java	7 Jun 2002 05:48:20 -0000	1.20
  +++ DefaultProject.java	7 Jun 2002 06:12:38 -0000	1.21
  @@ -28,7 +28,7 @@
    * Default project implementation.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.20 $ $Date: 2002/06/07 05:48:20 $
  + * @version $Revision: 1.21 $ $Date: 2002/06/07 06:12:38 $
    */
   public class DefaultProject
       extends AbstractLogEnabled
  @@ -100,10 +100,6 @@
        */
       public void addTarget( final Target target )
       {
  -        if( target.getProject() != this )
  -        {
  -            throw new IllegalArgumentException();
  -        }
           m_targets.put( target.getName(), target);
       }
   
  @@ -195,13 +191,23 @@
       }
   
       /**
  +     * Return the name of the project.
  +     *
  +     * @return the name of the project.
  +     */
  +    public String getProjectName()
  +    {
  +        return m_name;
  +    }
  +
  +    /**
        * Retrieve the name of the Target.
        *
        * @return the name of the Target.
        */
       public String getName()
       {
  -        return m_name;
  +        return m_defaultTarget;
       }
   
       /**
  @@ -244,8 +250,7 @@
           throws TaskException
       {
           final Workspace workspace = createWorkspace( frame );
  -        final String uri = ((Target)target).getProject().getURI();
  -        workspace.execute( uri, target.getName() );
  +        workspace.execute( getURI(), target.getName() );
       }
   
       /**
  
  
  

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