Browse Source

Moved a bunch of classes to framework.nativelib:

- Argument
  - ArgumentList
  - Commandline
  - EnvironmentData
  - EnvironmentVariable
  - Execute
  - LoggingExecOutputHandler


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272278 13f79535-47bb-0310-9956-ffa450edef68
master
adammurdoch 23 years ago
parent
commit
17f7feb790
51 changed files with 214 additions and 262 deletions
  1. +1
    -1
      proposal/myrmidon/src/java/org/apache/antlib/build/Patch.java
  2. +2
    -2
      proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLog.java
  3. +2
    -2
      proposal/myrmidon/src/java/org/apache/antlib/cvslib/Cvs.java
  4. +2
    -2
      proposal/myrmidon/src/java/org/apache/antlib/dotnet/CSharp.java
  5. +2
    -2
      proposal/myrmidon/src/java/org/apache/antlib/dotnet/Ilasm.java
  6. +1
    -1
      proposal/myrmidon/src/java/org/apache/antlib/java/ExternalCompilerAdaptor.java
  7. +2
    -2
      proposal/myrmidon/src/java/org/apache/antlib/java/JavaTask.java
  8. +1
    -1
      proposal/myrmidon/src/java/org/apache/antlib/java/JavacAdaptor.java
  9. +1
    -1
      proposal/myrmidon/src/java/org/apache/antlib/java/JikesAdaptor.java
  10. +4
    -4
      proposal/myrmidon/src/java/org/apache/antlib/nativelib/Exec.java
  11. +2
    -2
      proposal/myrmidon/src/java/org/apache/antlib/security/GenerateKey.java
  12. +1
    -1
      proposal/myrmidon/src/java/org/apache/antlib/security/SignJar.java
  13. +3
    -3
      proposal/myrmidon/src/java/org/apache/myrmidon/framework/java/ExecuteJava.java
  14. +1
    -1
      proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/Argument.java
  15. +10
    -1
      proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/ArgumentList.java
  16. +13
    -1
      proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/Commandline.java
  17. +1
    -2
      proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/EnvironmentData.java
  18. +1
    -1
      proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/EnvironmentVariable.java
  19. +1
    -13
      proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/Execute.java
  20. +3
    -3
      proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/LoggingExecOutputHandler.java
  21. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/ANTLR.java
  22. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Cab.java
  23. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Javah.java
  24. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Rpm.java
  25. +3
    -3
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/DefaultCompilerAdapter.java
  26. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Gcj.java
  27. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/ImplementationSpecificArgument.java
  28. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Javac12.java
  29. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Javac13.java
  30. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/JavacExternal.java
  31. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Jikes.java
  32. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Jvc.java
  33. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Kjc.java
  34. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Sj.java
  35. +51
    -74
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc/Javadoc.java
  36. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/compilers/DefaultCompilerAdapter.java
  37. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/compilers/JasperC.java
  38. +5
    -5
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/junit/JUnitTask.java
  39. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/DefaultRmicAdapter.java
  40. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/KaffeRmic.java
  41. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/SunRmic.java
  42. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/WLRmic.java
  43. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/stylebook/StyleBook.java
  44. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/text/Native2Ascii.java
  45. +4
    -7
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSS.java
  46. +13
    -13
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSCHECKIN.java
  47. +12
    -12
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSCHECKOUT.java
  48. +14
    -15
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSGET.java
  49. +14
    -44
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSHISTORY.java
  50. +12
    -12
      proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSLABEL.java
  51. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/todo/types/SysProperties.java

+ 1
- 1
proposal/myrmidon/src/java/org/apache/antlib/build/Patch.java View File

@@ -12,7 +12,7 @@ import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.myrmidon.framework.nativelib.Execute;

