Browse Source

Update classes so that Path no longer accepts a Project object in its constructor and there is no setProject in ProjectComponent objects

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270424 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
ee5b9c7e25
86 changed files with 256 additions and 288 deletions
  1. +2
    -3
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java
  2. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
  3. +4
    -4
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java
  4. +2
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
  5. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java
  6. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
  7. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
  8. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
  9. +2
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java
  10. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Jvc.java
  11. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java
  12. +0
    -5
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/condition/ConditionBase.java
  13. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/DocletInfo.java
  14. +15
    -15
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java
  15. +2
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
  16. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java
  17. +2
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
  18. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
  19. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
  20. +6
    -5
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
  21. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java
  22. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java
  23. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
  24. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java
  25. +1
    -6
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
  26. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java
  27. +2
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
  28. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java
  29. +2
    -3
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
  30. +2
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
  31. +27
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalToolUtil.java
  32. +2
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalUtil.java
  33. +1
    -13
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJTask.java
  34. +4
    -6
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJToolsServlet.java
  35. +2
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java
  36. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
  37. +2
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
  38. +2
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
  39. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
  40. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/types/CommandlineJava.java
  41. +0
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/types/FileList.java
  42. +0
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java
  43. +26
    -44
      proposal/myrmidon/src/main/org/apache/tools/ant/types/Path.java
  44. +2
    -3
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java
  45. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteOn.java
  46. +4
    -4
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Javac.java
  47. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/PathConvert.java
  48. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java
  49. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/SQLExec.java
  50. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java
  51. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Gcj.java
  52. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Jikes.java
  53. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Jvc.java
  54. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Kjc.java
  55. +0
    -5
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/condition/ConditionBase.java
  56. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/javadoc/DocletInfo.java
  57. +15
    -15
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/IContract.java
  58. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Javah.java
  59. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java
  60. +2
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
  61. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
  62. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
  63. +6
    -5
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
  64. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java
  65. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java
  66. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
  67. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java
  68. +1
    -6
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
  69. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java
  70. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
  71. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java
  72. +2
    -3
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
  73. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
  74. +27
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalToolUtil.java
  75. +2
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalUtil.java
  76. +1
    -13
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJTask.java
  77. +4
    -6
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJToolsServlet.java
  78. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java
  79. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
  80. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
  81. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
  82. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
  83. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/types/CommandlineJava.java
  84. +0
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileList.java
  85. +0
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileSet.java
  86. +26
    -44
      proposal/myrmidon/src/todo/org/apache/tools/ant/types/Path.java

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

@@ -96,7 +96,7 @@ public class Available
{
if( this.classpath == null )
{
this.classpath = new Path( getProject() );
this.classpath = new Path();
}
return this.classpath.createPath();
}
@@ -106,7 +106,7 @@ public class Available
{
if( this.filepath == null )
{
this.filepath = new Path( getProject() );
this.filepath = new Path();
}
return this.filepath.createPath();
}
@@ -129,7 +129,6 @@ public class Available

if( classpath != null )
{
classpath.setProject( getProject() );
this.loader = new AntClassLoader( getProject(), classpath );
}



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

@@ -122,7 +122,7 @@ public class ExecuteOn extends ExecTask
{
throw new TaskException( "Cannot define more than one mapper" );
}
mapperElement = new Mapper( getProject() );
mapperElement = new Mapper();
return mapperElement;
}



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

@@ -658,7 +658,7 @@ public class Javac extends MatchingTask
{
if( bootclasspath == null )
{
bootclasspath = new Path( getProject() );
bootclasspath = new Path();
}
return bootclasspath.createPath();
}
@@ -673,7 +673,7 @@ public class Javac extends MatchingTask
{
if( compileClasspath == null )
{
compileClasspath = new Path( getProject() );
compileClasspath = new Path();
}
return compileClasspath.createPath();
}
@@ -701,7 +701,7 @@ public class Javac extends MatchingTask
{
if( extdirs == null )
{
extdirs = new Path( getProject() );
extdirs = new Path();
}
return extdirs.createPath();
}
@@ -716,7 +716,7 @@ public class Javac extends MatchingTask
{
if( src == null )
{
src = new Path( getProject() );
src = new Path();
}
return src.createPath();
}


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

@@ -146,7 +146,7 @@ public class PathConvert extends Task

if( path == null )
{
path = new Path( getProject() );
path = new Path();
}
return path.createPath();
}
@@ -162,7 +162,7 @@ public class PathConvert extends Task
// If we are a reference, the create a Path from the reference
if( isReference() )
{
path = new Path( getProject() ).createPath();
path = new Path().createPath();

Object obj = refid.getReferencedObject( getProject() );



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

@@ -131,7 +131,7 @@ public class Property extends Task
{
if( this.classpath == null )
{
this.classpath = new Path( getProject() );
this.classpath = new Path();
}
return this.classpath.createPath();
}


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

@@ -369,7 +369,7 @@ public class SQLExec extends Task
{
if( this.classpath == null )
{
this.classpath = new Path( getProject() );
this.classpath = new Path();
}
return this.classpath.createPath();
}


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

@@ -96,7 +96,7 @@ public class UpToDate extends MatchingTask implements Condition
{
throw new TaskException( "Cannot define more than one mapper" );
}
mapperElement = new Mapper( getProject() );
mapperElement = new Mapper();
return mapperElement;
}



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

