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/manager DefaultProjectManager.java
Date Thu, 14 Jun 2001 12:08:54 GMT
donaldp     01/06/14 05:08:54

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/components/manager
                        DefaultProjectManager.java
  Log:
  Make cross project DAGS work.
  
  Revision  Changes    Path
  1.8       +28 -0     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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultProjectManager.java	2001/06/12 14:19:54	1.7
  +++ DefaultProjectManager.java	2001/06/14 12:08:54	1.8
  @@ -201,6 +201,20 @@
           return entry;
       }
   
  +    private Project getProject( final String name, final Project project )
  +        throws TaskException
  +    {
  +        final Project other = project.getProject( name );
  +        
  +        if( null == other )
  +        {
  +            //TODO: Fix this so location information included in description
  +            throw new TaskException( "Project '" + name + "' not found." );
  +        }
  +
  +        return other;
  +    }
  +
       /**
        * Helper method to execute a target.
        *
  @@ -215,6 +229,20 @@
                             final ProjectEntry entry )
           throws TaskException
       {
  +        final int index = targetName.indexOf( "->" );
  +        if( -1 != index )
  +        {
  +            final String name = targetName.substring( 0, index );
  +            final String otherTargetName = targetName.substring( index + 2 );
  +
  +            final Project otherProject = getProject( name, project );
  +            final ProjectEntry otherEntry = getProjectEntry( otherProject );
  +
  +            //Execute target in referenced project 
  +            execute( otherProject, otherTargetName, otherEntry );
  +            return;
  +        }
  +
           final Target target = project.getTarget( targetName );
           if( null == target )
           {
  
  
  

Mime
View raw message