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, 03 Apr 2002 06:15:42 GMT
conor       02/04/02 22:15:42

  Modified:    proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution
                        CoreExecService.java ExecutionContext.java
               proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant
                        Project.java
               proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system
                        Ant.java AntCall.java
               proposal/mutant/src/java/common/org/apache/ant/common/antlib
                        AntContext.java
               proposal/mutant/src/java/common/org/apache/ant/common/service
                        ExecService.java
  Log:
  Slight reorg of methods between context and service classes
  
  Revision  Changes    Path
  1.6       +9 -0      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.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  --- CoreExecService.java	24 Mar 2002 13:28:31 -0000	1.5
  +++ CoreExecService.java	3 Apr 2002 06:15:41 -0000	1.6
  @@ -176,5 +176,14 @@
       public String getProjectName() {
           return frame.getProjectName();
       }
  +
  +    /**
  +     * Get the base directory for this execution of this frame
  +     *
  +     * @return the base directory
  +     */
  +    public File getBaseDir() {
  +        return frame.getBaseDir();
  +    }
   }
   
  
  
  
  1.11      +0 -9      jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionContext.java
  
  Index: ExecutionContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionContext.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -w -u -r1.10 -r1.11
  --- ExecutionContext.java	18 Mar 2002 02:44:24 -0000	1.10
  +++ ExecutionContext.java	3 Apr 2002 06:15:41 -0000	1.11
  @@ -116,15 +116,6 @@
   
   
       /**
  -     * Get the base directory for this execution of this frame
  -     *
  -     * @return the base directory
  -     */
  -    public File getBaseDir() {
  -        return frame.getBaseDir();
  -    }
  -
  -    /**
        * Gets the location associated with the ExecutionContext
        *
        * @return the location in the build model associated with this context.
  
  
  
  1.17      +12 -1     jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -w -u -r1.16 -r1.17
  --- Project.java	29 Mar 2002 11:21:19 -0000	1.16
  +++ Project.java	3 Apr 2002 06:15:41 -0000	1.17
  @@ -382,6 +382,17 @@
       }
   
       /**
  +     * Get the Project's default Target, if any
  +     *
  +     * @return the project's default target or null if there is no default.
  +     * @deprecated
  +     */
  +    public String getDefaultTarget() {
  +        throw new BuildException("The default project target is no longer " 
  +            + "available through this method.");
  +    }
  +
  +    /**
        * Get a project property
        *
        * @param name the property name
  @@ -441,7 +452,7 @@
        * @return the baseDir
        */
       public File getBaseDir() {
  -        return context.getBaseDir();
  +        return execService.getBaseDir();
       }
   
       /**
  
  
  
  1.5       +3 -1      jakarta-ant/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Ant.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- Ant.java	18 Mar 2002 02:44:26 -0000	1.4
  +++ Ant.java	3 Apr 2002 06:15:41 -0000	1.5
  @@ -106,7 +106,9 @@
        */
       public void execute() throws ExecutionException {
           if (baseDir == null) {
  -            baseDir = getAntContext().getBaseDir();
  +            ExecService execService
  +                = (ExecService)getCoreService(ExecService.class);
  +            baseDir = execService.getBaseDir();
           }
           
           File antFile = null;
  
  
  
  1.4       +2 -2      jakarta-ant/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/AntCall.java
  
  Index: AntCall.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/AntCall.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -u -r1.3 -r1.4
  --- AntCall.java	18 Mar 2002 02:44:26 -0000	1.3
  +++ AntCall.java	3 Apr 2002 06:15:41 -0000	1.4
  @@ -69,10 +69,10 @@
        * @exception ExecutionException if the build fails
        */
       public void execute() throws ExecutionException {
  -        setProperty(MagicProperties.BASEDIR, 
  -            getAntContext().getBaseDir().getAbsolutePath());
           ExecService execService
                = (ExecService)getCoreService(ExecService.class);
  +        setProperty(MagicProperties.BASEDIR, 
  +            execService.getBaseDir().getAbsolutePath());
   
           execService.callTarget(getProperties(), getTargets());
       }
  
  
  
  1.6       +1 -8      jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/antlib/AntContext.java
  
  Index: AntContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/antlib/AntContext.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  --- AntContext.java	18 Mar 2002 02:44:27 -0000	1.5
  +++ AntContext.java	3 Apr 2002 06:15:41 -0000	1.6
  @@ -87,14 +87,7 @@
            throws ExecutionException;
   
       /**
  -     * Get the basedir for the current execution
  -     *
  -     * @return the base directory for this execution of Ant
  -     */
  -    File getBaseDir();
  -
  -    /**
  -     * Gets the location associated witj the AntContext
  +     * Gets the location associated with the AntContext
        *
        * @return the location
        */
  
  
  
  1.5       +6 -0      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.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- ExecService.java	24 Mar 2002 13:28:31 -0000	1.4
  +++ ExecService.java	3 Apr 2002 06:15:41 -0000	1.5
  @@ -114,5 +114,11 @@
        */
       String getProjectName();
   
  +    /**
  +     * Get the basedir for the current execution
  +     *
  +     * @return the base directory for this execution of Ant
  +     */
  +    File getBaseDir();
   }
   
  
  
  

--
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