/**
* Task as a layer on top of patch. Patch applies a diff file to an original.


+ 2
- 2
proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLog.java View File

@@ -25,9 +25,9 @@ import org.apache.avalon.excalibur.i18n.Resources;
import org.apache.avalon.excalibur.io.IOUtil;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.myrmidon.framework.FileSet;
import org.apache.tools.todo.types.Commandline;
import org.apache.myrmidon.framework.nativelib.Commandline;

/**
* Change log task.


+ 2
- 2
proposal/myrmidon/src/java/org/apache/antlib/cvslib/Cvs.java View File

@@ -11,8 +11,8 @@ import java.io.File;
import java.util.Properties;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.tools.todo.types.Commandline;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.tools.todo.util.FileUtils;

/**


+ 2
- 2
proposal/myrmidon/src/java/org/apache/antlib/dotnet/CSharp.java View File

@@ -9,10 +9,10 @@ package org.apache.antlib.dotnet;

import java.io.File;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.tools.todo.taskdefs.MatchingTask;
import org.apache.tools.todo.types.DirectoryScanner;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.myrmidon.framework.file.Path;

/**


+ 2
- 2
proposal/myrmidon/src/java/org/apache/antlib/dotnet/Ilasm.java View File

@@ -9,9 +9,9 @@ package org.apache.antlib.dotnet;

import java.io.File;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.tools.todo.taskdefs.MatchingTask;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.tools.todo.types.DirectoryScanner;

/**


+ 1
- 1
proposal/myrmidon/src/java/org/apache/antlib/java/ExternalCompilerAdaptor.java View File

@@ -12,7 +12,7 @@ import java.io.FileWriter;
import java.io.PrintWriter;
import java.io.IOException;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.myrmidon.framework.nativelib.Execute;

/**
* An abstract compiler adaptor, that forks an external compiler.


+ 2
- 2
proposal/myrmidon/src/java/org/apache/antlib/java/JavaTask.java View File

@@ -11,8 +11,8 @@ import java.io.File;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.java.ExecuteJava;
import org.apache.tools.todo.types.Argument;
import org.apache.tools.todo.types.EnvironmentVariable;
import org.apache.myrmidon.framework.nativelib.Argument;
import org.apache.myrmidon.framework.nativelib.EnvironmentVariable;
import org.apache.myrmidon.framework.file.Path;

/**


+ 1
- 1
proposal/myrmidon/src/java/org/apache/antlib/java/JavacAdaptor.java View File

@@ -12,7 +12,7 @@ import java.lang.reflect.Method;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.file.FileListUtil;
import org.apache.myrmidon.framework.file.Path;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.ArgumentList;

/**
* An adaptor for the in-process Javac compiler.


+ 1
- 1
proposal/myrmidon/src/java/org/apache/antlib/java/JikesAdaptor.java View File

@@ -9,7 +9,7 @@ package org.apache.antlib.java;

import java.io.File;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.myrmidon.framework.java.JavaRuntimeClassPath;
import org.apache.myrmidon.framework.file.Path;
import org.apache.myrmidon.framework.file.FileListUtil;


+ 4
- 4
proposal/myrmidon/src/java/org/apache/antlib/nativelib/Exec.java View File

@@ -12,10 +12,10 @@ import java.util.Properties;
import org.apache.aut.nativelib.Os;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.tools.todo.types.Argument;
import org.apache.tools.todo.types.EnvironmentData;
import org.apache.tools.todo.types.EnvironmentVariable;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.myrmidon.framework.nativelib.Argument;
import org.apache.myrmidon.framework.nativelib.EnvironmentData;
import org.apache.myrmidon.framework.nativelib.EnvironmentVariable;

/**
* Executes a native command.


+ 2
- 2
proposal/myrmidon/src/java/org/apache/antlib/security/GenerateKey.java View File

@@ -9,8 +9,8 @@ package org.apache.antlib.security;

import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.tools.todo.types.Commandline;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.myrmidon.framework.nativelib.Commandline;

/**
* Generates a key.


+ 1
- 1
proposal/myrmidon/src/java/org/apache/antlib/security/SignJar.java View File

@@ -15,7 +15,7 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.myrmidon.framework.FileSet;
import org.apache.tools.todo.types.DirectoryScanner;
import org.apache.tools.todo.types.ScannerUtil;


+ 3
- 3
proposal/myrmidon/src/java/org/apache/myrmidon/framework/java/ExecuteJava.java View File

@@ -16,12 +16,12 @@ import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
import org.apache.myrmidon.api.TaskContext;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.myrmidon.framework.file.Path;
import org.apache.myrmidon.framework.file.FileListUtil;
import org.apache.tools.todo.types.EnvironmentData;
import org.apache.myrmidon.framework.nativelib.EnvironmentData;
import org.apache.tools.todo.types.SysProperties;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.tools.todo.util.FileUtils;

/**


proposal/myrmidon/src/todo/org/apache/tools/todo/types/Argument.java → proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/Argument.java View File

@@ -5,7 +5,7 @@
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.todo.types;
package org.apache.myrmidon.framework.nativelib;

import java.io.File;
import org.apache.myrmidon.api.TaskException;

proposal/myrmidon/src/todo/org/apache/tools/todo/types/ArgumentList.java → proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/ArgumentList.java View File

@@ -5,7 +5,7 @@
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.todo.types;
package org.apache.myrmidon.framework.nativelib;

import java.util.ArrayList;
import java.io.File;
@@ -48,6 +48,15 @@ public class ArgumentList
return (String[])result.toArray( res );
}

/**
* Sets the arguments, replacing the current value of this list.
*/
public void setArguments( final ArgumentList list )
{
m_arguments.clear();
addArguments( list );
}

