to be overriden git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272638 13f79535-47bb-0310-9956-ffa450edef68master
@@ -26,7 +26,5 @@ REM run full build using bootstrapped version | |||||
java -jar bootstrap\lib\start.jar %* | java -jar bootstrap\lib\start.jar %* | ||||
REM Use the full build as the build used by the build script | 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 |
@@ -27,5 +27,3 @@ java -jar bootstrap/lib/start.jar $* | |||||
# Use the full build as the build used by the build script | # Use the full build as the build used by the build script | ||||
cp -r dist/lib bootstrap | cp -r dist/lib bootstrap | ||||
#clean up after bootstrap | |||||
java -jar bootstrap/lib/start.jar clean |
@@ -226,11 +226,13 @@ public class CoreExecService implements ExecService { | |||||
* @param referenceName the name under which the project will be | * @param referenceName the name under which the project will be | ||||
* referenced. | * referenced. | ||||
* @param model the project model. | * @param model the project model. | ||||
* @param initialData the project's initial data load. | |||||
* @exception ExecutionException if the project cannot be referenced. | * @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 { | throws ExecutionException { | ||||
frame.createProjectReference(referenceName, model); | |||||
frame.createProjectReference(referenceName, model, initialData); | |||||
} | } | ||||
@@ -638,18 +638,26 @@ public class Frame implements DemuxOutputReceiver { | |||||
* @param name the name under which the project will be | * @param name the name under which the project will be | ||||
* referenced. | * referenced. | ||||
* @param project the project model. | * @param project the project model. | ||||
* @param initialData the project's initial data load. | |||||
* @exception ExecutionException if the project cannot be referenced. | * @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 { | throws ExecutionException { | ||||
Frame referencedFrame = createFrame(project); | Frame referencedFrame = createFrame(project); | ||||
if (initialData != null) { | |||||
referencedFrame.setInitialProperties(initialData); | |||||
} | |||||
// does the frame have any overrides? | // does the frame have any overrides? | ||||
Map initialProperties = (Map) overrides.get(name); | Map initialProperties = (Map) overrides.get(name); | ||||
if (initialProperties != null) { | if (initialProperties != null) { | ||||
referencedFrame.setInitialProperties(initialProperties); | referencedFrame.setInitialProperties(initialProperties); | ||||
overrides.remove(name); | overrides.remove(name); | ||||
} | } | ||||
referencedFrames.put(name, referencedFrame); | referencedFrames.put(name, referencedFrame); | ||||
referencedFrame.initialize(); | referencedFrame.initialize(); | ||||
@@ -65,7 +65,7 @@ import org.apache.ant.common.util.ExecutionException; | |||||
* @author Conor MacNeill | * @author Conor MacNeill | ||||
* @created 17 April 2002 | * @created 17 April 2002 | ||||
*/ | */ | ||||
public class Ref extends AbstractTask { | |||||
public class Ref extends SubBuild { | |||||
/** The project file containing the project to be referenced. */ | /** The project file containing the project to be referenced. */ | ||||
private File projectFile; | private File projectFile; | ||||
@@ -73,10 +73,6 @@ public class Ref extends AbstractTask { | |||||
/** THe name under which this project is to be referenced. */ | /** THe name under which this project is to be referenced. */ | ||||
private String name; | private String name; | ||||
/** The core's ExecutionService for running builds and external programs */ | |||||
private ExecService execService; | |||||
/** | /** | ||||
* Initialise this task | * Initialise this task | ||||
* | * | ||||
@@ -88,7 +84,6 @@ public class Ref extends AbstractTask { | |||||
public void init(AntContext context, String componentType) | public void init(AntContext context, String componentType) | ||||
throws ExecutionException { | throws ExecutionException { | ||||
super.init(context, componentType); | 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. | * @exception ExecutionException if the project cannot be referenced. | ||||
*/ | */ | ||||
public void execute() throws ExecutionException { | public void execute() throws ExecutionException { | ||||
Project model = execService.parseXMLBuildFile(projectFile); | |||||
Project model = getExecService().parseXMLBuildFile(projectFile); | |||||
execService.createProjectReference(name, model); | |||||
getExecService().createProjectReference(name, model, getProperties()); | |||||
} | } | ||||
} | } | ||||
@@ -82,10 +82,11 @@ public interface ExecService { | |||||
* @param referenceName the name under which the project will be | * @param referenceName the name under which the project will be | ||||
* referenced. | * referenced. | ||||
* @param model the project model. | * @param model the project model. | ||||
* @param initialData the project's initial data load. | |||||
* @exception ExecutionException if the project cannot be referenced. | * @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; | |||||
/** | /** | ||||