Browse Source

New attribute "autoresponse" for <vssget>.

Submitted by:	Alan Zall <alan@inskey.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268256 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
06c94f2108
3 changed files with 42 additions and 4 deletions
  1. +5
    -1
      WHATSNEW
  2. +5
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
  3. +32
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java

+ 5
- 1
WHATSNEW View File

@@ -28,7 +28,7 @@ Other changes:
* <cab> can work on non-Windows platforms with the help of libcabinet.
See http://trill.cis.fordham.edu/~barbacha/cabinet_library/.

* <FTP> now supports passive mode.
* <ftp> now supports passive mode.

Fixed bugs:
-----------
@@ -47,6 +47,10 @@ Fixed bugs:
relying on the naming convention used in ant 1.2
Include super classes and super interfaces into the generated ejb jar files

* <vssget> now correctly deals with spaces in arguments

* <jar> fails early if a given manifest file doesn't exist

Changes from Ant 1.1 to Ant 1.2
===============================



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

@@ -192,7 +192,11 @@ public abstract class MSVSS extends Task {
/** */
public static final String FLAG_OVERRIDE_WORKING_DIR = "-GL";
/** */
public static final String FLAG_AUTORESPONSE = "-I";
public static final String FLAG_AUTORESPONSE_DEF = "-I-";
/** */
public static final String FLAG_AUTORESPONSE_YES = "-I-Y";
/** */
public static final String FLAG_AUTORESPONSE_NO = "-I-N";
/** */
public static final String FLAG_RECURSION = "-R";
/** */


+ 32
- 2
src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java View File

@@ -124,6 +124,7 @@ public class MSVSSGET extends MSVSS {
private String m_Version = null;
private String m_Date = null;
private String m_Label = null;
private String m_AutoResponse = null;

/**
* Executes the task.
@@ -153,8 +154,8 @@ public class MSVSSGET extends MSVSS {
commandLine.createArgument().setValue(getVsspath());
// -GL
getLocalpathCommand(commandLine);
// -I-
commandLine.createArgument().setValue("-I-"); // ignore all errors
// -I- or -I-Y or -I-N
getAutoresponse(commandLine);
// -R
getRecursiveCommand(commandLine);
// -V
@@ -306,5 +307,34 @@ public class MSVSSGET extends MSVSS {
}
}

public void setAutoresponse(String response){
if ( response.equals("") || response.equals("null") ) {
m_AutoResponse = null;
} else {
m_AutoResponse = response;
}
}
/**
* Checks the value set for the autoResponse.
* if it equals "Y" then we return -I-Y
* if it equals "N" then we return -I-N
* otherwise we return -I
*/
public void getAutoresponse(Commandline cmd) {
if ( m_AutoResponse == null) {
cmd.createArgument().setValue(FLAG_AUTORESPONSE_DEF);
} else if ( m_AutoResponse.equalsIgnoreCase("Y")) {
cmd.createArgument().setValue(FLAG_AUTORESPONSE_YES);
} else if ( m_AutoResponse.equalsIgnoreCase("N")) {
cmd.createArgument().setValue(FLAG_AUTORESPONSE_NO);
}else {
cmd.createArgument().setValue(FLAG_AUTORESPONSE_DEF);
} // end of else

}

}


Loading…
Cancel
Save