git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270561 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -14,10 +14,8 @@ import java.io.PrintWriter; | |||||
| import org.apache.avalon.excalibur.util.StringUtil; | import org.apache.avalon.excalibur.util.StringUtil; | ||||
| import org.apache.avalon.framework.logger.AbstractLogEnabled; | import org.apache.avalon.framework.logger.AbstractLogEnabled; | ||||
| import org.apache.myrmidon.api.TaskException; | 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.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.Commandline; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| @@ -53,7 +51,7 @@ public abstract class DefaultCompilerAdapter | |||||
| protected boolean m_includeJavaRuntime; | protected boolean m_includeJavaRuntime; | ||||
| protected String m_memoryInitialSize; | protected String m_memoryInitialSize; | ||||
| protected String m_memoryMaximumSize; | protected String m_memoryMaximumSize; | ||||
| protected Project m_project; | |||||
| protected File m_baseDir; | |||||
| /* | /* | ||||
| * jdg - TODO - all these attributes are currently protected, but they | * jdg - TODO - all these attributes are currently protected, but they | ||||
| @@ -78,7 +76,7 @@ public abstract class DefaultCompilerAdapter | |||||
| m_extdirs = attributes.getExtdirs(); | m_extdirs = attributes.getExtdirs(); | ||||
| m_compileList = attributes.getFileList(); | m_compileList = attributes.getFileList(); | ||||
| m_compileClasspath = attributes.getClasspath(); | m_compileClasspath = attributes.getClasspath(); | ||||
| m_project = attributes.getProject(); | |||||
| m_baseDir = attributes.getBaseDirectory(); | |||||
| m_includeAntRuntime = attributes.getIncludeantruntime(); | m_includeAntRuntime = attributes.getIncludeantruntime(); | ||||
| m_includeJavaRuntime = attributes.getIncludejavaruntime(); | m_includeJavaRuntime = attributes.getIncludejavaruntime(); | ||||
| m_memoryInitialSize = attributes.getMemoryInitialSize(); | m_memoryInitialSize = attributes.getMemoryInitialSize(); | ||||
| @@ -391,10 +389,9 @@ public abstract class DefaultCompilerAdapter | |||||
| try | 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 ); | exe.setCommandline( commandArray ); | ||||
| return exe.execute(); | return exe.execute(); | ||||
| } | } | ||||
| @@ -14,10 +14,8 @@ import java.io.PrintWriter; | |||||
| import org.apache.avalon.excalibur.util.StringUtil; | import org.apache.avalon.excalibur.util.StringUtil; | ||||
| import org.apache.avalon.framework.logger.AbstractLogEnabled; | import org.apache.avalon.framework.logger.AbstractLogEnabled; | ||||
| import org.apache.myrmidon.api.TaskException; | 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.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.Commandline; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| @@ -53,7 +51,7 @@ public abstract class DefaultCompilerAdapter | |||||
| protected boolean m_includeJavaRuntime; | protected boolean m_includeJavaRuntime; | ||||
| protected String m_memoryInitialSize; | protected String m_memoryInitialSize; | ||||
| protected String m_memoryMaximumSize; | protected String m_memoryMaximumSize; | ||||
| protected Project m_project; | |||||
| protected File m_baseDir; | |||||
| /* | /* | ||||
| * jdg - TODO - all these attributes are currently protected, but they | * jdg - TODO - all these attributes are currently protected, but they | ||||
| @@ -78,7 +76,7 @@ public abstract class DefaultCompilerAdapter | |||||
| m_extdirs = attributes.getExtdirs(); | m_extdirs = attributes.getExtdirs(); | ||||
| m_compileList = attributes.getFileList(); | m_compileList = attributes.getFileList(); | ||||
| m_compileClasspath = attributes.getClasspath(); | m_compileClasspath = attributes.getClasspath(); | ||||
| m_project = attributes.getProject(); | |||||
| m_baseDir = attributes.getBaseDirectory(); | |||||
| m_includeAntRuntime = attributes.getIncludeantruntime(); | m_includeAntRuntime = attributes.getIncludeantruntime(); | ||||
| m_includeJavaRuntime = attributes.getIncludejavaruntime(); | m_includeJavaRuntime = attributes.getIncludejavaruntime(); | ||||
| m_memoryInitialSize = attributes.getMemoryInitialSize(); | m_memoryInitialSize = attributes.getMemoryInitialSize(); | ||||
| @@ -391,10 +389,9 @@ public abstract class DefaultCompilerAdapter | |||||
| try | 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 ); | exe.setCommandline( commandArray ); | ||||
| return exe.execute(); | return exe.execute(); | ||||
| } | } | ||||