From d47f6c9b67e3b0a3f743b478be8ef53c2e5e6a87 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sun, 16 Dec 2001 06:21:41 +0000 Subject: [PATCH] project.setProperty() -> setProperty() setProperty() is inherited from AbstractTask and actually delegates to TaskContext to do the work. project.getBaseDir() -> getBaseDirectory() getBaseDirectory() is also inherited from AbstractTask and also delegates to TaskContext. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270212 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tools/ant/taskdefs/Available.java | 2 +- .../apache/tools/ant/taskdefs/Checksum.java | 2 +- .../org/apache/tools/ant/taskdefs/Cvs.java | 3 +-- .../apache/tools/ant/taskdefs/ExecTask.java | 3 +-- .../org/apache/tools/ant/taskdefs/Input.java | 2 +- .../org/apache/tools/ant/taskdefs/Java.java | 2 +- .../apache/tools/ant/taskdefs/Property.java | 20 ------------------- .../apache/tools/ant/taskdefs/UpToDate.java | 2 +- .../tools/ant/taskdefs/XSLTProcess.java | 12 ++++++++--- .../ant/taskdefs/optional/Native2Ascii.java | 2 +- .../tools/ant/taskdefs/optional/Rpm.java | 3 +-- .../tools/ant/taskdefs/optional/Script.java | 1 - .../ant/taskdefs/optional/ccm/Continuus.java | 2 +- .../optional/clearcase/CCCheckin.java | 2 +- .../optional/clearcase/CCCheckout.java | 2 +- .../optional/clearcase/CCUnCheckout.java | 2 +- .../taskdefs/optional/clearcase/CCUpdate.java | 2 +- .../optional/clearcase/ClearCase.java | 2 +- .../ant/taskdefs/optional/dotnet/CSharp.java | 3 +-- .../ant/taskdefs/optional/dotnet/Ilasm.java | 3 +-- .../taskdefs/optional/dotnet/NetCommand.java | 2 +- .../optional/ejb/BorlandDeploymentTool.java | 5 +++-- .../optional/junit/AggregateTransformer.java | 4 ++-- .../taskdefs/optional/junit/JUnitTask.java | 6 +++--- .../taskdefs/optional/perforce/P4Change.java | 2 +- .../taskdefs/optional/perforce/P4Counter.java | 2 +- .../ant/taskdefs/optional/pvcs/Pvcs.java | 2 +- .../taskdefs/optional/sitraka/CovReport.java | 2 +- .../ant/taskdefs/optional/vss/MSVSS.java | 2 +- .../apache/tools/ant/taskdefs/Available.java | 2 +- .../apache/tools/ant/taskdefs/Checksum.java | 2 +- .../org/apache/tools/ant/taskdefs/Cvs.java | 3 +-- .../apache/tools/ant/taskdefs/ExecTask.java | 3 +-- .../org/apache/tools/ant/taskdefs/Input.java | 2 +- .../org/apache/tools/ant/taskdefs/Java.java | 2 +- .../apache/tools/ant/taskdefs/Property.java | 20 ------------------- .../apache/tools/ant/taskdefs/UpToDate.java | 2 +- .../tools/ant/taskdefs/XSLTProcess.java | 12 ++++++++--- .../ant/taskdefs/optional/Native2Ascii.java | 2 +- .../tools/ant/taskdefs/optional/Rpm.java | 3 +-- .../tools/ant/taskdefs/optional/Script.java | 1 - .../ant/taskdefs/optional/ccm/Continuus.java | 2 +- .../optional/clearcase/CCCheckin.java | 2 +- .../optional/clearcase/CCCheckout.java | 2 +- .../optional/clearcase/CCUnCheckout.java | 2 +- .../taskdefs/optional/clearcase/CCUpdate.java | 2 +- .../optional/clearcase/ClearCase.java | 2 +- .../ant/taskdefs/optional/dotnet/CSharp.java | 3 +-- .../ant/taskdefs/optional/dotnet/Ilasm.java | 3 +-- .../taskdefs/optional/dotnet/NetCommand.java | 2 +- .../optional/ejb/BorlandDeploymentTool.java | 5 +++-- .../optional/junit/AggregateTransformer.java | 4 ++-- .../taskdefs/optional/junit/JUnitTask.java | 6 +++--- .../taskdefs/optional/perforce/P4Change.java | 2 +- .../taskdefs/optional/perforce/P4Counter.java | 2 +- .../ant/taskdefs/optional/pvcs/Pvcs.java | 2 +- .../taskdefs/optional/sitraka/CovReport.java | 2 +- .../ant/taskdefs/optional/vss/MSVSS.java | 2 +- 58 files changed, 80 insertions(+), 118 deletions(-) diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java index 6acc70a13..7b0a0f923 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java @@ -181,7 +181,7 @@ public class Available String lSep = System.getProperty( "line.separator" ); if( null == project.getProperty( property ) ) { - this.project.setProperty( property, value ); + setProperty( property, value ); } //else ignore } diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Checksum.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Checksum.java index b2b3e4b10..38046145f 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Checksum.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Checksum.java @@ -288,7 +288,7 @@ public class Checksum extends MatchingTask implements Condition } else { - project.setProperty( prop, checksum ); + setProperty( prop, checksum ); } } else if( destination instanceof java.io.File ) diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Cvs.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Cvs.java index be8acb91b..3bce941e3 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Cvs.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Cvs.java @@ -291,8 +291,7 @@ public class Cvs extends Task null ); exe.setAntRun( project ); - if( dest == null ) - dest = project.getBaseDir(); + if( dest == null ) dest = getBaseDirectory(); exe.setWorkingDirectory( dest ); exe.setCommandline( toExecute.getCommandline() ); diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java index eceebbebd..79605d8ef 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java @@ -388,8 +388,7 @@ public class ExecTask extends Task throws TaskException { // default directory to the project's base directory - if( dir == null ) - dir = project.getBaseDir(); + if( dir == null ) dir = getBaseDirectory(); // show the command log( cmdl.toString(), Project.MSG_VERBOSE ); diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java index 730c4a470..6a11e80a0 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java @@ -145,7 +145,7 @@ public class Input extends Task { if( project.getProperty( addproperty ) == null ) { - project.setProperty( addproperty, input ); + setProperty( addproperty, input ); } else { diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java index 73a945851..9251698bf 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java @@ -386,7 +386,7 @@ public class Java extends Task if( dir == null ) { - dir = project.getBaseDir(); + dir = getBaseDirectory(); } else if( !dir.exists() || !dir.isDirectory() ) { diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java index 9e91783aa..93b33e45a 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java @@ -39,7 +39,6 @@ public class Property extends Task protected Reference ref; protected String resource; - protected boolean userProperty; protected String value;// set read-only properties public Property() @@ -47,11 +46,6 @@ public class Property extends Task super(); } - protected Property( boolean userProperty ) - { - this.userProperty = userProperty; - } - public void setClasspath( Path classpath ) throws TaskException { @@ -207,21 +201,7 @@ public class Property extends Task protected void addProperty( String n, String v ) { - if( userProperty ) - { - if( project.getUserProperty( n ) == null ) - { - project.setUserProperty( n, v ); - } - else - { - log( "Override ignored for " + n, Project.MSG_VERBOSE ); - } - } - else - { project.setNewProperty( n, v ); - } } protected void loadEnvironment( String prefix ) diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java index c0c63b9c3..21a9910e1 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java @@ -147,7 +147,7 @@ public class UpToDate extends MatchingTask implements Condition boolean upToDate = eval(); if( upToDate ) { - this.project.setProperty( _property, this.getValue() ); + setProperty( _property, this.getValue() ); if( mapperElement == null ) { log( "File \"" + _targetFile.getAbsolutePath() + "\" is up to date.", diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java index c4cd7fc5b..c539945e9 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java @@ -39,8 +39,9 @@ import org.apache.tools.ant.util.FileUtils; * @author Russell Gold * @author Stefan Bodewig */ - -public class XSLTProcess extends MatchingTask implements XSLTLogger +public class XSLTProcess + extends MatchingTask + implements XSLTLogger { private File destDir = null; @@ -67,6 +68,11 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger private String processor; + public void log( String msg ) + { + getLogger().info( msg ); + } + /** * Creates a new XSLTProcess Task. */ @@ -229,7 +235,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger if( baseDir == null ) { - baseDir = resolveFile( "." ); + baseDir = getBaseDirectory(); } liaison = getLiaison(); diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java index 16333ff73..a86fd9e1f 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java @@ -117,7 +117,7 @@ public class Native2Ascii extends MatchingTask // default srcDir to basedir if( srcDir == null ) { - srcDir = resolveFile( "." ); + srcDir = getBaseDirectory(); } // Require destDir diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java index 312aac46c..f51b29184 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java @@ -190,8 +190,7 @@ public class Rpm extends Task Execute exe = new Execute( streamhandler, null ); exe.setAntRun( project ); - if( topDir == null ) - topDir = project.getBaseDir(); + if( topDir == null ) topDir = getBaseDirectory(); exe.setWorkingDirectory( topDir ); exe.setCommandline( toExecute.getCommandline() ); diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java index 76bdf4376..6447af349 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java @@ -87,7 +87,6 @@ public class Script extends Task try { addBeans( project.getProperties() ); - addBeans( project.getUserProperties() ); addBeans( project.getTargets() ); addBeans( project.getReferences() ); diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java index 2c916564a..d588b99a1 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java @@ -113,7 +113,7 @@ public abstract class Continuus extends Task { Execute exe = new Execute( handler ); exe.setAntRun( getProject() ); - exe.setWorkingDirectory( getProject().getBaseDir() ); + exe.setWorkingDirectory( getBaseDirectory() ); exe.setCommandline( cmd.getCommandline() ); return exe.execute(); } diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java index 969ea23d8..3bacc069e 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java @@ -331,7 +331,7 @@ public class CCCheckin extends ClearCase // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { - setViewPath( aProj.getBaseDir().getPath() ); + setViewPath( getBaseDirectory().getPath() ); } // build the command line from what we got. the format is diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java index a3977bba6..9bc00da1c 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java @@ -419,7 +419,7 @@ public class CCCheckout extends ClearCase // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { - setViewPath( aProj.getBaseDir().getPath() ); + setViewPath( getBaseDirectory().getPath() ); } // build the command line from what we got the format is diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java index 693bd5975..440536857 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java @@ -123,7 +123,7 @@ public class CCUnCheckout extends ClearCase // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { - setViewPath( aProj.getBaseDir().getPath() ); + setViewPath( getBaseDirectory().getPath() ); } // build the command line from what we got the format is diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java index 3cdb5f7e9..6f253acb9 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java @@ -332,7 +332,7 @@ public class CCUpdate extends ClearCase // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { - setViewPath( aProj.getBaseDir().getPath() ); + setViewPath( getBaseDirectory().getPath() ); } // build the command line from what we got the format is diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java index 0be5d35cc..f0e5a6fa7 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java @@ -111,7 +111,7 @@ public abstract class ClearCase extends Task Project aProj = getProject(); Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, Project.MSG_WARN ) ); exe.setAntRun( aProj ); - exe.setWorkingDirectory( aProj.getBaseDir() ); + exe.setWorkingDirectory( getBaseDirectory() ); exe.setCommandline( cmd.getCommandline() ); return exe.execute(); } diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java index a3f0ac7ce..32c01cbb1 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java @@ -649,8 +649,7 @@ public class CSharp public void execute() throws TaskException { - if( _srcDir == null ) - _srcDir = resolveFile( "." ); + if( _srcDir == null ) _srcDir = getBaseDirectory(); NetCommand command = new NetCommand( this, "CSC", csc_exe_name ); command.setFailOnError( getFailFailOnError() ); diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java index 9add016bf..ac112216b 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java @@ -306,8 +306,7 @@ public class Ilasm public void execute() throws TaskException { - if( _srcDir == null ) - _srcDir = resolveFile( "." ); + if( _srcDir == null ) _srcDir = getBaseDirectory(); //get dependencies list. DirectoryScanner scanner = super.getDirectoryScanner( _srcDir ); diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java index 9f89cdee5..8fd3d5108 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java @@ -200,7 +200,7 @@ public class NetCommand throws TaskException { // default directory to the project's base directory - File dir = _owner.getProject().getBaseDir(); + File dir = _owner.getBaseDirectory(); ExecuteStreamHandler handler = new LogStreamHandler( _owner, Project.MSG_INFO, Project.MSG_WARN ); _exe = new Execute( handler, null ); diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java index f83bafd6c..a6ef1f47a 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java @@ -416,8 +416,9 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exec */ private void generateClient( File sourceJar ) { - getTask().getProject().addTaskDefinition( "internal_bas_generateclient", - org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient.class ); + //UGLY HACK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + //getTask().getProject().addTaskDefinition( "internal_bas_generateclient", + //org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient.class ); org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient gentask = null; log( "generate client for " + sourceJar, Project.MSG_INFO ); diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java index d0d42a9b9..9cbd5d771 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java @@ -215,12 +215,12 @@ public class AggregateTransformer // set the destination directory relative from the project if needed. if( toDir == null ) { - toDir = FileUtils.newFileUtils().resolveFile( task.getProject().getBaseDir(), "." ); + toDir = FileUtils.newFileUtils().resolveFile( task.getBaseDirectory(), "." ); } else if( !toDir.isAbsolute() ) { toDir = FileUtils.newFileUtils(). - resolveFile( task.getProject().getBaseDir(), toDir.getPath() ); + resolveFile( task.getBaseDirectory(), toDir.getPath() ); } } diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java index 3c26e4211..3352d4b70 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java @@ -524,7 +524,7 @@ public class JUnitTask extends Task //@todo should be moved to the test class instead. if( test.getTodir() == null ) { - test.setTodir( resolveFile( "." ) ); + test.setTodir( getBaseDirectory() ); } if( test.getOutfile() == null ) @@ -568,11 +568,11 @@ public class JUnitTask extends Task + ( wasKilled ? " (timeout)" : "" ), Project.MSG_ERR ); if( errorOccurredHere && test.getErrorProperty() != null ) { - project.setProperty( test.getErrorProperty(), "true" ); + setProperty( test.getErrorProperty(), "true" ); } if( failureOccurredHere && test.getFailureProperty() != null ) { - project.setProperty( test.getFailureProperty(), "true" ); + setProperty( test.getFailureProperty(), "true" ); } } } diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java index f10bd6793..7d78cbf3a 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java @@ -96,7 +96,7 @@ public class P4Change extends P4Base int changenumber = Integer.parseInt( line ); log( "Change Number is " + changenumber, Project.MSG_INFO ); - myProj.setProperty( "p4.change", "" + changenumber ); + setProperty( "p4.change", "" + changenumber ); } else if( util.match( "/error/", line ) ) diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java index 7697036c6..73186ec9d 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java @@ -87,7 +87,7 @@ public class P4Counter extends P4Base try { value = Integer.parseInt( line ); - myProj.setProperty( property, "" + value ); + setProperty( property, "" + value ); } catch( NumberFormatException nfe ) { diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java index 80aca86c7..a2509e8eb 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java @@ -453,7 +453,7 @@ public class Pvcs extends org.apache.tools.ant.Task Project aProj = getProject(); Execute exe = new Execute( out ); exe.setAntRun( aProj ); - exe.setWorkingDirectory( aProj.getBaseDir() ); + exe.setWorkingDirectory( getBaseDirectory() ); exe.setCommandline( cmd.getCommandline() ); return exe.execute(); } diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java index e918874a9..e88192356 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java @@ -291,7 +291,7 @@ public class CovReport extends Task if( sourcePath == null ) { sourcePath = new Path( project ); - sourcePath.createPath().setLocation( resolveFile( "." ) ); + sourcePath.createPath().setLocation( getBaseDirectory() ); } v.addElement( "-sourcepath=" + sourcePath ); diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java index 2d4d1c37d..6bcc77b70 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java @@ -228,7 +228,7 @@ public abstract class MSVSS extends Task } exe.setAntRun( project ); - exe.setWorkingDirectory( project.getBaseDir() ); + exe.setWorkingDirectory( getBaseDirectory() ); exe.setCommandline( cmd.getCommandline() ); return exe.execute(); } diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java index 6acc70a13..7b0a0f923 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java @@ -181,7 +181,7 @@ public class Available String lSep = System.getProperty( "line.separator" ); if( null == project.getProperty( property ) ) { - this.project.setProperty( property, value ); + setProperty( property, value ); } //else ignore } diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Checksum.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Checksum.java index b2b3e4b10..38046145f 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Checksum.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Checksum.java @@ -288,7 +288,7 @@ public class Checksum extends MatchingTask implements Condition } else { - project.setProperty( prop, checksum ); + setProperty( prop, checksum ); } } else if( destination instanceof java.io.File ) diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Cvs.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Cvs.java index be8acb91b..3bce941e3 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Cvs.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Cvs.java @@ -291,8 +291,7 @@ public class Cvs extends Task null ); exe.setAntRun( project ); - if( dest == null ) - dest = project.getBaseDir(); + if( dest == null ) dest = getBaseDirectory(); exe.setWorkingDirectory( dest ); exe.setCommandline( toExecute.getCommandline() ); diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java index eceebbebd..79605d8ef 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java @@ -388,8 +388,7 @@ public class ExecTask extends Task throws TaskException { // default directory to the project's base directory - if( dir == null ) - dir = project.getBaseDir(); + if( dir == null ) dir = getBaseDirectory(); // show the command log( cmdl.toString(), Project.MSG_VERBOSE ); diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Input.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Input.java index 730c4a470..6a11e80a0 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Input.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Input.java @@ -145,7 +145,7 @@ public class Input extends Task { if( project.getProperty( addproperty ) == null ) { - project.setProperty( addproperty, input ); + setProperty( addproperty, input ); } else { diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java index 73a945851..9251698bf 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java @@ -386,7 +386,7 @@ public class Java extends Task if( dir == null ) { - dir = project.getBaseDir(); + dir = getBaseDirectory(); } else if( !dir.exists() || !dir.isDirectory() ) { diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java index 9e91783aa..93b33e45a 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java @@ -39,7 +39,6 @@ public class Property extends Task protected Reference ref; protected String resource; - protected boolean userProperty; protected String value;// set read-only properties public Property() @@ -47,11 +46,6 @@ public class Property extends Task super(); } - protected Property( boolean userProperty ) - { - this.userProperty = userProperty; - } - public void setClasspath( Path classpath ) throws TaskException { @@ -207,21 +201,7 @@ public class Property extends Task protected void addProperty( String n, String v ) { - if( userProperty ) - { - if( project.getUserProperty( n ) == null ) - { - project.setUserProperty( n, v ); - } - else - { - log( "Override ignored for " + n, Project.MSG_VERBOSE ); - } - } - else - { project.setNewProperty( n, v ); - } } protected void loadEnvironment( String prefix ) diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java index c0c63b9c3..21a9910e1 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java @@ -147,7 +147,7 @@ public class UpToDate extends MatchingTask implements Condition boolean upToDate = eval(); if( upToDate ) { - this.project.setProperty( _property, this.getValue() ); + setProperty( _property, this.getValue() ); if( mapperElement == null ) { log( "File \"" + _targetFile.getAbsolutePath() + "\" is up to date.", diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/XSLTProcess.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/XSLTProcess.java index c4cd7fc5b..c539945e9 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/XSLTProcess.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/XSLTProcess.java @@ -39,8 +39,9 @@ import org.apache.tools.ant.util.FileUtils; * @author Russell Gold * @author Stefan Bodewig */ - -public class XSLTProcess extends MatchingTask implements XSLTLogger +public class XSLTProcess + extends MatchingTask + implements XSLTLogger { private File destDir = null; @@ -67,6 +68,11 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger private String processor; + public void log( String msg ) + { + getLogger().info( msg ); + } + /** * Creates a new XSLTProcess Task. */ @@ -229,7 +235,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger if( baseDir == null ) { - baseDir = resolveFile( "." ); + baseDir = getBaseDirectory(); } liaison = getLiaison(); diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java index 16333ff73..a86fd9e1f 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java @@ -117,7 +117,7 @@ public class Native2Ascii extends MatchingTask // default srcDir to basedir if( srcDir == null ) { - srcDir = resolveFile( "." ); + srcDir = getBaseDirectory(); } // Require destDir diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Rpm.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Rpm.java index 312aac46c..f51b29184 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Rpm.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Rpm.java @@ -190,8 +190,7 @@ public class Rpm extends Task Execute exe = new Execute( streamhandler, null ); exe.setAntRun( project ); - if( topDir == null ) - topDir = project.getBaseDir(); + if( topDir == null ) topDir = getBaseDirectory(); exe.setWorkingDirectory( topDir ); exe.setCommandline( toExecute.getCommandline() ); diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Script.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Script.java index 76bdf4376..6447af349 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Script.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Script.java @@ -87,7 +87,6 @@ public class Script extends Task try { addBeans( project.getProperties() ); - addBeans( project.getUserProperties() ); addBeans( project.getTargets() ); addBeans( project.getReferences() ); diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java index 2c916564a..d588b99a1 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java @@ -113,7 +113,7 @@ public abstract class Continuus extends Task { Execute exe = new Execute( handler ); exe.setAntRun( getProject() ); - exe.setWorkingDirectory( getProject().getBaseDir() ); + exe.setWorkingDirectory( getBaseDirectory() ); exe.setCommandline( cmd.getCommandline() ); return exe.execute(); } diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java index 969ea23d8..3bacc069e 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java @@ -331,7 +331,7 @@ public class CCCheckin extends ClearCase // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { - setViewPath( aProj.getBaseDir().getPath() ); + setViewPath( getBaseDirectory().getPath() ); } // build the command line from what we got. the format is diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java index a3977bba6..9bc00da1c 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java @@ -419,7 +419,7 @@ public class CCCheckout extends ClearCase // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { - setViewPath( aProj.getBaseDir().getPath() ); + setViewPath( getBaseDirectory().getPath() ); } // build the command line from what we got the format is diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java index 693bd5975..440536857 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java @@ -123,7 +123,7 @@ public class CCUnCheckout extends ClearCase // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { - setViewPath( aProj.getBaseDir().getPath() ); + setViewPath( getBaseDirectory().getPath() ); } // build the command line from what we got the format is diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java index 3cdb5f7e9..6f253acb9 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java @@ -332,7 +332,7 @@ public class CCUpdate extends ClearCase // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { - setViewPath( aProj.getBaseDir().getPath() ); + setViewPath( getBaseDirectory().getPath() ); } // build the command line from what we got the format is diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java index 0be5d35cc..f0e5a6fa7 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java @@ -111,7 +111,7 @@ public abstract class ClearCase extends Task Project aProj = getProject(); Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, Project.MSG_WARN ) ); exe.setAntRun( aProj ); - exe.setWorkingDirectory( aProj.getBaseDir() ); + exe.setWorkingDirectory( getBaseDirectory() ); exe.setCommandline( cmd.getCommandline() ); return exe.execute(); } diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java index a3f0ac7ce..32c01cbb1 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java @@ -649,8 +649,7 @@ public class CSharp public void execute() throws TaskException { - if( _srcDir == null ) - _srcDir = resolveFile( "." ); + if( _srcDir == null ) _srcDir = getBaseDirectory(); NetCommand command = new NetCommand( this, "CSC", csc_exe_name ); command.setFailOnError( getFailFailOnError() ); diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java index 9add016bf..ac112216b 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java @@ -306,8 +306,7 @@ public class Ilasm public void execute() throws TaskException { - if( _srcDir == null ) - _srcDir = resolveFile( "." ); + if( _srcDir == null ) _srcDir = getBaseDirectory(); //get dependencies list. DirectoryScanner scanner = super.getDirectoryScanner( _srcDir ); diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java index 9f89cdee5..8fd3d5108 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java @@ -200,7 +200,7 @@ public class NetCommand throws TaskException { // default directory to the project's base directory - File dir = _owner.getProject().getBaseDir(); + File dir = _owner.getBaseDirectory(); ExecuteStreamHandler handler = new LogStreamHandler( _owner, Project.MSG_INFO, Project.MSG_WARN ); _exe = new Execute( handler, null ); diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java index f83bafd6c..a6ef1f47a 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java @@ -416,8 +416,9 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exec */ private void generateClient( File sourceJar ) { - getTask().getProject().addTaskDefinition( "internal_bas_generateclient", - org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient.class ); + //UGLY HACK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + //getTask().getProject().addTaskDefinition( "internal_bas_generateclient", + //org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient.class ); org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient gentask = null; log( "generate client for " + sourceJar, Project.MSG_INFO ); diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java index d0d42a9b9..9cbd5d771 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java @@ -215,12 +215,12 @@ public class AggregateTransformer // set the destination directory relative from the project if needed. if( toDir == null ) { - toDir = FileUtils.newFileUtils().resolveFile( task.getProject().getBaseDir(), "." ); + toDir = FileUtils.newFileUtils().resolveFile( task.getBaseDirectory(), "." ); } else if( !toDir.isAbsolute() ) { toDir = FileUtils.newFileUtils(). - resolveFile( task.getProject().getBaseDir(), toDir.getPath() ); + resolveFile( task.getBaseDirectory(), toDir.getPath() ); } } diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java index 3c26e4211..3352d4b70 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java @@ -524,7 +524,7 @@ public class JUnitTask extends Task //@todo should be moved to the test class instead. if( test.getTodir() == null ) { - test.setTodir( resolveFile( "." ) ); + test.setTodir( getBaseDirectory() ); } if( test.getOutfile() == null ) @@ -568,11 +568,11 @@ public class JUnitTask extends Task + ( wasKilled ? " (timeout)" : "" ), Project.MSG_ERR ); if( errorOccurredHere && test.getErrorProperty() != null ) { - project.setProperty( test.getErrorProperty(), "true" ); + setProperty( test.getErrorProperty(), "true" ); } if( failureOccurredHere && test.getFailureProperty() != null ) { - project.setProperty( test.getFailureProperty(), "true" ); + setProperty( test.getFailureProperty(), "true" ); } } } diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java index f10bd6793..7d78cbf3a 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java @@ -96,7 +96,7 @@ public class P4Change extends P4Base int changenumber = Integer.parseInt( line ); log( "Change Number is " + changenumber, Project.MSG_INFO ); - myProj.setProperty( "p4.change", "" + changenumber ); + setProperty( "p4.change", "" + changenumber ); } else if( util.match( "/error/", line ) ) diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java index 7697036c6..73186ec9d 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java @@ -87,7 +87,7 @@ public class P4Counter extends P4Base try { value = Integer.parseInt( line ); - myProj.setProperty( property, "" + value ); + setProperty( property, "" + value ); } catch( NumberFormatException nfe ) { diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java index 80aca86c7..a2509e8eb 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java @@ -453,7 +453,7 @@ public class Pvcs extends org.apache.tools.ant.Task Project aProj = getProject(); Execute exe = new Execute( out ); exe.setAntRun( aProj ); - exe.setWorkingDirectory( aProj.getBaseDir() ); + exe.setWorkingDirectory( getBaseDirectory() ); exe.setCommandline( cmd.getCommandline() ); return exe.execute(); } diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java index e918874a9..e88192356 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java @@ -291,7 +291,7 @@ public class CovReport extends Task if( sourcePath == null ) { sourcePath = new Path( project ); - sourcePath.createPath().setLocation( resolveFile( "." ) ); + sourcePath.createPath().setLocation( getBaseDirectory() ); } v.addElement( "-sourcepath=" + sourcePath ); diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java index 2d4d1c37d..6bcc77b70 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java @@ -228,7 +228,7 @@ public abstract class MSVSS extends Task } exe.setAntRun( project ); - exe.setWorkingDirectory( project.getBaseDir() ); + exe.setWorkingDirectory( getBaseDirectory() ); exe.setCommandline( cmd.getCommandline() ); return exe.execute(); }