From 06c94f2108cfa5633d0519ed224e1076bb769045 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 28 Nov 2000 14:15:21 +0000 Subject: [PATCH] New attribute "autoresponse" for . Submitted by: Alan Zall git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268256 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 6 +++- .../ant/taskdefs/optional/vss/MSVSS.java | 6 +++- .../ant/taskdefs/optional/vss/MSVSSGET.java | 34 +++++++++++++++++-- 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/WHATSNEW b/WHATSNEW index 83597b82a..7e0163198 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -28,7 +28,7 @@ Other changes: * can work on non-Windows platforms with the help of libcabinet. See http://trill.cis.fordham.edu/~barbacha/cabinet_library/. -* now supports passive mode. +* 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 +* now correctly deals with spaces in arguments + +* fails early if a given manifest file doesn't exist + Changes from Ant 1.1 to Ant 1.2 =============================== diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java index e28a8e29e..e52c6d663 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java @@ -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"; /** */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java index 2d1bc3f02..4a78c0d4d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java @@ -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 + + } + }