adammurdoch 2002/07/01 19:12:07
Modified: ant1compat/src/java/org/apache/tools/ant
Ant1CompatTargetTask.java
framework/src/java/org/apache/myrmidon/framework/project
TargetTask.java
Log:
Give subclasses of TargetTask a chance to mess with the nested tasks
before they get executed.
Revision Changes Path
1.4 +5 -4
jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Ant1CompatTargetTask.java
Index: Ant1CompatTargetTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Ant1CompatTargetTask.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Ant1CompatTargetTask.java 27 Jun 2002 11:13:07 -0000 1.3
+++ Ant1CompatTargetTask.java 2 Jul 2002 02:12:07 -0000 1.4
@@ -8,6 +8,7 @@
package org.apache.tools.ant;
import org.apache.myrmidon.api.TaskException;
+import org.apache.myrmidon.api.metadata.ModelElement;
import org.apache.myrmidon.framework.project.TargetTask;
/**
@@ -46,9 +47,8 @@
/**
* Checks that the "if" property has been set, and that the "unless"
* property has not been set before executing the contained tasks.
- * @throws TaskException
*/
- protected void executeContainedTasks()
+ protected void executeContainedTasks( final ModelElement[] tasks )
throws TaskException
{
if ( m_ifCondition != null )
@@ -68,6 +68,7 @@
return;
}
}
- super.executeContainedTasks();
+
+ super.executeContainedTasks( tasks );
}
}
1.2 +5 -6
jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/project/TargetTask.java
Index: TargetTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/project/TargetTask.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TargetTask.java 27 Jun 2002 11:13:07 -0000 1.1
+++ TargetTask.java 2 Jul 2002 02:12:07 -0000 1.2
@@ -99,7 +99,9 @@
REZ.getString( "target.exec.notice", m_name );
getContext().verbose( message );
- executeContainedTasks();
+ final ModelElement[] tasks =
+ (ModelElement[])m_tasks.toArray( new ModelElement[
m_tasks.size() ] );
+ executeContainedTasks( tasks );
}
/**
@@ -139,12 +141,9 @@
*
* @throws TaskException if theres an eror executing contained tasks.
*/
- protected void executeContainedTasks()
+ protected void executeContainedTasks( final ModelElement[] tasks )
throws TaskException
{
- final ModelElement[] tasks =
- (ModelElement[])m_tasks.toArray( new ModelElement[
m_tasks.size() ] );
-
for( int i = 0; i < tasks.length; i++ )
{
final ModelElement task = tasks[ i ];
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>