- Argument - ArgumentList - Commandline - EnvironmentData - EnvironmentVariable - Execute - LoggingExecOutputHandler git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272278 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -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. | |||
| @@ -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. | |||
| @@ -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; | |||
| /** | |||
| @@ -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; | |||
| /** | |||
| @@ -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; | |||
| /** | |||
| @@ -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. | |||
| @@ -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; | |||
| /** | |||
| @@ -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. | |||
| @@ -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; | |||
| @@ -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. | |||
| @@ -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. | |||
| @@ -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; | |||
| @@ -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; | |||
| /** | |||
| @@ -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; | |||
| @@ -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++ ) | |||
| @@ -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 ); | |||
| } | |||
| } | |||
| @@ -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. | |||
| @@ -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; | |||
| @@ -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. | |||
| * | |||
| @@ -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$ | |||
| @@ -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; | |||
| /** | |||
| @@ -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; | |||
| @@ -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; | |||
| /** | |||
| @@ -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 | |||
| @@ -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; | |||
| @@ -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; | |||
| @@ -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 | |||
| @@ -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; | |||
| /** | |||
| @@ -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; | |||
| /** | |||
| @@ -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; | |||
| /** | |||
| @@ -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; | |||
| @@ -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; | |||
| @@ -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; | |||
| @@ -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; | |||
| /** | |||
| @@ -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 | |||
| { | |||
| @@ -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; | |||
| /** | |||
| @@ -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 | |||
| @@ -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> | |||
| @@ -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; | |||
| /** | |||
| @@ -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; | |||
| /** | |||
| @@ -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; | |||
| /** | |||
| @@ -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; | |||
| /** | |||
| @@ -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. | |||
| @@ -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; | |||
| /** | |||
| @@ -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() ); | |||
| } | |||
| } | |||
| @@ -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 ); | |||
| } | |||
| } | |||
| @@ -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 ); | |||
| } | |||
| } | |||
| @@ -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 ); | |||
| } | |||
| } | |||
| @@ -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. | |||
| * | |||
| @@ -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 ); | |||
| } | |||
| } | |||
| @@ -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 | |||