public void addArguments( final String[] args )
{
for( int i = 0; i < args.length; i++ )

proposal/myrmidon/src/todo/org/apache/tools/todo/types/Commandline.java → proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/Commandline.java View File

@@ -5,7 +5,7 @@
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.todo.types;
package org.apache.myrmidon.framework.nativelib;



@@ -42,8 +42,20 @@ public class Commandline
m_executable = executable;
}

/**
* Returns the executable to run.
*/
public String getExecutable()
{
return m_executable;
}

/**
* Sets the commandline, replacing its current value.
*/
public void setCommandline( final Commandline command )
{
m_executable = command.getExecutable();
setArguments( command );
}
}

proposal/myrmidon/src/todo/org/apache/tools/todo/types/EnvironmentData.java → proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/EnvironmentData.java View File

@@ -5,11 +5,10 @@
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.todo.types;
package org.apache.myrmidon.framework.nativelib;

import java.util.ArrayList;
import java.util.Properties;
import org.apache.myrmidon.api.TaskException;

/**
* Wrapper for environment variables.

proposal/myrmidon/src/todo/org/apache/tools/todo/types/EnvironmentVariable.java → proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/EnvironmentVariable.java View File

@@ -5,7 +5,7 @@
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.todo.types;
package org.apache.myrmidon.framework.nativelib;

import java.io.File;
import org.apache.myrmidon.api.TaskException;

proposal/myrmidon/src/java/org/apache/myrmidon/framework/Execute.java → proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/Execute.java View File

@@ -5,7 +5,7 @@
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.myrmidon.framework;
package org.apache.myrmidon.framework.nativelib;

import java.io.File;
import java.util.Properties;
@@ -17,7 +17,6 @@ import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
import org.apache.myrmidon.api.TaskContext;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.util.FileUtils;

/**
@@ -69,17 +68,6 @@ public class Execute
m_handler = handler;
}

/**
* Sets the commandline of the process to launch.
*
* @param command the commandline of the process to launch
*/
public void setCommandline( final Commandline command )
{
setExecutable( command.getExecutable() );
addArguments( command );
}

/**
* Sets the environment to use for the process.
*

proposal/myrmidon/src/java/org/apache/myrmidon/framework/LoggingExecOutputHandler.java → proposal/myrmidon/src/java/org/apache/myrmidon/framework/nativelib/LoggingExecOutputHandler.java View File

@@ -5,14 +5,14 @@
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.myrmidon.framework;
package org.apache.myrmidon.framework.nativelib;

import org.apache.aut.nativelib.ExecOutputHandler;
import org.apache.myrmidon.api.TaskContext;

/**
* An {@link ExecOutputHandler} adaptor, that writes output to the logging
* methods of a {@link TaskContext}.
* An {@link org.apache.aut.nativelib.ExecOutputHandler} adaptor, that writes output to the logging
* methods of a {@link org.apache.myrmidon.api.TaskContext}.
*
* @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
* @version $Revision$ $Date$

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

@@ -14,7 +14,7 @@ import java.net.URL;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.java.ExecuteJava;
import org.apache.tools.todo.types.Argument;
import org.apache.myrmidon.framework.nativelib.Argument;
import org.apache.myrmidon.framework.file.Path;

/**


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

@@ -16,9 +16,9 @@ import java.util.ArrayList;
import java.util.Iterator;
import org.apache.aut.nativelib.Os;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.myrmidon.framework.FileSet;
import org.apache.tools.todo.types.Commandline;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.tools.todo.types.DirectoryScanner;
import org.apache.tools.todo.types.ScannerUtil;



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

@@ -16,7 +16,7 @@ import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.file.FileListUtil;
import org.apache.myrmidon.framework.file.Path;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.tools.todo.util.FileUtils;

/**


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

@@ -10,8 +10,8 @@ package org.apache.tools.todo.taskdefs;
import java.io.File;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.tools.todo.types.Commandline;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.myrmidon.framework.nativelib.Commandline;

/**
* @author lucas@collab.net


+ 3
- 3
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/DefaultCompilerAdapter.java View File

@@ -15,10 +15,10 @@ import org.apache.avalon.excalibur.io.IOUtil;
import org.apache.avalon.excalibur.util.StringUtil;
import org.apache.myrmidon.api.TaskContext;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.myrmidon.framework.FileSet;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.myrmidon.framework.file.Path;
import org.apache.myrmidon.framework.file.FileListUtil;
import org.apache.tools.todo.util.FileUtils;


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

@@ -8,7 +8,7 @@
package org.apache.tools.todo.taskdefs.javac;

import org.apache.myrmidon.api.TaskException;
import org.apache.tools.todo.types.Commandline;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.file.Path;
import org.apache.myrmidon.framework.file.FileListUtil;



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

@@ -7,7 +7,7 @@
*/
package org.apache.tools.todo.taskdefs.javac;

import org.apache.tools.todo.types.Argument;
import org.apache.myrmidon.framework.nativelib.Argument;

