ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/service ExecService.java
Date Wed, 01 May 2002 09:51:39 GMT
conor       02/05/01 02:51:39

  Modified:    proposal/mutant bootstrap.bat bootstrap.sh
               proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution
                        CoreExecService.java Frame.java
               proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system
                        Ref.java
               proposal/mutant/src/java/common/org/apache/ant/common/service
                        ExecService.java
  Log:
  Project ref task now allows properties in the referenced project
  to be overriden
  
  Revision  Changes    Path
  1.4       +1 -3      jakarta-ant/proposal/mutant/bootstrap.bat
  
  Index: bootstrap.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/bootstrap.bat,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -u -r1.3 -r1.4
  --- bootstrap.bat	16 Apr 2002 14:07:46 -0000	1.3
  +++ bootstrap.bat	1 May 2002 09:51:39 -0000	1.4
  @@ -26,7 +26,5 @@
   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
  
  
  
  1.6       +0 -2      jakarta-ant/proposal/mutant/bootstrap.sh
  
  Index: bootstrap.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/bootstrap.sh,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  --- bootstrap.sh	16 Apr 2002 14:07:46 -0000	1.5
  +++ bootstrap.sh	1 May 2002 09:51:39 -0000	1.6
  @@ -27,5 +27,3 @@
   # 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
  
  
  
  1.14      +4 -2      jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/CoreExecService.java
  
  Index: CoreExecService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/CoreExecService.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -w -u -r1.13 -r1.14
  --- CoreExecService.java	30 Apr 2002 14:57:02 -0000	1.13
  +++ CoreExecService.java	1 May 2002 09:51:39 -0000	1.14
  @@ -226,11 +226,13 @@
        * @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);     
       }
   
   
  
  
  
  1.23      +9 -1      jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java
  
  Index: Frame.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -w -u -r1.22 -r1.23
  --- Frame.java	1 May 2002 07:19:30 -0000	1.22
  +++ Frame.java	1 May 2002 09:51:39 -0000	1.23
  @@ -638,18 +638,26 @@
        * @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();
  
  
  
  1.2       +3 -8      jakarta-ant/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Ref.java
  
  Index: Ref.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Ref.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -u -r1.1 -r1.2
  --- Ref.java	17 Apr 2002 15:51:06 -0000	1.1
  +++ Ref.java	1 May 2002 09:51:39 -0000	1.2
  @@ -65,7 +65,7 @@
    * @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 @@
       /** 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 void init(AntContext context, String componentType)
            throws ExecutionException {
           super.init(context, componentType);
  -        execService = (ExecService) getCoreService(ExecService.class);
       }
   
   
  @@ -119,9 +114,9 @@
        * @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());
       }
   }
   
  
  
  
  1.9       +3 -2      jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/service/ExecService.java
  
  Index: ExecService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/service/ExecService.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -u -r1.8 -r1.9
  --- ExecService.java	17 Apr 2002 15:51:07 -0000	1.8
  +++ ExecService.java	1 May 2002 09:51:39 -0000	1.9
  @@ -82,10 +82,11 @@
        * @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;
   
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message