Browse Source

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
master
Peter Donald 24 years ago
parent
commit
d47f6c9b67
58 changed files with 80 additions and 118 deletions
  1. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java
  2. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Checksum.java
  3. +1
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Cvs.java
  4. +1
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
  5. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java
  6. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java
  7. +0
    -20
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java
  8. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
  9. +9
    -3
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
  10. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java
  11. +1
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java
  12. +0
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
  13. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java
  14. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java
  15. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java
  16. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java
  17. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java
  18. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
  19. +1
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
  20. +1
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
  21. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java
  22. +3
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
  23. +2
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java
  24. +3
    -3
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  25. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java
  26. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java
  27. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
  28. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java
  29. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
  30. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java
  31. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Checksum.java
  32. +1
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Cvs.java
  33. +1
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java
  34. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Input.java
  35. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java
  36. +0
    -20
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java
  37. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java
  38. +9
    -3
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/XSLTProcess.java
  39. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java
  40. +1
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Rpm.java
  41. +0
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Script.java
  42. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java
  43. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java
  44. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java
  45. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java
  46. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java
  47. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
  48. +1
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
  49. +1
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
  50. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java
  51. +3
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
  52. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java
  53. +3
    -3
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  54. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java
  55. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java
  56. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
  57. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java
  58. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java

+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java View File

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


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Checksum.java View File

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


+ 1
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Cvs.java View File

@@ -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() );


+ 1
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java View File

@@ -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 );



+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java View File

@@ -145,7 +145,7 @@ public class Input extends Task
{
if( project.getProperty( addproperty ) == null )
{
project.setProperty( addproperty, input );
setProperty( addproperty, input );
}
else
{


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java View File

@@ -386,7 +386,7 @@ public class Java extends Task

if( dir == null )
{
dir = project.getBaseDir();
dir = getBaseDirectory();
}
else if( !dir.exists() || !dir.isDirectory() )
{


+ 0
- 20
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java View File

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


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java View File

@@ -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.",


+ 9
- 3
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java View File

@@ -39,8 +39,9 @@ import org.apache.tools.ant.util.FileUtils;
* @author <a href="mailto:russgold@acm.org">Russell Gold</a>
* @author <a href="stefan.bodewig@epost.de">Stefan Bodewig</a>
*/

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();


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java View File

@@ -117,7 +117,7 @@ public class Native2Ascii extends MatchingTask
// default srcDir to basedir
if( srcDir == null )
{
srcDir = resolveFile( "." );
srcDir = getBaseDirectory();
}

// Require destDir


+ 1
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java View File

@@ -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() );


+ 0
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java View File

@@ -87,7 +87,6 @@ public class Script extends Task
try
{
addBeans( project.getProperties() );
addBeans( project.getUserProperties() );
addBeans( project.getTargets() );
addBeans( project.getReferences() );



+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java View File

@@ -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();
}


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java View File

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


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java View File

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


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java View File

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


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java View File

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


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java View File

@@ -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();
}


+ 1
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java View File

@@ -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() );


+ 1
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java View File

@@ -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 );


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java View File

@@ -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 );


+ 3
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java View File

@@ -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 );


+ 2
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java View File

@@ -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() );
}
}



+ 3
- 3
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java View File

@@ -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" );
}
}
}


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java View File

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


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java View File

@@ -87,7 +87,7 @@ public class P4Counter extends P4Base
try
{
value = Integer.parseInt( line );
myProj.setProperty( property, "" + value );
setProperty( property, "" + value );
}
catch( NumberFormatException nfe )
{


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java View File

@@ -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();
}


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java View File

@@ -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 );



+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java View File

@@ -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();
}


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java View File

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


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Checksum.java View File

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


+ 1
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Cvs.java View File

@@ -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() );


+ 1
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java View File

@@ -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 );



+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Input.java View File

@@ -145,7 +145,7 @@ public class Input extends Task
{
if( project.getProperty( addproperty ) == null )
{
project.setProperty( addproperty, input );
setProperty( addproperty, input );
}
else
{


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java View File

@@ -386,7 +386,7 @@ public class Java extends Task

if( dir == null )
{
dir = project.getBaseDir();
dir = getBaseDirectory();
}
else if( !dir.exists() || !dir.isDirectory() )
{


+ 0
- 20
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java View File

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


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java View File

@@ -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.",


+ 9
- 3
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/XSLTProcess.java View File

@@ -39,8 +39,9 @@ import org.apache.tools.ant.util.FileUtils;
* @author <a href="mailto:russgold@acm.org">Russell Gold</a>
* @author <a href="stefan.bodewig@epost.de">Stefan Bodewig</a>
*/

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();


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java View File

@@ -117,7 +117,7 @@ public class Native2Ascii extends MatchingTask
// default srcDir to basedir
if( srcDir == null )
{
srcDir = resolveFile( "." );
srcDir = getBaseDirectory();
}

// Require destDir


+ 1
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Rpm.java View File

@@ -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() );


+ 0
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Script.java View File

@@ -87,7 +87,6 @@ public class Script extends Task
try
{
addBeans( project.getProperties() );
addBeans( project.getUserProperties() );
addBeans( project.getTargets() );
addBeans( project.getReferences() );



+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java View File

@@ -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();
}


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java View File

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


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java View File

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


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java View File

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


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java View File

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


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java View File

@@ -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();
}


+ 1
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java View File

@@ -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() );


+ 1
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java View File

@@ -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 );


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java View File

@@ -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 );


+ 3
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java View File

@@ -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 );


+ 2
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java View File

@@ -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() );
}
}



+ 3
- 3
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java View File

@@ -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" );
}
}
}


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java View File

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


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java View File

@@ -87,7 +87,7 @@ public class P4Counter extends P4Base
try
{
value = Integer.parseInt( line );
myProj.setProperty( property, "" + value );
setProperty( property, "" + value );
}
catch( NumberFormatException nfe )
{


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java View File

@@ -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();
}


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java View File

@@ -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 );



+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java View File

@@ -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();
}


Loading…
Cancel
Save