diff --git a/proposal/mutant/bootstrap.bat b/proposal/mutant/bootstrap.bat index 57c62ec56..2db03f27a 100755 --- a/proposal/mutant/bootstrap.bat +++ b/proposal/mutant/bootstrap.bat @@ -26,7 +26,5 @@ REM run full build using bootstrapped version java -jar bootstrap\lib\start.jar %* REM Use the full build as the build used by the build script -xcopy /s dist bootstrap +xcopy /s /y dist bootstrap -REM clean up after bootstrap -java -jar bootstrap\lib\start.jar clean diff --git a/proposal/mutant/bootstrap.sh b/proposal/mutant/bootstrap.sh index 2e096a9ca..8b192a1cc 100755 --- a/proposal/mutant/bootstrap.sh +++ b/proposal/mutant/bootstrap.sh @@ -27,5 +27,3 @@ java -jar bootstrap/lib/start.jar $* # Use the full build as the build used by the build script cp -r dist/lib bootstrap -#clean up after bootstrap -java -jar bootstrap/lib/start.jar clean diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/CoreExecService.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/CoreExecService.java index b82a6d3ab..a12ffc767 100644 --- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/CoreExecService.java +++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/CoreExecService.java @@ -226,11 +226,13 @@ public class CoreExecService implements ExecService { * @param referenceName the name under which the project will be * referenced. * @param model the project model. + * @param initialData the project's initial data load. * @exception ExecutionException if the project cannot be referenced. */ - public void createProjectReference(String referenceName, Project model) + public void createProjectReference(String referenceName, Project model, + Map initialData) throws ExecutionException { - frame.createProjectReference(referenceName, model); + frame.createProjectReference(referenceName, model, initialData); } diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java index ef94bf78a..fe59c5465 100644 --- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java +++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java @@ -638,18 +638,26 @@ public class Frame implements DemuxOutputReceiver { * @param name the name under which the project will be * referenced. * @param project the project model. + * @param initialData the project's initial data load. * @exception ExecutionException if the project cannot be referenced. */ - protected void createProjectReference(String name, Project project) + protected void createProjectReference(String name, Project project, + Map initialData) throws ExecutionException { Frame referencedFrame = createFrame(project); + if (initialData != null) { + referencedFrame.setInitialProperties(initialData); + } + // does the frame have any overrides? Map initialProperties = (Map) overrides.get(name); if (initialProperties != null) { referencedFrame.setInitialProperties(initialProperties); overrides.remove(name); } + + referencedFrames.put(name, referencedFrame); referencedFrame.initialize(); diff --git a/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Ref.java b/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Ref.java index 053a29a9e..1794bd50e 100644 --- a/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Ref.java +++ b/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Ref.java @@ -65,7 +65,7 @@ import org.apache.ant.common.util.ExecutionException; * @author Conor MacNeill * @created 17 April 2002 */ -public class Ref extends AbstractTask { +public class Ref extends SubBuild { /** The project file containing the project to be referenced. */ private File projectFile; @@ -73,10 +73,6 @@ public class Ref extends AbstractTask { /** THe name under which this project is to be referenced. */ private String name; - /** The core's ExecutionService for running builds and external programs */ - private ExecService execService; - - /** * Initialise this task * @@ -88,7 +84,6 @@ public class Ref extends AbstractTask { public void init(AntContext context, String componentType) throws ExecutionException { super.init(context, componentType); - execService = (ExecService) getCoreService(ExecService.class); } @@ -119,9 +114,9 @@ public class Ref extends AbstractTask { * @exception ExecutionException if the project cannot be referenced. */ public void execute() throws ExecutionException { - Project model = execService.parseXMLBuildFile(projectFile); + Project model = getExecService().parseXMLBuildFile(projectFile); - execService.createProjectReference(name, model); + getExecService().createProjectReference(name, model, getProperties()); } } diff --git a/proposal/mutant/src/java/common/org/apache/ant/common/service/ExecService.java b/proposal/mutant/src/java/common/org/apache/ant/common/service/ExecService.java index 1621ef943..7f73f59aa 100644 --- a/proposal/mutant/src/java/common/org/apache/ant/common/service/ExecService.java +++ b/proposal/mutant/src/java/common/org/apache/ant/common/service/ExecService.java @@ -82,10 +82,11 @@ public interface ExecService { * @param referenceName the name under which the project will be * referenced. * @param model the project model. + * @param initialData the project's initial data load. * @exception ExecutionException if the project cannot be referenced. */ - void createProjectReference(String referenceName, Project model) - throws ExecutionException; + void createProjectReference(String referenceName, Project model, + Map initialData) throws ExecutionException; /**