Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSHARED-860] deprecated Windows 9X CommandShell #20

Merged
merged 4 commits into from
Mar 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
import java.util.List;

/**
* <p>
* Implementation to call the CMD Shell present on Windows NT, 2000 and XP
* </p>
* Implementation to call the CMD Shell present on Windows NT, 2000, XP, 7, 8, and 10.
*
* @author <a href="mailto:[email protected]">Carlos Sanchez</a>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@


/**
* <p>
* Implementation to call the Command.com Shell present on Windows 95, 98 and Me
* </p>
*
* @author <a href="mailto:[email protected]">Carlos Sanchez</a>
*
* @deprecated Windows ME is long dead. Update to Windows 10 and use {@link CmdShell}.
*/
@Deprecated
public class CommandShell
extends Shell
{
Expand Down
32 changes: 16 additions & 16 deletions src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@
import org.apache.maven.shared.utils.StringUtils;

/**
* <p>
* Class that abstracts the Shell functionality,
* with subclases for shells that behave particularly, like
* with subclasses for shells that behave particularly, like<p>
*
* <ul>
* <li><code>command.com</code></li>
* <li><code>cmd.exe</code></li>
* </ul>
* </p>
*
* @author <a href="mailto:[email protected]">Carlos Sanchez</a>
*
Expand Down Expand Up @@ -65,19 +64,19 @@ public class Shell
private char exeQuoteDelimiter = '\"';

/**
* Set the command to execute the shell (eg. COMMAND.COM, /bin/bash,...)
* Set the command to execute the shell (e.g. COMMAND.COM, /bin/bash,...).
*
* @param shellCommand The command
* @param shellCommand the command
*/
void setShellCommand( String shellCommand )
{
this.shellCommand = shellCommand;
}

/**
* Get the command to execute the shell
* Get the command to execute the shell.
*
* @return The command
* @return the command
*/
String getShellCommand()
{
Expand All @@ -86,7 +85,7 @@ String getShellCommand()

/**
* Set the shell arguments when calling a command line (not the executable arguments)
* (eg. /X /C for CMD.EXE)
* (e.g. /X /C for CMD.EXE).
*
* @param shellArgs the arguments to the shell
*/
Expand All @@ -99,7 +98,7 @@ void setShellArgs( String[] shellArgs )
/**
* Get the shell arguments
*
* @return The arguments
* @return the arguments
*/
String[] getShellArgs()
{
Expand All @@ -118,17 +117,17 @@ String[] getShellArgs()
*
* @param executableParameter executable that the shell has to call
* @param argumentsParameter arguments for the executable, not the shell
* @return List with one String object with executable and arguments quoted as needed
* @return list with one String object with executable and arguments quoted as needed
*/
List<String> getCommandLine( String executableParameter, String... argumentsParameter )
{
return getRawCommandLine( executableParameter, argumentsParameter );
}

/**
* @param executableParameter Executable.
* @param argumentsParameter The arguments for the executable.
* @return The list on command line.
* @param executableParameter Executable
* @param argumentsParameter the arguments for the executable
* @return the list on command line
*/
List<String> getRawCommandLine( String executableParameter, String... argumentsParameter )
{
Expand Down Expand Up @@ -211,7 +210,7 @@ char[] getEscapeChars( boolean includeSingleQuote, boolean includeDoubleQuote )
}

/**
* @return false in all cases.
* @return false in all cases
*/
protected boolean isDoubleQuotedArgumentEscaped()
{
Expand Down Expand Up @@ -354,7 +353,8 @@ public void setWorkingDirectory( String path )

/**
* Sets execution directory.
* @param workingDirectory The working directory.
*
* @param workingDirectory the working directory
*/
public void setWorkingDirectory( File workingDirectory )
{
Expand All @@ -365,7 +365,7 @@ public void setWorkingDirectory( File workingDirectory )
}

/**
* @return The working directory.
* @return the working directory
*/
public File getWorkingDirectory()
{
Expand Down