diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/Project.java b/proposal/myrmidon/src/main/org/apache/tools/ant/Project.java index fc9132d2b..49390d928 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/Project.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/Project.java @@ -884,48 +884,6 @@ public class Project public void executeTarget( String targetName ) throws TaskException { - - // sanity check ourselves, if we've been asked to build nothing - // then we should complain - - if( targetName == null ) - { - String msg = "No target specified"; - throw new TaskException( msg ); - } - - // Sort the dependency tree, and run everything from the - // beginning until we hit our targetName. - // Sorting checks if all the targets (and dependencies) - // exist, and if there is any cycle in the dependency - // graph. - Vector sortedTargets = topoSort( targetName, targets ); - - int curidx = 0; - Target curtarget; - - do - { - curtarget = (Target)sortedTargets.elementAt( curidx++ ); - curtarget.performTasks(); - } while( !curtarget.getName().equals( targetName ) ); - } - - /** - * execute the sequence of targets, and the targets they depend on - * - * @param targetNames Description of Parameter - * @throws TaskException if the build failed - */ - public void executeTargets( Vector targetNames ) - throws TaskException - { - Throwable error = null; - - for( int i = 0; i < targetNames.size(); i++ ) - { - executeTarget( (String)targetNames.elementAt( i ) ); - } } /** diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/Target.java b/proposal/myrmidon/src/main/org/apache/tools/ant/Target.java index d273d88b2..a07469e5f 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/Target.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/Target.java @@ -121,25 +121,6 @@ public class Target return retval; } - public final void performTasks() - { - try - { - project.fireTargetStarted( this ); - execute(); - project.fireTargetFinished( this, null ); - } - catch( final TaskException te ) - { - project.fireTargetFinished( this, te ); - } - catch( RuntimeException exc ) - { - project.fireTargetFinished( this, exc ); - throw exc; - } - } - public void addDependency( String dependency ) { dependencies.addElement( dependency ); @@ -150,29 +131,6 @@ public class Target children.addElement( task ); } - public void execute() - throws TaskException - { - Enumeration enum = children.elements(); - while( enum.hasMoreElements() ) - { - Object o = enum.nextElement(); - if( o instanceof Task ) - { - Task task = (Task)o; - task.perform(); - } - else - { - } - } - } - - public String toString() - { - return name; - } - void replaceChild( Task el, Object o ) { int index = -1; diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java index fc9132d2b..49390d928 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java @@ -884,48 +884,6 @@ public class Project public void executeTarget( String targetName ) throws TaskException { - - // sanity check ourselves, if we've been asked to build nothing - // then we should complain - - if( targetName == null ) - { - String msg = "No target specified"; - throw new TaskException( msg ); - } - - // Sort the dependency tree, and run everything from the - // beginning until we hit our targetName. - // Sorting checks if all the targets (and dependencies) - // exist, and if there is any cycle in the dependency - // graph. - Vector sortedTargets = topoSort( targetName, targets ); - - int curidx = 0; - Target curtarget; - - do - { - curtarget = (Target)sortedTargets.elementAt( curidx++ ); - curtarget.performTasks(); - } while( !curtarget.getName().equals( targetName ) ); - } - - /** - * execute the sequence of targets, and the targets they depend on - * - * @param targetNames Description of Parameter - * @throws TaskException if the build failed - */ - public void executeTargets( Vector targetNames ) - throws TaskException - { - Throwable error = null; - - for( int i = 0; i < targetNames.size(); i++ ) - { - executeTarget( (String)targetNames.elementAt( i ) ); - } } /** diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/Target.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/Target.java index d273d88b2..a07469e5f 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/Target.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/Target.java @@ -121,25 +121,6 @@ public class Target return retval; } - public final void performTasks() - { - try - { - project.fireTargetStarted( this ); - execute(); - project.fireTargetFinished( this, null ); - } - catch( final TaskException te ) - { - project.fireTargetFinished( this, te ); - } - catch( RuntimeException exc ) - { - project.fireTargetFinished( this, exc ); - throw exc; - } - } - public void addDependency( String dependency ) { dependencies.addElement( dependency ); @@ -150,29 +131,6 @@ public class Target children.addElement( task ); } - public void execute() - throws TaskException - { - Enumeration enum = children.elements(); - while( enum.hasMoreElements() ) - { - Object o = enum.nextElement(); - if( o instanceof Task ) - { - Task task = (Task)o; - task.perform(); - } - else - { - } - } - } - - public String toString() - { - return name; - } - void replaceChild( Task el, Object o ) { int index = -1;