You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2002/01/06 02:56:09 UTC

cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers DefaultCompilerAdapter.java

donaldp     02/01/05 17:56:09

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers
                        DefaultCompilerAdapter.java
  Log:
  Use Execute2 abstraction
  
  Revision  Changes    Path
  1.22      +6 -9      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- DefaultCompilerAdapter.java	30 Dec 2001 10:46:58 -0000	1.21
  +++ DefaultCompilerAdapter.java	6 Jan 2002 01:56:09 -0000	1.22
  @@ -14,10 +14,8 @@
   import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.taskdefs.Javac;
  -import org.apache.tools.ant.taskdefs.exec.Execute;
  -import org.apache.tools.ant.taskdefs.exec.LogOutputStream;
  +import org.apache.tools.ant.taskdefs.exec.Execute2;
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.Path;
   
  @@ -53,7 +51,7 @@
       protected boolean m_includeJavaRuntime;
       protected String m_memoryInitialSize;
       protected String m_memoryMaximumSize;
  -    protected Project m_project;
  +    protected File m_baseDir;
   
       /*
        * jdg - TODO - all these attributes are currently protected, but they
  @@ -78,7 +76,7 @@
           m_extdirs = attributes.getExtdirs();
           m_compileList = attributes.getFileList();
           m_compileClasspath = attributes.getClasspath();
  -        m_project = attributes.getProject();
  +        m_baseDir = attributes.getBaseDirectory();
           m_includeAntRuntime = attributes.getIncludeantruntime();
           m_includeJavaRuntime = attributes.getIncludejavaruntime();
           m_memoryInitialSize = attributes.getMemoryInitialSize();
  @@ -391,10 +389,9 @@
   
               try
               {
  -                final Execute exe = new Execute();
  -                exe.setOutput( new LogOutputStream( m_attributes.hackGetLogger(), false ) );
  -                exe.setError( new LogOutputStream( m_attributes.hackGetLogger(), true ) );
  -                exe.setWorkingDirectory( m_project.getBaseDir() );
  +                final Execute2 exe = new Execute2();
  +                setupLogger( exe );
  +                exe.setWorkingDirectory( m_baseDir );
                   exe.setCommandline( commandArray );
                   return exe.execute();
               }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>