@@ -44,7 +44,7 @@ public class Gcj extends DefaultCompilerAdapter
throws TaskException
{
Commandline cmd = new Commandline();
Path classpath = new Path( m_project );
Path classpath = new Path();

// gcj doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.


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

@@ -42,7 +42,7 @@ public class Jikes
{
getLogger().debug( "Using jikes compiler" );

Path classpath = new Path( m_project );
Path classpath = new Path();

// Jikes doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.
@@ -77,7 +77,7 @@ public class Jikes
String jikesPath = System.getProperty( "jikes.class.path" );
if( jikesPath != null )
{
classpath.append( new Path( m_project, jikesPath ) );
classpath.append( new Path( jikesPath ) );
}

Commandline cmd = new Commandline();


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

@@ -29,7 +29,7 @@ public class Jvc extends DefaultCompilerAdapter
{
getLogger().debug( "Using jvc compiler" );

Path classpath = new Path( m_project );
Path classpath = new Path();

// jvc doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.


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

@@ -84,7 +84,7 @@ public class Kjc extends DefaultCompilerAdapter
// generate the clsspath
cmd.createArgument().setValue( "-classpath" );

Path cp = new Path( m_project );
Path cp = new Path();

// kjc don't have bootclasspath option.
if( m_bootclasspath != null )


+ 0
- 5
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/condition/ConditionBase.java View File

@@ -199,11 +199,6 @@ public abstract class ConditionBase extends ProjectComponent
{
throw new NoSuchElementException();
}

if( o instanceof ProjectComponent )
{
( (ProjectComponent)o ).setProject( getProject() );
}
return o;
}
}


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

@@ -75,7 +75,7 @@ public class DocletInfo
{
if( m_path == null )
{
m_path = new Path( null );
m_path = new Path();
}
return m_path.createPath();
}


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

@@ -674,7 +674,7 @@ public class IContract extends MatchingTask
{
if( classpath == null )
{
classpath = new Path( getProject() );
classpath = new Path();
}
return classpath;
}
@@ -738,29 +738,29 @@ public class IContract extends MatchingTask

// Create the classpath required to compile the sourcefiles BEFORE instrumentation
Path beforeInstrumentationClasspath = ( (Path)baseClasspath.clone() );
beforeInstrumentationClasspath.append( new Path( getProject(), srcDir.getAbsolutePath() ) );
beforeInstrumentationClasspath.append( new Path( srcDir.getAbsolutePath() ) );

// Create the classpath required to compile the sourcefiles AFTER instrumentation
Path afterInstrumentationClasspath = ( (Path)baseClasspath.clone() );
afterInstrumentationClasspath.append( new Path( getProject(), instrumentDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( getProject(), repositoryDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( getProject(), srcDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( getProject(), buildDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( instrumentDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( repositoryDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( srcDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( buildDir.getAbsolutePath() ) );

// Create the classpath required to automatically compile the repository files
Path repositoryClasspath = ( (Path)baseClasspath.clone() );
repositoryClasspath.append( new Path( getProject(), instrumentDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( getProject(), srcDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( getProject(), repositoryDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( getProject(), buildDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( instrumentDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( srcDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( repositoryDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( buildDir.getAbsolutePath() ) );

// Create the classpath required for iContract itself
Path iContractClasspath = ( (Path)baseClasspath.clone() );
iContractClasspath.append( new Path( getProject(), System.getProperty( "java.home" ) + File.separator + ".." + File.separator + "lib" + File.separator + "tools.jar" ) );
iContractClasspath.append( new Path( getProject(), srcDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( getProject(), repositoryDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( getProject(), instrumentDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( getProject(), buildDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( System.getProperty( "java.home" ) + File.separator + ".." + File.separator + "lib" + File.separator + "tools.jar" ) );
iContractClasspath.append( new Path( srcDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( repositoryDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( instrumentDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( buildDir.getAbsolutePath() ) );

// Create a forked java process
Java iContract = (Java)getProject().createTask( "java" );


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

@@ -206,7 +206,7 @@ public class Javah extends Task
{
if( bootclasspath == null )
{
bootclasspath = new Path( getProject() );
bootclasspath = new Path();
}
return bootclasspath.createPath();
}
@@ -222,7 +222,7 @@ public class Javah extends Task
{
if( classpath == null )
{
classpath = new Path( getProject() );
classpath = new Path();
}
return classpath.createPath();
}


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

@@ -101,7 +101,7 @@ public class Native2Ascii extends MatchingTask
{
throw new TaskException( "Cannot define more than one mapper" );
}
mapper = new Mapper( getProject() );
mapper = new Mapper();
return mapper;
}



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

@@ -197,7 +197,8 @@ public class ReplaceRegExp extends Task
}
else if( file != null )
{
final String message = "The following file is missing: '" + file.getAbsolutePath() + "'";
final String message =
"The following file is missing: '" + file.getAbsolutePath() + "'";
getLogger().error( message );
}



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

@@ -184,7 +184,7 @@ public class Depend extends MatchingTask
{
if( dependClasspath == null )
{
dependClasspath = new Path( getProject() );
dependClasspath = new Path();
}
return dependClasspath.createPath();
}


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

@@ -422,7 +422,7 @@ public class CSharp
{
//demand create pathlist
if( _referenceFiles == null )
_referenceFiles = new Path( this.getProject() );
_referenceFiles = new Path();
_referenceFiles.append( path );
}



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

@@ -274,17 +274,18 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exec
*/
protected void addVendorFiles( Hashtable ejbFiles, String ddPrefix )
{

File borlandDD = new File( getConfig().descriptorDir, ddPrefix + BAS_DD );
final File borlandDD = new File( getConfig().descriptorDir, ddPrefix + BAS_DD );
if( borlandDD.exists() )
{
getLogger().debug( "Borland specific file found " + borlandDD );
final String message = "Borland specific file found " + borlandDD;
getLogger().debug( message );
ejbFiles.put( META_DIR + BAS_DD, borlandDD );
}
else
{
log( "Unable to locate borland deployment descriptor. It was expected to be in " +
borlandDD.getPath(), Project.MSG_WARN );
final String message = "Unable to locate borland deployment descriptor. " +
"It was expected to be in " + borlandDD.getPath();
getLogger().warn( message );
return;
}
}


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

@@ -97,7 +97,7 @@ public class BorlandGenerateClient extends Task
{
if( this.classpath == null )
{
this.classpath = new Path( getProject() );
this.classpath = new Path();
}
return this.classpath.createPath();
}


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

@@ -124,7 +124,7 @@ public class DDCreator extends MatchingTask
ddCreatorTask.setClassname( "org.apache.tools.ant.taskdefs.optional.ejb.DDCreatorHelper" );
Argument arguments = ddCreatorTask.createArg();
arguments.setLine( args );
ddCreatorTask.setClasspath( new Path( getProject(), execClassPath ) );
ddCreatorTask.setClasspath( new Path( execClassPath ) );
if( ddCreatorTask.executeJava() != 0 )
{
throw new TaskException( "Execution of ddcreator helper failed" );


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

@@ -254,7 +254,7 @@ public class EjbJar extends MatchingTask
{
if( config.classpath == null )
{
config.classpath = new Path( getProject() );
config.classpath = new Path();
}
return config.classpath.createPath();
}


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

@@ -183,7 +183,7 @@ public class Ejbc extends MatchingTask

Argument arguments = helperTask.createArg();
arguments.setLine( args );
helperTask.setClasspath( new Path( getProject(), execClassPath ) );
helperTask.setClasspath( new Path( execClassPath ) );
if( helperTask.executeJava() != 0 )
{
throw new TaskException( "Execution of ejbc helper failed" );


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

@@ -198,7 +198,7 @@ public class GenericDeploymentTool
{
if( classpath == null )
{
classpath = new Path( task.getProject() );
classpath = new Path();
}
return classpath.createPath();
}
@@ -672,11 +672,6 @@ public class GenericDeploymentTool
*/
}

protected void log( String message, int level )
{
getTask().log( message, level );
}

/**
* This method checks the timestamp on each file listed in the <code>
* ejbFiles</code> and compares them to the timestamp on the <code>jarFile


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

@@ -176,7 +176,7 @@ public class IPlanetEjbcTask extends Task
{
if( classpath == null )
{
classpath = new Path( getProject() );
classpath = new Path();
}
return classpath.createPath();
}


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

@@ -237,7 +237,7 @@ public class WLRun extends Task
{
if( classpath == null )
{
classpath = new Path( getProject() );
classpath = new Path();
}
return classpath.createPath();
}
@@ -251,7 +251,7 @@ public class WLRun extends Task
{
if( weblogicClasspath == null )
{
weblogicClasspath = new Path( getProject() );
weblogicClasspath = new Path();
}
return weblogicClasspath.createPath();
}


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

@@ -120,7 +120,7 @@ public class WLStop extends Task
{
if( classpath == null )
{
classpath = new Path( getProject() );
classpath = new Path();
}
return classpath.createPath();
}


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

@@ -296,7 +296,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool
{
if( wlClasspath == null )
{
wlClasspath = new Path( getTask().getProject() );
wlClasspath = new Path();
}
return wlClasspath.createPath();
}
@@ -323,7 +323,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool
protected ClassLoader getClassLoaderFromJar( File classjar )
throws IOException, TaskException
{
Path lookupPath = new Path( getTask().getProject() );
Path lookupPath = new Path();
lookupPath.setLocation( classjar );

Path classpath = getCombinedClasspath();
@@ -740,7 +740,6 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool
* @param sourceJar java.io.File representing the source (EJB1.1) jarfile.
* @param destJar java.io.File representing the destination, WebLogic
* jarfile.
* @param publicId Description of Parameter
*/
private void buildWeblogicJar( File sourceJar, File destJar, String publicId )
throws TaskException


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

@@ -376,7 +376,7 @@ public class WebsphereDeploymentTool
{
if( wasClasspath == null )
{
wasClasspath = new Path( getTask().getProject() );
wasClasspath = new Path();
}
return wasClasspath.createPath();
}
@@ -403,7 +403,7 @@ public class WebsphereDeploymentTool
protected ClassLoader getClassLoaderFromJar( File classjar )
throws IOException, TaskException
{
Path lookupPath = new Path( getTask().getProject() );
Path lookupPath = new Path();
lookupPath.setLocation( classjar );
Path classpath = getCombinedClasspath();
if( classpath != null )


+ 27
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalToolUtil.java View File

@@ -0,0 +1,27 @@
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.ant.taskdefs.optional.ide;

/**
* Adaption of VAJLocalUtil to Task context.
*/
class VAJLocalToolUtil
extends VAJLocalUtil
{
private VAJTask m_task;

public VAJLocalToolUtil( final VAJTask task )
{
m_task = task;
}

public void log( final String msg, final int level )
{
m_task.log( msg, level );
}
}

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

@@ -28,7 +28,8 @@ import org.apache.tools.ant.DirectoryScanner;
*
* @author Wolf Siberski, TUI Infotec GmbH
*/
abstract class VAJLocalUtil implements VAJUtil
abstract class VAJLocalUtil
implements VAJUtil
{
// singleton containing the VAJ workspace
private static Workspace workspace;


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

@@ -46,7 +46,7 @@ public class VAJTask extends Task
{
if( remoteServer == null )
{
util = new VAJLocalToolUtil();
util = new VAJLocalToolUtil( this );
}
else
{
@@ -56,16 +56,4 @@ public class VAJTask extends Task
return util;
}

/**
* Adaption of VAJLocalUtil to Task context.
*
* @author RT
*/
class VAJLocalToolUtil extends VAJLocalUtil
{
public void log( String msg, int level )
{
VAJTask.this.log( msg, level );
}
}
}

+ 4
- 6
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJToolsServlet.java View File

@@ -14,16 +14,15 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.avalon.framework.ExceptionUtil;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.util.StringUtils;

/**
* Abstract base class to provide common services for the VAJ tool API servlets
*
* @author Wolf Siberski, based on servlets written by Glenn McAllister
*/
public abstract class VAJToolsServlet extends HttpServlet
public abstract class VAJToolsServlet
extends HttpServlet
{

// constants for servlet param names
public final static String DIR_PARAM = "dir";
public final static String INCLUDE_PARAM = "include";
@@ -197,10 +196,9 @@ public abstract class VAJToolsServlet extends HttpServlet

/**
* Adaptation of VAJUtil for servlet context.
*
* @author RT
*/
class VAJLocalServletUtil extends VAJLocalUtil
class VAJLocalServletUtil
extends VAJLocalUtil
{
public void log( String msg, int level )
{


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

@@ -118,7 +118,7 @@ public class JlinkTask extends MatchingTask
{
if( this.addfiles == null )
{
this.addfiles = new Path( getProject() );
this.addfiles = new Path();
}
return this.addfiles.createPath();
}
@@ -134,7 +134,7 @@ public class JlinkTask extends MatchingTask
{
if( this.mergefiles == null )
{
this.mergefiles = new Path( getProject() );
this.mergefiles = new Path();
}
return this.mergefiles.createPath();
}


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

@@ -314,7 +314,7 @@ public class JspC extends MatchingTask
throws TaskException
{
if( classpath == null )
classpath = new Path( getProject() );
classpath = new Path();
return classpath.createPath();
}



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

@@ -126,7 +126,7 @@ public class WLJspc extends MatchingTask
{
if( compileClasspath == null )
{
compileClasspath = new Path( getProject() );
compileClasspath = new Path();
}
return compileClasspath;
}
@@ -160,7 +160,7 @@ public class WLJspc extends MatchingTask
//use the systemclasspath as well, to include the ant jar
if( compileClasspath == null )
{
compileClasspath = new Path( getProject() );
compileClasspath = new Path();
}

compileClasspath.append( Path.systemClasspath );


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

@@ -158,7 +158,7 @@ public abstract class AbstractMetamataTask extends Task
{
if( classPath == null )
{
classPath = new Path( getProject() );
classPath = new Path();
}
return classPath;
}
@@ -182,7 +182,7 @@ public abstract class AbstractMetamataTask extends Task
{
if( sourcePath == null )
{
sourcePath = new Path( getProject() );
sourcePath = new Path();
}
return sourcePath;
}


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

@@ -187,7 +187,7 @@ public abstract class DefaultRmicAdapter
{
// add dest dir to classpath so that previously compiled and
// untouched classes are on classpath
Path classpath = new Path( attributes.getProject() );
Path classpath = new Path();
classpath.setLocation( attributes.getBase() );

// Combine the build classpath with the system classpath, in an


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

@@ -228,7 +228,7 @@ public class CommandlineJava implements Cloneable
{
if( classpath == null )
{
classpath = new Path( p );
classpath = new Path();
}
return classpath;
}


+ 0
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/types/FileList.java View File

@@ -38,7 +38,6 @@ public class FileList extends DataType
{
this.dir = filelist.dir;
this.filenames = filelist.filenames;
setProject( filelist.getProject() );
}

public void setDir( File dir )


+ 0
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java View File

@@ -50,7 +50,6 @@ public class FileSet
this.additionalPatterns = fileset.additionalPatterns;
this.useDefaultExcludes = fileset.useDefaultExcludes;
this.isCaseSensitive = fileset.isCaseSensitive;
setProject( getProject() );
}

/**


+ 26
- 44
proposal/myrmidon/src/main/org/apache/tools/ant/types/Path.java View File

@@ -62,7 +62,7 @@ public class Path
{
try
{
return new Path( null, System.getProperty( "java.class.path" ) );
return new Path( System.getProperty( "java.class.path" ) );
}
catch( final TaskException te )
{
@@ -73,20 +73,16 @@ public class Path
/**
* Invoked by IntrospectionHelper for <code>setXXX(Path p)</code> attribute
* setters.
*
* @param p Description of Parameter
* @param path Description of Parameter
*/
public Path( Project p, String path )
public Path( final String path )
throws TaskException
{
this( p );
this();
createPathElement().setPath( path );
}

public Path( Project project )
public Path()
{
setProject( project );
elements = new ArrayList();
}

@@ -113,10 +109,6 @@ public class Path

/**
* Splits a PATH (with : or ; as separators) into its parts.
*
* @param project Description of Parameter
* @param source Description of Parameter
* @return Description of the Returned Value
*/
public String[] translatePath( Project project, String source )
{
@@ -298,7 +290,7 @@ public class Path
String extProp = System.getProperty( "java.ext.dirs" );
if( extProp != null )
{
extdirs = new Path( getProject(), extProp );
extdirs = new Path( extProp );
}
else
{
@@ -363,38 +355,32 @@ public class Path
}
else if( Project.getJavaVersion() == Project.JAVA_1_1 )
{
addExisting( new Path( null,
System.getProperty( "java.home" )
+ File.separator + "lib"
+ File.separator
+ "classes.zip" ) );
final String classes = System.getProperty( "java.home" ) +
File.separator + "lib" + File.separator + "classes.zip";
addExisting( new Path( classes ) );
}
else
{
// JDK > 1.1 seems to set java.home to the JRE directory.
addExisting( new Path( null,
System.getProperty( "java.home" )
+ File.separator + "lib"
+ File.separator + "rt.jar" ) );
final String rt = System.getProperty( "java.home" ) +
File.separator + "lib" + File.separator + "rt.jar";
addExisting( new Path( rt ) );
// Just keep the old version as well and let addExisting
// sort it out.
addExisting( new Path( null,
System.getProperty( "java.home" )
+ File.separator + "jre"
+ File.separator + "lib"
+ File.separator + "rt.jar" ) );
final String rt2 = System.getProperty( "java.home" ) +
File.separator + "jre" + File.separator + "lib" +
File.separator + "rt.jar";
addExisting( new Path( rt2 ) );

// Added for MacOS X
addExisting( new Path( null,
System.getProperty( "java.home" )
+ File.separator + ".."
+ File.separator + "Classes"
+ File.separator + "classes.jar" ) );
addExisting( new Path( null,
System.getProperty( "java.home" )
+ File.separator + ".."
+ File.separator + "Classes"
+ File.separator + "ui.jar" ) );
final String classes = System.getProperty( "java.home" ) +
File.separator + ".." + File.separator + "Classes" +
File.separator + "classes.jar";
addExisting( new Path( classes ) );
final String ui = System.getProperty( "java.home" ) +
File.separator + ".." + File.separator + "Classes" +
File.separator + "ui.jar";
addExisting( new Path( ui ) );
}
}

@@ -427,7 +413,7 @@ public class Path
{
try
{
Path p = new Path( getProject() );
Path p = new Path();
p.append( this );
return p;
}
@@ -461,7 +447,7 @@ public class Path
public Path concatSystemClasspath( String defValue )
throws TaskException
{
Path result = new Path( getProject() );
Path result = new Path();

String order = defValue;
if( getProject() != null )
@@ -521,7 +507,7 @@ public class Path
{
throw noChildrenAllowed();
}
Path p = new Path( getProject() );
Path p = new Path();
elements.add( p );
checked = false;
return p;
@@ -597,10 +583,6 @@ public class Path
else if( o instanceof Path )
{
Path p = (Path)o;
if( p.getProject() == null )
{
p.setProject( getProject() );
}
String[] parts = p.list();
for( int j = 0; j < parts.length; j++ )
{


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

@@ -96,7 +96,7 @@ public class Available
{
if( this.classpath == null )
{
this.classpath = new Path( getProject() );
this.classpath = new Path();
}
return this.classpath.createPath();
}
@@ -106,7 +106,7 @@ public class Available
{
if( this.filepath == null )
{
this.filepath = new Path( getProject() );
this.filepath = new Path();
}
return this.filepath.createPath();
}
@@ -129,7 +129,6 @@ public class Available

if( classpath != null )
{
classpath.setProject( getProject() );
this.loader = new AntClassLoader( getProject(), classpath );
}



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

@@ -122,7 +122,7 @@ public class ExecuteOn extends ExecTask
{
throw new TaskException( "Cannot define more than one mapper" );
}
mapperElement = new Mapper( getProject() );
mapperElement = new Mapper();
return mapperElement;
}



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

@@ -658,7 +658,7 @@ public class Javac extends MatchingTask
{
if( bootclasspath == null )
{
bootclasspath = new Path( getProject() );
bootclasspath = new Path();
}
return bootclasspath.createPath();
}
@@ -673,7 +673,7 @@ public class Javac extends MatchingTask
{
if( compileClasspath == null )
{
compileClasspath = new Path( getProject() );
compileClasspath = new Path();
}
return compileClasspath.createPath();
}
@@ -701,7 +701,7 @@ public class Javac extends MatchingTask
{
if( extdirs == null )
{
extdirs = new Path( getProject() );
extdirs = new Path();
}
return extdirs.createPath();
}
@@ -716,7 +716,7 @@ public class Javac extends MatchingTask
{
if( src == null )
{
src = new Path( getProject() );
src = new Path();
}
return src.createPath();
}


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

@@ -146,7 +146,7 @@ public class PathConvert extends Task

if( path == null )
{
path = new Path( getProject() );
path = new Path();
}
return path.createPath();
}
@@ -162,7 +162,7 @@ public class PathConvert extends Task
// If we are a reference, the create a Path from the reference
if( isReference() )
{
path = new Path( getProject() ).createPath();
path = new Path().createPath();

Object obj = refid.getReferencedObject( getProject() );



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

@@ -131,7 +131,7 @@ public class Property extends Task
{
if( this.classpath == null )
{
this.classpath = new Path( getProject() );
this.classpath = new Path();
}
return this.classpath.createPath();
}


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

@@ -369,7 +369,7 @@ public class SQLExec extends Task
{
if( this.classpath == null )
{
this.classpath = new Path( getProject() );
this.classpath = new Path();
}
return this.classpath.createPath();
}


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

@@ -96,7 +96,7 @@ public class UpToDate extends MatchingTask implements Condition
{
throw new TaskException( "Cannot define more than one mapper" );
}
mapperElement = new Mapper( getProject() );
mapperElement = new Mapper();
return mapperElement;
}



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

@@ -44,7 +44,7 @@ public class Gcj extends DefaultCompilerAdapter
throws TaskException
{
Commandline cmd = new Commandline();
Path classpath = new Path( m_project );
Path classpath = new Path();

// gcj doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.


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

@@ -42,7 +42,7 @@ public class Jikes
{
getLogger().debug( "Using jikes compiler" );

Path classpath = new Path( m_project );
Path classpath = new Path();

// Jikes doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.
@@ -77,7 +77,7 @@ public class Jikes
String jikesPath = System.getProperty( "jikes.class.path" );
if( jikesPath != null )
{
classpath.append( new Path( m_project, jikesPath ) );
classpath.append( new Path( jikesPath ) );
}

Commandline cmd = new Commandline();


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

@@ -29,7 +29,7 @@ public class Jvc extends DefaultCompilerAdapter
{
getLogger().debug( "Using jvc compiler" );

Path classpath = new Path( m_project );
Path classpath = new Path();

// jvc doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.


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

@@ -84,7 +84,7 @@ public class Kjc extends DefaultCompilerAdapter
// generate the clsspath
cmd.createArgument().setValue( "-classpath" );

Path cp = new Path( m_project );
Path cp = new Path();

// kjc don't have bootclasspath option.
if( m_bootclasspath != null )


+ 0
- 5
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/condition/ConditionBase.java View File

@@ -199,11 +199,6 @@ public abstract class ConditionBase extends ProjectComponent
{
throw new NoSuchElementException();
}

if( o instanceof ProjectComponent )
{
( (ProjectComponent)o ).setProject( getProject() );
}
return o;
}
}


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

@@ -75,7 +75,7 @@ public class DocletInfo
{
if( m_path == null )
{
m_path = new Path( null );
m_path = new Path();
}
return m_path.createPath();
}


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

@@ -674,7 +674,7 @@ public class IContract extends MatchingTask
{
if( classpath == null )
{
classpath = new Path( getProject() );
classpath = new Path();
}
return classpath;
}
@@ -738,29 +738,29 @@ public class IContract extends MatchingTask

// Create the classpath required to compile the sourcefiles BEFORE instrumentation
Path beforeInstrumentationClasspath = ( (Path)baseClasspath.clone() );
beforeInstrumentationClasspath.append( new Path( getProject(), srcDir.getAbsolutePath() ) );
beforeInstrumentationClasspath.append( new Path( srcDir.getAbsolutePath() ) );

// Create the classpath required to compile the sourcefiles AFTER instrumentation
Path afterInstrumentationClasspath = ( (Path)baseClasspath.clone() );
afterInstrumentationClasspath.append( new Path( getProject(), instrumentDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( getProject(), repositoryDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( getProject(), srcDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( getProject(), buildDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( instrumentDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( repositoryDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( srcDir.getAbsolutePath() ) );
afterInstrumentationClasspath.append( new Path( buildDir.getAbsolutePath() ) );

// Create the classpath required to automatically compile the repository files
Path repositoryClasspath = ( (Path)baseClasspath.clone() );
repositoryClasspath.append( new Path( getProject(), instrumentDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( getProject(), srcDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( getProject(), repositoryDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( getProject(), buildDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( instrumentDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( srcDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( repositoryDir.getAbsolutePath() ) );
repositoryClasspath.append( new Path( buildDir.getAbsolutePath() ) );

// Create the classpath required for iContract itself
Path iContractClasspath = ( (Path)baseClasspath.clone() );
iContractClasspath.append( new Path( getProject(), System.getProperty( "java.home" ) + File.separator + ".." + File.separator + "lib" + File.separator + "tools.jar" ) );
iContractClasspath.append( new Path( getProject(), srcDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( getProject(), repositoryDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( getProject(), instrumentDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( getProject(), buildDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( System.getProperty( "java.home" ) + File.separator + ".." + File.separator + "lib" + File.separator + "tools.jar" ) );
iContractClasspath.append( new Path( srcDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( repositoryDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( instrumentDir.getAbsolutePath() ) );
iContractClasspath.append( new Path( buildDir.getAbsolutePath() ) );

// Create a forked java process
Java iContract = (Java)getProject().createTask( "java" );


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

@@ -206,7 +206,7 @@ public class Javah extends Task
{
if( bootclasspath == null )
{
bootclasspath = new Path( getProject() );
bootclasspath = new Path();
}
return bootclasspath.createPath();
}
@@ -222,7 +222,7 @@ public class Javah extends Task
{
if( classpath == null )
{
classpath = new Path( getProject() );
classpath = new Path();
}
return classpath.createPath();
}


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

@@ -101,7 +101,7 @@ public class Native2Ascii extends MatchingTask
{
throw new TaskException( "Cannot define more than one mapper" );
}
mapper = new Mapper( getProject() );
mapper = new Mapper();
return mapper;
}



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

@@ -197,7 +197,8 @@ public class ReplaceRegExp extends Task
}
else if( file != null )
{
final String message = "The following file is missing: '" + file.getAbsolutePath() + "'";
final String message =
"The following file is missing: '" + file.getAbsolutePath() + "'";
getLogger().error( message );
}



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

@@ -184,7 +184,7 @@ public class Depend extends MatchingTask
{
if( dependClasspath == null )
{
dependClasspath = new Path( getProject() );
dependClasspath = new Path();
}
return dependClasspath.createPath();
}


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

@@ -422,7 +422,7 @@ public class CSharp
{
//demand create pathlist
if( _referenceFiles == null )
_referenceFiles = new Path( this.getProject() );
_referenceFiles = new Path();
_referenceFiles.append( path );
}



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

@@ -274,17 +274,18 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exec
*/
protected void addVendorFiles( Hashtable ejbFiles, String ddPrefix )
{

File borlandDD = new File( getConfig().descriptorDir, ddPrefix + BAS_DD );
final File borlandDD = new File( getConfig().descriptorDir, ddPrefix + BAS_DD );
if( borlandDD.exists() )
{
getLogger().debug( "Borland specific file found " + borlandDD );
final String message = "Borland specific file found " + borlandDD;
getLogger().debug( message );
ejbFiles.put( META_DIR + BAS_DD, borlandDD );
}
else
{
log( "Unable to locate borland deployment descriptor. It was expected to be in " +
borlandDD.getPath(), Project.MSG_WARN );
final String message = "Unable to locate borland deployment descriptor. " +
"It was expected to be in " + borlandDD.getPath();
getLogger().warn( message );
return;
}
}


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

@@ -97,7 +97,7 @@ public class BorlandGenerateClient extends Task
{
if( this.classpath == null )
{
this.classpath = new Path( getProject() );
this.classpath = new Path();
}
return this.classpath.createPath();
}


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

@@ -124,7 +124,7 @@ public class DDCreator extends MatchingTask
ddCreatorTask.setClassname( "org.apache.tools.ant.taskdefs.optional.ejb.DDCreatorHelper" );
Argument arguments = ddCreatorTask.createArg();
arguments.setLine( args );
ddCreatorTask.setClasspath( new Path( getProject(), execClassPath ) );
ddCreatorTask.setClasspath( new Path( execClassPath ) );
if( ddCreatorTask.executeJava() != 0 )
{
throw new TaskException( "Execution of ddcreator helper failed" );


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

@@ -254,7 +254,7 @@ public class EjbJar extends MatchingTask
{
if( config.classpath == null )
{
config.classpath = new Path( getProject() );
config.classpath = new Path();
}
return config.classpath.createPath();
}


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

@@ -183,7 +183,7 @@ public class Ejbc extends MatchingTask

Argument arguments = helperTask.createArg();
arguments.setLine( args );
helperTask.setClasspath( new Path( getProject(), execClassPath ) );
helperTask.setClasspath( new Path( execClassPath ) );
if( helperTask.executeJava() != 0 )
{
throw new TaskException( "Execution of ejbc helper failed" );


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

@@ -198,7 +198,7 @@ public class GenericDeploymentTool
{
if( classpath == null )
{
classpath = new Path( task.getProject() );
classpath = new Path();
}
return classpath.createPath();
}
@@ -672,11 +672,6 @@ public class GenericDeploymentTool
*/
}

protected void log( String message, int level )
{
getTask().log( message, level );
}

/**
* This method checks the timestamp on each file listed in the <code>
* ejbFiles</code> and compares them to the timestamp on the <code>jarFile


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

@@ -176,7 +176,7 @@ public class IPlanetEjbcTask extends Task
{
if( classpath == null )
{
classpath = new Path( getProject() );
classpath = new Path();
}
return classpath.createPath();
}


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

@@ -237,7 +237,7 @@ public class WLRun extends Task
{
if( classpath == null )
{
classpath = new Path( getProject() );
classpath = new Path();
}
return classpath.createPath();
}
@@ -251,7 +251,7 @@ public class WLRun extends Task
{
if( weblogicClasspath == null )
{
weblogicClasspath = new Path( getProject() );
weblogicClasspath = new Path();
}
return weblogicClasspath.createPath();
}


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

@@ -120,7 +120,7 @@ public class WLStop extends Task
{
if( classpath == null )
{
classpath = new Path( getProject() );
classpath = new Path();
}
return classpath.createPath();
}


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

@@ -296,7 +296,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool
{
if( wlClasspath == null )
{
wlClasspath = new Path( getTask().getProject() );
wlClasspath = new Path();
}
return wlClasspath.createPath();
}
@@ -323,7 +323,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool
protected ClassLoader getClassLoaderFromJar( File classjar )
throws IOException, TaskException
{
Path lookupPath = new Path( getTask().getProject() );
Path lookupPath = new Path();
lookupPath.setLocation( classjar );

Path classpath = getCombinedClasspath();
@@ -740,7 +740,6 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool
* @param sourceJar java.io.File representing the source (EJB1.1) jarfile.
* @param destJar java.io.File representing the destination, WebLogic
* jarfile.
* @param publicId Description of Parameter
*/
private void buildWeblogicJar( File sourceJar, File destJar, String publicId )
throws TaskException


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

@@ -376,7 +376,7 @@ public class WebsphereDeploymentTool
{
if( wasClasspath == null )
{
wasClasspath = new Path( getTask().getProject() );
wasClasspath = new Path();
}
return wasClasspath.createPath();
}
@@ -403,7 +403,7 @@ public class WebsphereDeploymentTool
protected ClassLoader getClassLoaderFromJar( File classjar )
throws IOException, TaskException
{
Path lookupPath = new Path( getTask().getProject() );
Path lookupPath = new Path();
lookupPath.setLocation( classjar );
Path classpath = getCombinedClasspath();
if( classpath != null )


+ 27
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalToolUtil.java View File

@@ -0,0 +1,27 @@
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.ant.taskdefs.optional.ide;

/**
* Adaption of VAJLocalUtil to Task context.
*/
class VAJLocalToolUtil
extends VAJLocalUtil
{
private VAJTask m_task;

public VAJLocalToolUtil( final VAJTask task )
{
m_task = task;
}

public void log( final String msg, final int level )
{
m_task.log( msg, level );
}
}

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

@@ -28,7 +28,8 @@ import org.apache.tools.ant.DirectoryScanner;
*
* @author Wolf Siberski, TUI Infotec GmbH
*/
abstract class VAJLocalUtil implements VAJUtil
abstract class VAJLocalUtil
implements VAJUtil
{
// singleton containing the VAJ workspace
private static Workspace workspace;


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

@@ -46,7 +46,7 @@ public class VAJTask extends Task
{
if( remoteServer == null )
{
util = new VAJLocalToolUtil();
util = new VAJLocalToolUtil( this );
}
else
{
@@ -56,16 +56,4 @@ public class VAJTask extends Task
return util;
}

/**
* Adaption of VAJLocalUtil to Task context.
*
* @author RT
*/
class VAJLocalToolUtil extends VAJLocalUtil
{
public void log( String msg, int level )
{
VAJTask.this.log( msg, level );
}
}
}

+ 4
- 6
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJToolsServlet.java View File

@@ -14,16 +14,15 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.avalon.framework.ExceptionUtil;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.util.StringUtils;

/**
* Abstract base class to provide common services for the VAJ tool API servlets
*
* @author Wolf Siberski, based on servlets written by Glenn McAllister
*/
public abstract class VAJToolsServlet extends HttpServlet
public abstract class VAJToolsServlet
extends HttpServlet
{

// constants for servlet param names
public final static String DIR_PARAM = "dir";
public final static String INCLUDE_PARAM = "include";
@@ -197,10 +196,9 @@ public abstract class VAJToolsServlet extends HttpServlet

/**
* Adaptation of VAJUtil for servlet context.
*
* @author RT
*/
class VAJLocalServletUtil extends VAJLocalUtil
class VAJLocalServletUtil
extends VAJLocalUtil
{
public void log( String msg, int level )
{


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

@@ -118,7 +118,7 @@ public class JlinkTask extends MatchingTask
{
if( this.addfiles == null )
{
this.addfiles = new Path( getProject() );
this.addfiles = new Path();
}
return this.addfiles.createPath();
}
@@ -134,7 +134,7 @@ public class JlinkTask extends MatchingTask
{
if( this.mergefiles == null )
{
this.mergefiles = new Path( getProject() );
this.mergefiles = new Path();
}
return this.mergefiles.createPath();
}


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

@@ -314,7 +314,7 @@ public class JspC extends MatchingTask
throws TaskException
{
if( classpath == null )
classpath = new Path( getProject() );
classpath = new Path();
return classpath.createPath();
}



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

@@ -126,7 +126,7 @@ public class WLJspc extends MatchingTask
{
if( compileClasspath == null )
{
compileClasspath = new Path( getProject() );
compileClasspath = new Path();
}
return compileClasspath;
}
@@ -160,7 +160,7 @@ public class WLJspc extends MatchingTask
//use the systemclasspath as well, to include the ant jar
if( compileClasspath == null )
{
compileClasspath = new Path( getProject() );
compileClasspath = new Path();
}

compileClasspath.append( Path.systemClasspath );


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

@@ -158,7 +158,7 @@ public abstract class AbstractMetamataTask extends Task
{
if( classPath == null )
{
classPath = new Path( getProject() );
classPath = new Path();
}
return classPath;
}
@@ -182,7 +182,7 @@ public abstract class AbstractMetamataTask extends Task
{
if( sourcePath == null )
{
sourcePath = new Path( getProject() );
sourcePath = new Path();
}
return sourcePath;
}


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

@@ -187,7 +187,7 @@ public abstract class DefaultRmicAdapter
{
// add dest dir to classpath so that previously compiled and
// untouched classes are on classpath
Path classpath = new Path( attributes.getProject() );
Path classpath = new Path();
classpath.setLocation( attributes.getBase() );

// Combine the build classpath with the system classpath, in an


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

@@ -228,7 +228,7 @@ public class CommandlineJava implements Cloneable
{
if( classpath == null )
{
classpath = new Path( p );
classpath = new Path();
}
return classpath;
}


+ 0
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileList.java View File

@@ -38,7 +38,6 @@ public class FileList extends DataType
{
this.dir = filelist.dir;
this.filenames = filelist.filenames;
setProject( filelist.getProject() );
}

public void setDir( File dir )


+ 0
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileSet.java View File

@@ -50,7 +50,6 @@ public class FileSet
this.additionalPatterns = fileset.additionalPatterns;
this.useDefaultExcludes = fileset.useDefaultExcludes;
this.isCaseSensitive = fileset.isCaseSensitive;
setProject( getProject() );
}

/**


+ 26
- 44
proposal/myrmidon/src/todo/org/apache/tools/ant/types/Path.java View File

@@ -62,7 +62,7 @@ public class Path
{
try
{
return new Path( null, System.getProperty( "java.class.path" ) );
return new Path( System.getProperty( "java.class.path" ) );
}
catch( final TaskException te )
{
@@ -73,20 +73,16 @@ public class Path
/**
* Invoked by IntrospectionHelper for <code>setXXX(Path p)</code> attribute
* setters.
*
* @param p Description of Parameter
* @param path Description of Parameter
*/
public Path( Project p, String path )
public Path( final String path )
throws TaskException
{
this( p );
this();
createPathElement().setPath( path );
}

public Path( Project project )
public Path()
{
setProject( project );
elements = new ArrayList();
}

@@ -113,10 +109,6 @@ public class Path

/**
* Splits a PATH (with : or ; as separators) into its parts.
*
* @param project Description of Parameter
* @param source Description of Parameter
* @return Description of the Returned Value
*/
public String[] translatePath( Project project, String source )
{
@@ -298,7 +290,7 @@ public class Path
String extProp = System.getProperty( "java.ext.dirs" );
if( extProp != null )
{
extdirs = new Path( getProject(), extProp );
extdirs = new Path( extProp );
}
else
{
@@ -363,38 +355,32 @@ public class Path
}
else if( Project.getJavaVersion() == Project.JAVA_1_1 )
{
addExisting( new Path( null,
System.getProperty( "java.home" )
+ File.separator + "lib"
+ File.separator
+ "classes.zip" ) );
final String classes = System.getProperty( "java.home" ) +
File.separator + "lib" + File.separator + "classes.zip";
addExisting( new Path( classes ) );
}
else
{
// JDK > 1.1 seems to set java.home to the JRE directory.
addExisting( new Path( null,
System.getProperty( "java.home" )
+ File.separator + "lib"
+ File.separator + "rt.jar" ) );
final String rt = System.getProperty( "java.home" ) +
File.separator + "lib" + File.separator + "rt.jar";
addExisting( new Path( rt ) );
// Just keep the old version as well and let addExisting
// sort it out.
addExisting( new Path( null,
System.getProperty( "java.home" )
+ File.separator + "jre"
+ File.separator + "lib"
+ File.separator + "rt.jar" ) );
final String rt2 = System.getProperty( "java.home" ) +
File.separator + "jre" + File.separator + "lib" +
File.separator + "rt.jar";
addExisting( new Path( rt2 ) );

// Added for MacOS X
addExisting( new Path( null,
System.getProperty( "java.home" )
+ File.separator + ".."
+ File.separator + "Classes"
+ File.separator + "classes.jar" ) );
addExisting( new Path( null,
System.getProperty( "java.home" )
+ File.separator + ".."
+ File.separator + "Classes"
+ File.separator + "ui.jar" ) );
final String classes = System.getProperty( "java.home" ) +
File.separator + ".." + File.separator + "Classes" +
File.separator + "classes.jar";
addExisting( new Path( classes ) );
final String ui = System.getProperty( "java.home" ) +
File.separator + ".." + File.separator + "Classes" +
File.separator + "ui.jar";
addExisting( new Path( ui ) );
}
}

@@ -427,7 +413,7 @@ public class Path
{
try
{
Path p = new Path( getProject() );
Path p = new Path();
p.append( this );
return p;
}
@@ -461,7 +447,7 @@ public class Path
public Path concatSystemClasspath( String defValue )
throws TaskException
{
Path result = new Path( getProject() );
Path result = new Path();

String order = defValue;
if( getProject() != null )
@@ -521,7 +507,7 @@ public class Path
{
throw noChildrenAllowed();
}
Path p = new Path( getProject() );
Path p = new Path();
elements.add( p );
checked = false;
return p;
@@ -597,10 +583,6 @@ public class Path
else if( o instanceof Path )
{
Path p = (Path)o;
if( p.getProject() == null )
{
p.setProject( getProject() );
}
String[] parts = p.list();
for( int j = 0; j < parts.length; j++ )
{


Loading…
Cancel
Save