/**
* Adds an "implementation" attribute to Commandline$Attribute used to


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

@@ -12,8 +12,8 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.TaskContext;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.tools.todo.taskdefs.javac.DefaultCompilerAdapter;

/**


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

@@ -10,8 +10,8 @@ package org.apache.tools.todo.taskdefs.javac;
import java.lang.reflect.Method;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.TaskContext;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.tools.todo.taskdefs.javac.DefaultCompilerAdapter;

/**


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

@@ -9,7 +9,7 @@ package org.apache.tools.todo.taskdefs.javac;

import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.TaskContext;
import org.apache.tools.todo.types.Commandline;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.tools.todo.taskdefs.javac.DefaultCompilerAdapter;

/**


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

@@ -8,7 +8,7 @@
package org.apache.tools.todo.taskdefs.javac;

import org.apache.myrmidon.api.TaskException;
import org.apache.tools.todo.types.Commandline;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.file.Path;
import org.apache.myrmidon.framework.file.FileListUtil;



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

@@ -8,7 +8,7 @@
package org.apache.tools.todo.taskdefs.javac;

import org.apache.myrmidon.api.TaskException;
import org.apache.tools.todo.types.Commandline;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.file.Path;
import org.apache.myrmidon.framework.file.FileListUtil;



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

@@ -9,8 +9,8 @@ package org.apache.tools.todo.taskdefs.javac;

import java.lang.reflect.Method;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.myrmidon.framework.file.Path;
import org.apache.myrmidon.framework.file.FileListUtil;



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

@@ -9,7 +9,7 @@ package org.apache.tools.todo.taskdefs.javac;

import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.TaskContext;
import org.apache.tools.todo.types.Commandline;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.tools.todo.taskdefs.javac.DefaultCompilerAdapter;

/**


+ 51
- 74
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc/Javadoc.java View File

@@ -19,15 +19,14 @@ import org.apache.aut.nativelib.ExecOutputHandler;
import org.apache.aut.nativelib.Os;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.myrmidon.framework.Pattern;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.myrmidon.framework.FileSet;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.DirectoryScanner;
import org.apache.myrmidon.framework.file.Path;
import org.apache.myrmidon.framework.Pattern;
import org.apache.myrmidon.framework.file.FileListUtil;
import org.apache.myrmidon.framework.file.Path;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.tools.todo.types.DirectoryScanner;
import org.apache.tools.todo.types.ScannerUtil;
import org.apache.tools.todo.types.ArgumentList;

/**
* This task makes it easy to generate Javadoc documentation for a collection of
@@ -66,7 +65,7 @@ public class Javadoc
extends AbstractTask
implements ExecOutputHandler
{
private ArgumentList m_command = new ArgumentList();
private Execute m_command = new Execute();

private Path m_sourcePath;
private File m_destDir;
@@ -83,10 +82,6 @@ public class Javadoc
private ArrayList m_links = new ArrayList( 2 );
private ArrayList m_groups = new ArrayList( 2 );
private boolean m_useDefaultExcludes = true;
private Html m_doctitle;
private Html m_header;
private Html m_footer;
private Html m_bottom;
private boolean m_useExternalFile;
private File m_tmpList;

@@ -158,8 +153,6 @@ public class Javadoc
public void setDestdir( File dir )
{
m_destDir = dir;
m_command.addArgument( "-d" );
m_command.addArgument( m_destDir );
}

public void setDocencoding( String enc )
@@ -433,12 +426,14 @@ public class Javadoc

public void addBottom( Html text )
{
m_bottom = text;
m_command.addArgument( "-bottom" );
m_command.addArgument( text.getText() );
}

public void addDoctitle( Html text )
{
m_doctitle = text;
m_command.addArgument( "-doctitle" );
m_command.addArgument( text.getText() );
}

public void addExcludePackage( PackageName pn )
@@ -448,12 +443,14 @@ public class Javadoc

public void addFooter( Html text )
{
m_footer = text;
m_command.addArgument( "-footer" );
m_command.addArgument( text.getText() );
}

public void addHeader( Html text )
{
m_header = text;
m_command.addArgument( "-header" );
m_command.addArgument( text.getText() );
}

public void addPackage( PackageName pn )
@@ -537,29 +534,7 @@ public class Javadoc

getContext().info( "Generating Javadoc" );

if( m_doctitle != null )
{
m_command.addArgument( "-doctitle" );
m_command.addArgument( m_doctitle.getText() );
}
if( m_header != null )
{
m_command.addArgument( "-header" );
m_command.addArgument( m_header.getText() );
}
if( m_footer != null )
{
m_command.addArgument( "-footer" );
m_command.addArgument( m_footer.getText() );
}
if( m_bottom != null )
{
m_command.addArgument( "-bottom" );
m_command.addArgument( m_bottom.getText() );
}

Commandline cmd = new Commandline();//(Commandline)m_command.clone();
cmd.setExecutable( getJavadocExecutableName() );
m_command.setExecutable( getJavadocExecutableName() );

// ------------------------------------------------ general javadoc arguments

@@ -570,16 +545,16 @@ public class Javadoc
{
classpath.add( m_classpath );
}
cmd.addArgument( "-classpath" );
cmd.addArgument( FileListUtil.formatPath( classpath, getContext() ) );
m_command.addArgument( "-classpath" );
m_command.addArgument( FileListUtil.formatPath( classpath, getContext() ) );

if( m_version && m_doclet == null )
{
cmd.addArgument( "-version" );
m_command.addArgument( "-version" );
}
if( m_author && m_doclet == null )
{
cmd.addArgument( "-author" );
m_command.addArgument( "-author" );
}

if( m_doclet == null )
@@ -590,6 +565,11 @@ public class Javadoc
throw new TaskException( msg );
}
}
if( m_destDir != null )
{
m_command.addArgument( "-d" );
m_command.addArgument( m_destDir );
}

// --------------------------------- javadoc2 arguments for default doclet

@@ -603,12 +583,12 @@ public class Javadoc
}
else
{
cmd.addArgument( "-doclet" );
cmd.addArgument( m_doclet.getName() );
m_command.addArgument( "-doclet" );
m_command.addArgument( m_doclet.getName() );
if( m_doclet.getPath() != null )
{
cmd.addArgument( "-docletpath" );
cmd.addArgument( FileListUtil.formatPath( m_doclet.getPath(), getContext() ) );
m_command.addArgument( "-docletpath" );
m_command.addArgument( FileListUtil.formatPath( m_doclet.getPath(), getContext() ) );
}
for( Iterator e = m_doclet.getParams(); e.hasNext(); )
{
@@ -618,18 +598,18 @@ public class Javadoc
throw new TaskException( "Doclet parameters must have a name" );
}

cmd.addArgument( param.getName() );
m_command.addArgument( param.getName() );
if( param.getValue() != null )
{
cmd.addArgument( param.getValue() );
m_command.addArgument( param.getValue() );
}
}
}

if( m_bootclasspath != null )
{
cmd.addArgument( "-bootclasspath" );
cmd.addArgument( FileListUtil.formatPath( m_bootclasspath, getContext() ) );
m_command.addArgument( "-bootclasspath" );
m_command.addArgument( FileListUtil.formatPath( m_bootclasspath, getContext() ) );
}

// add the links arguments
@@ -655,9 +635,9 @@ public class Javadoc
File packageList = new File( packageListLocation, "package-list" );
if( packageList.exists() )
{
cmd.addArgument( "-linkoffline" );
cmd.addArgument( la.getHref() );
cmd.addArgument( packageListLocation.getAbsolutePath() );
m_command.addArgument( "-linkoffline" );
m_command.addArgument( la.getHref() );
m_command.addArgument( packageListLocation.getAbsolutePath() );
}
else
{
@@ -666,8 +646,8 @@ public class Javadoc
}
else
{
cmd.addArgument( "-link" );
cmd.addArgument( la.getHref() );
m_command.addArgument( "-link" );
m_command.addArgument( la.getHref() );
}
}
}
@@ -694,9 +674,9 @@ public class Javadoc
{
String name = grp.substring( 0, space );
String pkgList = grp.substring( space + 1 );
cmd.addArgument( "-group" );
cmd.addArgument( name );
cmd.addArgument( pkgList );
m_command.addArgument( "-group" );
m_command.addArgument( name );
m_command.addArgument( pkgList );
}
}
}
@@ -713,9 +693,9 @@ public class Javadoc
{
throw new TaskException( "The title and packages must be specified for group elements." );
}
cmd.addArgument( "-group" );
cmd.addArgument( title );
cmd.addArgument( packages );
m_command.addArgument( "-group" );
m_command.addArgument( title );
m_command.addArgument( packages );
}
}

@@ -736,7 +716,7 @@ public class Javadoc
}
else
{
cmd.addArgument( name );
m_command.addArgument( name );
}
}

@@ -752,7 +732,7 @@ public class Javadoc
}
if( packages.size() > 0 )
{
evaluatePackages( cmd, m_sourcePath, packages, excludePackages );
evaluatePackages( m_command, m_sourcePath, packages, excludePackages );
}
}

@@ -770,7 +750,7 @@ public class Javadoc
if( m_tmpList == null )
{
m_tmpList = File.createTempFile( "javadoc", "", getBaseDirectory() );
cmd.addArgument( "@" + m_tmpList.getAbsolutePath() );
m_command.addArgument( "@" + m_tmpList.getAbsolutePath() );
}
srcListWriter = new PrintWriter( new FileWriter( m_tmpList.getAbsolutePath(),
true ) );
@@ -787,7 +767,7 @@ public class Javadoc
}
else
{
cmd.addArgument( sourceFileName );
m_command.addArgument( sourceFileName );
}
}

@@ -807,17 +787,14 @@ public class Javadoc

if( m_packageList != null )
{
cmd.addArgument( "@" + m_packageList );
m_command.addArgument( "@" + m_packageList );
}
getContext().debug( "Javadoc args: " + cmd );

final Execute exe = new Execute();
exe.setExecOutputHandler( this );
getContext().debug( "Javadoc args: " + m_command );

exe.setCommandline( cmd );
m_command.setExecOutputHandler( this );
try
{
exe.execute( getContext() );
m_command.execute( getContext() );
}
finally
{


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

@@ -13,8 +13,8 @@ import org.apache.avalon.excalibur.util.StringUtil;
import org.apache.myrmidon.api.TaskContext;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.todo.taskdefs.jsp.JspC;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.tools.todo.util.FileUtils;

/**


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

@@ -10,8 +10,8 @@ package org.apache.tools.todo.taskdefs.jsp.compilers;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.java.ExecuteJava;
import org.apache.tools.todo.taskdefs.jsp.JspC;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.nativelib.ArgumentList;

/**
* The implementation of the jasper compiler. This is a cut-and-paste of the


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

@@ -21,13 +21,13 @@ import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.file.Path;
import org.apache.myrmidon.framework.file.FileListUtil;
import org.apache.myrmidon.framework.java.ExecuteJava;
import org.apache.tools.todo.types.Argument;
import org.apache.tools.todo.types.Commandline;
import org.apache.myrmidon.framework.nativelib.Argument;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.tools.todo.types.EnumeratedAttribute;
import org.apache.tools.todo.types.EnvironmentData;
import org.apache.tools.todo.types.EnvironmentVariable;
import org.apache.myrmidon.framework.nativelib.EnvironmentData;
import org.apache.myrmidon.framework.nativelib.EnvironmentVariable;
import org.apache.tools.todo.types.SysProperties;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.ArgumentList;

/**
* Ant task to run JUnit tests. <p>


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

@@ -15,7 +15,7 @@ import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.FileNameMapper;
import org.apache.myrmidon.framework.file.FileListUtil;
import org.apache.myrmidon.framework.file.Path;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.tools.todo.util.FileUtils;

/**


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

@@ -11,8 +11,8 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.TaskContext;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.tools.todo.taskdefs.rmic.DefaultRmicAdapter;

/**


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

@@ -13,8 +13,8 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.TaskContext;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.tools.todo.taskdefs.rmic.DefaultRmicAdapter;

/**


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

@@ -11,8 +11,8 @@ import java.lang.reflect.Method;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.TaskContext;
import org.apache.myrmidon.framework.java.ExecuteJava;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.tools.todo.taskdefs.rmic.DefaultRmicAdapter;

/**


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

@@ -10,7 +10,7 @@ package org.apache.tools.todo.taskdefs.stylebook;
import java.io.File;
import org.apache.myrmidon.api.TaskException;
import org.apache.antlib.java.JavaTask;
import org.apache.tools.todo.types.Argument;
import org.apache.myrmidon.framework.nativelib.Argument;

/**
* Basic task for apache stylebook.


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

@@ -13,7 +13,7 @@ import org.apache.myrmidon.framework.FileNameMapper;
import org.apache.tools.todo.taskdefs.MatchingTask;
import org.apache.tools.todo.types.DirectoryScanner;
import org.apache.tools.todo.types.SourceFileScanner;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.tools.todo.util.mappers.IdentityMapper;

/**


+ 4
- 7
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSS.java View File

@@ -12,9 +12,9 @@ import java.util.Properties;
import org.apache.aut.nativelib.ExecManager;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Execute;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.myrmidon.framework.nativelib.Commandline;
import org.apache.myrmidon.framework.nativelib.ArgumentList;

/**
* A base class for creating tasks for executing commands on Visual SourceSafe.
@@ -200,11 +200,9 @@ public abstract class MSVSS
return m_vssPath;
}

protected void run( final Commandline cmd )
protected void run( final Execute exe )
throws TaskException
{
final Execute exe = new Execute();

// If location of ss.ini is specified we need to set the
// environment-variable SSDIR to this value
if( m_serverPath != null )
@@ -214,7 +212,6 @@ public abstract class MSVSS
exe.setEnvironment( env );
}

exe.setCommandline( cmd );
exe.execute( getContext() );
}
}


+ 13
- 13
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSCHECKIN.java View File

@@ -9,8 +9,8 @@ package org.apache.tools.todo.taskdefs.vss;

import java.io.File;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Execute;

/**
* Task to perform CheckIn commands to Microsoft Visual Source Safe.
@@ -168,7 +168,7 @@ public class MSVSSCHECKIN
public void execute()
throws TaskException
{
final Commandline commandLine = new Commandline();
final Execute exe = new Execute();

// first off, make sure that we've got a command and a vssdir ...
final String vsspath = getVsspath();
@@ -183,24 +183,24 @@ public class MSVSSCHECKIN
// build the command line from what we got the format is
// ss Checkin VSS items [-H] [-C] [-I-] [-N] [-O] [-R] [-W] [-Y] [-?]
// as specified in the SS.EXE help
commandLine.setExecutable( getSSCommand() );
commandLine.addArgument( COMMAND_CHECKIN );
exe.setExecutable( getSSCommand() );
exe.addArgument( COMMAND_CHECKIN );

// VSS items
commandLine.addArgument( vsspath );
exe.addArgument( vsspath );
// -GL
getLocalpathCommand( commandLine );
getLocalpathCommand( exe );
// -I- or -I-Y or -I-N
getAutoresponse( commandLine );
getAutoresponse( exe );
// -R
getRecursiveCommand( commandLine );
getRecursiveCommand( exe );
// -W
getWritableCommand( commandLine );
getWritableCommand( exe );
// -Y
getLoginCommand( commandLine );
getLoginCommand( exe );
// -C
commandLine.addArgument( "-C" + m_comment );
exe.addArgument( "-C" + m_comment );

run( commandLine );
run( exe );
}
}

+ 12
- 12
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSCHECKOUT.java View File

@@ -9,8 +9,8 @@ package org.apache.tools.todo.taskdefs.vss;

import java.io.File;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Execute;

/**
* Task to perform CheckOut commands to Microsoft Visual Source Safe.
@@ -209,7 +209,7 @@ public class MSVSSCHECKOUT
public void execute()
throws TaskException
{
final Commandline commandLine = new Commandline();
final Execute exe = new Execute();

// first off, make sure that we've got a command and a vssdir ...
final String vsspath = getVsspath();
@@ -224,23 +224,23 @@ public class MSVSSCHECKOUT
// build the command line from what we got the format is
// ss Checkout VSS items [-G] [-C] [-H] [-I-] [-N] [-O] [-R] [-V] [-Y] [-?]
// as specified in the SS.EXE help
commandLine.setExecutable( getSSCommand() );
commandLine.addArgument( COMMAND_CHECKOUT );
exe.setExecutable( getSSCommand() );
exe.addArgument( COMMAND_CHECKOUT );

// VSS items
commandLine.addArgument( vsspath );
exe.addArgument( vsspath );
// -GL
getLocalpathCommand( commandLine );
getLocalpathCommand( exe );
// -I- or -I-Y or -I-N
getAutoresponse( commandLine );
getAutoresponse( exe );
// -R
getRecursiveCommand( commandLine );
getRecursiveCommand( exe );
// -V
getVersionCommand( commandLine );
getVersionCommand( exe );
// -Y
getLoginCommand( commandLine );
getLoginCommand( exe );

run( commandLine );
run( exe );
}
}


+ 14
- 15
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSGET.java View File

@@ -9,9 +9,8 @@ package org.apache.tools.todo.taskdefs.vss;

import java.io.File;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.file.Path;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Execute;

/**
* Task to perform GET commands to Microsoft Visual Source Safe. <p>
@@ -468,7 +467,7 @@ public class MSVSSGET extends MSVSS
public void execute()
throws TaskException
{
Commandline commandLine = new Commandline();
Execute exe = new Execute();

// first off, make sure that we've got a command and a vssdir ...
if( getVsspath() == null )
@@ -482,27 +481,27 @@ public class MSVSSGET extends MSVSS
// build the command line from what we got the format is
// ss Get VSS items [-G] [-H] [-I-] [-N] [-O] [-R] [-V] [-W] [-Y] [-?]
// as specified in the SS.EXE help
commandLine.setExecutable( getSSCommand() );
commandLine.addArgument( COMMAND_GET );
exe.setExecutable( getSSCommand() );
exe.addArgument( COMMAND_GET );

// VSS items
commandLine.addArgument( getVsspath() );
exe.addArgument( getVsspath() );
// -GL
getLocalpathCommand( commandLine );
getLocalpathCommand( exe );
// -I- or -I-Y or -I-N
getAutoresponse( commandLine );
getAutoresponse( exe );
// -O-
getQuietCommand( commandLine );
getQuietCommand( exe );
// -R
getRecursiveCommand( commandLine );
getRecursiveCommand( exe );
// -V
getVersionCommand( commandLine );
getVersionCommand( exe );
// -W
getWritableCommand( commandLine );
getWritableCommand( exe );
// -Y
getLoginCommand( commandLine );
getLoginCommand( exe );

run( commandLine );
run( exe );
}

}


+ 14
- 44
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSHISTORY.java View File

@@ -15,9 +15,9 @@ import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.todo.types.Commandline;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Execute;
import org.apache.tools.todo.types.EnumeratedAttribute;
import org.apache.tools.todo.types.ArgumentList;

/**
* Task to perform HISTORY commands to Microsoft Visual Source Safe.
@@ -222,7 +222,7 @@ public class MSVSSHISTORY extends MSVSS
public void execute()
throws TaskException
{
Commandline commandLine = new Commandline();
Execute exe = new Execute();

// first off, make sure that we've got a command and a vssdir and a label ...
if( getVsspath() == null )
@@ -236,41 +236,39 @@ public class MSVSSHISTORY extends MSVSS
// build the command line from what we got the format is
// ss History elements [-H] [-L] [-N] [-O] [-V] [-Y] [-#] [-?]
// as specified in the SS.EXE help
commandLine.setExecutable( getSSCommand() );
commandLine.addArgument( COMMAND_HISTORY );
exe.setExecutable( getSSCommand() );
exe.addArgument( COMMAND_HISTORY );

// VSS items
commandLine.addArgument( getVsspath() );
exe.addArgument( getVsspath() );

// -I-
commandLine.addArgument( "-I-" );// ignore all errors
exe.addArgument( "-I-" );// ignore all errors

// -V
// Label an existing file or project version
getVersionDateCommand( commandLine );
getVersionLabelCommand( commandLine );
getVersionDateCommand( exe );
getVersionLabelCommand( exe );

// -R
if( m_Recursive )
{
commandLine.addArgument( FLAG_RECURSION );
exe.addArgument( FLAG_RECURSION );
}

// -B / -D / -F-
if( m_Style.length() > 0 )
{
commandLine.addArgument( m_Style );
exe.addArgument( m_Style );
}

// -Y
getLoginCommand( commandLine );
getLoginCommand( exe );

// -O
getOutputCommand( commandLine );
getOutputCommand( exe );

System.out.println( "***: " + commandLine );

run( commandLine );
run( exe );
}

/**
@@ -286,34 +284,6 @@ public class MSVSSHISTORY extends MSVSS
}
}

/**
* @param cmd Description of Parameter
*/
private void getRecursiveCommand( ArgumentList cmd )
{
if( !m_Recursive )
{
return;
}
else
{
cmd.addArgument( FLAG_RECURSION );
}
}

/**
* Builds the User command.
*
* @param cmd the commandline the command is to be added to
*/
private void getUserCommand( ArgumentList cmd )
{
if( m_User != null )
{
cmd.addArgument( FLAG_USER + m_User );
}
}

/**
* Builds the version date command.
*


+ 12
- 12
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSLABEL.java View File

@@ -8,8 +8,8 @@
package org.apache.tools.todo.taskdefs.vss;

import org.apache.myrmidon.api.TaskException;
import org.apache.tools.todo.types.Commandline;
import org.apache.tools.todo.types.ArgumentList;
import org.apache.myrmidon.framework.nativelib.ArgumentList;
import org.apache.myrmidon.framework.nativelib.Execute;

/**
* Task to perform LABEL commands to Microsoft Visual Source Safe. <p>
@@ -323,7 +323,7 @@ public class MSVSSLABEL extends MSVSS
public void execute()
throws TaskException
{
Commandline commandLine = new Commandline();
Execute exe = new Execute();

// first off, make sure that we've got a command and a vssdir and a label ...
if( getVsspath() == null )
@@ -342,29 +342,29 @@ public class MSVSSLABEL extends MSVSS
// build the command line from what we got the format is
// ss Label VSS items [-C] [-H] [-I-] [-Llabel] [-N] [-O] [-V] [-Y] [-?]
// as specified in the SS.EXE help
commandLine.setExecutable( getSSCommand() );
commandLine.addArgument( COMMAND_LABEL );
exe.setExecutable( getSSCommand() );
exe.addArgument( COMMAND_LABEL );

// VSS items
commandLine.addArgument( getVsspath() );
exe.addArgument( getVsspath() );

// -C
commandLine.addArgument( "-C" + getComment() );
exe.addArgument( "-C" + getComment() );

// -I- or -I-Y or -I-N
getAutoresponse( commandLine );
getAutoresponse( exe );

// -L
// Specify the new label on the command line (instead of being prompted)
getLabelCommand( commandLine );
getLabelCommand( exe );

// -V
// Label an existing file or project version
getVersionCommand( commandLine );
getVersionCommand( exe );

// -Y
getLoginCommand( commandLine );
getLoginCommand( exe );

run( commandLine );
run( exe );
}
}

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

@@ -12,6 +12,7 @@ import java.util.Iterator;
import java.util.Properties;
import java.util.Map;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.nativelib.EnvironmentData;

/**
* A utility class for handling System properties


Loading…
Cancel
Save