ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r397058 [2/2] - in /ant/sandbox/antlibs/vss: ./ common/ docs/ src/ src/etc/ src/etc/testcases/ src/main/ src/main/org/ src/main/org/apache/ src/main/org/apache/ant/ src/main/org/apache/ant/vss/ test/ test/org/ test/org/apache/ test/org/apac...
Date Wed, 26 Apr 2006 02:21:33 GMT
Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCHECKOUT.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCHECKOUT.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCHECKOUT.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCHECKOUT.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,164 @@
+/*
+ * Copyright  2001-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.Path;
+
+/**
+ * Performs CheckOut commands to Microsoft Visual SourceSafe.
+ *
+ * @ant.task name="vsscheckout" category="scm"
+ * @ant.attribute.group name="vdl" description="Only one of version, date or label"
+ */
+public class MSVSSCHECKOUT extends MSVSS {
+
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    protected Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // first off, make sure that we've got a command and a vssdir ...
+        if (getVsspath() == null) {
+            String msg = "vsspath attribute must be set!";
+            throw new BuildException(msg, getLocation());
+        }
+
+        // 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.createArgument().setValue(COMMAND_CHECKOUT);
+
+        // VSS items
+        commandLine.createArgument().setValue(getVsspath());
+        // -GL
+        commandLine.createArgument().setValue(getLocalpath());
+        // -I- or -I-Y or -I-N
+        commandLine.createArgument().setValue(getAutoresponse());
+        // -R
+        commandLine.createArgument().setValue(getRecursive());
+        // -V
+        commandLine.createArgument().setValue(getVersionDateLabel());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+        // -G
+        commandLine.createArgument().setValue(getFileTimeStamp());
+        // -GWS or -GWR
+        commandLine.createArgument().setValue(getWritableFiles());
+        // -G-
+        commandLine.createArgument().setValue(getGetLocalCopy());
+
+        return commandLine;
+    }
+
+    /**
+     * Override the project working directory.
+     *
+     * @param   localPath   The path on disk.
+     */
+    public void setLocalpath(Path localPath) {
+        super.setInternalLocalPath(localPath.toString());
+    }
+
+    /**
+     * Check-out files recursively. Defaults to false.
+     *
+     * @param recursive  The boolean value for recursive.
+     */
+    public void setRecursive(boolean recursive) {
+        super.setInternalRecursive(recursive);
+    }
+
+    /**
+     * Version to check-out.
+     *
+     * @param  version The version to check-out.
+     *
+     * @ant.attribute group="vdl"
+     */
+    public void setVersion(String version) {
+        super.setInternalVersion(version);
+    }
+
+    /**
+     * Date to check-out.
+     *
+     * @param  date The date to check-out.
+     *
+     * @ant.attribute group="vdl"
+     */
+    public void setDate(String date) {
+        super.setInternalDate(date);
+    }
+
+    /**
+     * Label to check-out.
+     *
+     * @param  label The label to check-out.
+     *
+     * @ant.attribute group="vdl"
+     */
+    public void setLabel(String label) {
+        super.setInternalLabel(label);
+    }
+
+    /**
+     * Autoresponce behaviour. Valid options are Y and N.
+     *
+     * @param response The auto response value.
+     */
+    public void setAutoresponse(String response) {
+        super.setInternalAutoResponse(response);
+    }
+
+    /**
+     * Date and time stamp given to the local copy. Defaults to <code>current</code>.
+     *
+     * @param timestamp     The file time stamping behaviour.
+     */
+    public void setFileTimeStamp(CurrentModUpdated timestamp) {
+        super.setInternalFileTimeStamp(timestamp);
+    }
+
+    /**
+     * Action taken when local files are writable. Defaults to <code>fail</code>.
+     * <p>
+     * Due to ss.exe returning with an exit code of '100' for both errors and when
+     * a file has been skipped, <code>failonerror</code> is set to false when using
+     * the <code>skip</code> option.
+     * </p>
+     *
+     * @param files     The writable files behaviour
+     */
+    public void setWritableFiles(WritableFiles files) {
+        super.setInternalWritableFiles(files);
+    }
+
+    /**
+     * Retrieve a local copy during a checkout. Defaults to true.
+     *
+     * @param get   The get local copy behaviour
+     */
+    public void setGetLocalCopy(boolean get) {
+        super.setInternalGetLocalCopy(get);
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCLOAK.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCLOAK.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCLOAK.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCLOAK.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,53 @@
+/*
+ * Copyright  2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+
+public class MSVSSCLOAK extends MSVSS {
+
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // first off, make sure that we've got a command and a vssdir...
+        if (getVsspath() == null) {
+            String msg = "vsspath attribute must be set!";
+            throw new BuildException(msg, getLocation());
+        }
+        // Cloak always returns 1 - must set failonerror="false" as workaround
+        this.setFailOnError(false);
+        // build the command line from what we got
+        // the format is:
+        // ss Cloak VSS project path
+        // as specified in the SS.EXE help
+        commandLine.setExecutable(getSSCommand());
+        commandLine.createArgument().setValue(COMMAND_CLOAK);
+
+        // VSS items (from)
+        commandLine.createArgument().setValue(getVsspath());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+
+        return commandLine;
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCP.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCP.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCP.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCP.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,68 @@
+/*
+ * Copyright  2002-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+
+/**
+ * Performs CP (Change Project) commands to Microsoft Visual SourceSafe.
+ * <p>This task is typically used before a VssAdd in order to set the target project</p>
+ *
+ * @ant.task name="vsscp" category="scm"
+ */
+public class MSVSSCP extends MSVSS {
+
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    protected Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // first off, make sure that we've got a command and a vssdir ...
+        if (getVsspath() == null) {
+            String msg = "vsspath attribute must be set!";
+            throw new BuildException(msg, getLocation());
+        }
+
+        // build the command line from what we got the format is
+        // ss CP VSS items [-H] [-I-] [-Y] [-?]
+        // as specified in the SS.EXE help
+        commandLine.setExecutable(getSSCommand());
+        commandLine.createArgument().setValue(COMMAND_CP);
+
+        // VSS items
+        commandLine.createArgument().setValue(getVsspath());
+        // -I- or -I-Y or -I-N
+        commandLine.createArgument().setValue(getAutoresponse());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+
+        return commandLine;
+    }
+
+    /**
+     * Autoresponce behaviour. Valid options are Y and N.
+     *
+     * @param response The auto response value.
+     */
+    public void setAutoresponse(String response) {
+        super.setInternalAutoResponse(response);
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCREATE.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCREATE.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCREATE.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSCREATE.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,90 @@
+/*
+ * Copyright  2002-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+
+/**
+ * Creates a new project in Microsoft Visual SourceSafe.
+ *
+ * @ant.task name="vsscreate" category="scm"
+ */
+public class MSVSSCREATE extends MSVSS {
+
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // first off, make sure that we've got a command and a vssdir...
+        if (getVsspath() == null) {
+            String msg = "vsspath attribute must be set!";
+            throw new BuildException(msg, getLocation());
+        }
+
+        // build the command line from what we got
+        // the format is:
+        // ss Create VSS items [-C] [-H] [-I-] [-N] [-O] [-S] [-Y] [-?]
+        // as specified in the SS.EXE help
+        commandLine.setExecutable(getSSCommand());
+        commandLine.createArgument().setValue(COMMAND_CREATE);
+
+        // VSS items
+        commandLine.createArgument().setValue(getVsspath());
+        // -C
+        commandLine.createArgument().setValue(getComment());
+        // -I- or -I-Y or -I-N
+        commandLine.createArgument().setValue(getAutoresponse());
+        // -O-
+        commandLine.createArgument().setValue(getQuiet());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+
+        return commandLine;
+    }
+
+    /**
+     * Comment to apply to the project created in SourceSafe.
+     *
+     * @param comment The comment to apply in SourceSafe
+     */
+    public void setComment(String comment) {
+        super.setInternalComment(comment);
+    }
+
+    /**
+     * Enable quiet mode. Defaults to false.
+     *
+     * @param   quiet The boolean value for quiet.
+     */
+    public final void setQuiet (boolean quiet) {
+        super.setInternalQuiet(quiet);
+    }
+
+    /**
+     * Autoresponce behaviour. Valid options are Y and N.
+     *
+     * @param response The auto response value.
+     */
+    public void setAutoresponse(String response) {
+        super.setInternalAutoResponse(response);
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSConstants.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSConstants.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSConstants.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSConstants.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,111 @@
+/*
+ * Copyright  2003-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ant.vss;
+
+/**
+ *  Holds all the constants for the VSS tasks.
+ *
+ */
+public interface MSVSSConstants {
+    /**  Constant for the thing to execute  */
+    String SS_EXE = "ss";
+    /** Dollar Sigh to prefix the project path */
+    String PROJECT_PREFIX = "$";
+
+    /**  The 'CP' command  */
+    String COMMAND_CP = "CP";
+    /**  The 'Add' command  */
+    String COMMAND_ADD = "Add";
+    /**  The 'Get' command  */
+    String COMMAND_GET = "Get";
+    /**  The 'Checkout' command  */
+    String COMMAND_CHECKOUT = "Checkout";
+    /**  The 'Checkin' command  */
+    String COMMAND_CHECKIN = "Checkin";
+    /**  The 'Label' command  */
+    String COMMAND_LABEL = "Label";
+    /**  The 'History' command  */
+    String COMMAND_HISTORY = "History";
+    /**  The 'Create' command  */
+    String COMMAND_CREATE = "Create";
+    /**  The 'Destroy' command  */
+    String COMMAND_DESTROY = "Destroy";
+    /**  The 'Delete' command  */
+    String COMMAND_DELETE = "Delete";
+    /**  The 'Recover' command  */
+    String COMMAND_RECOVER = "Recover";
+    /**  The 'Move' command  */
+    String COMMAND_MOVE = "Move";
+    /**  The 'Cloak' command  */
+    String COMMAND_CLOAK = "Cloak";
+    /**  The 'Decloak' command  */
+    String COMMAND_DECLOAK = "Decloak";
+    /**  The 'Locate' command  */
+    String COMMAND_LOCATE = "Locate";
+
+    /**  The brief style flag  */
+    String STYLE_BRIEF = "brief";
+    /**  The codediff style flag  */
+    String STYLE_CODEDIFF = "codediff";
+    /**  The nofile style flag  */
+    String STYLE_NOFILE = "nofile";
+    /**  The default style flag  */
+    String STYLE_DEFAULT = "default";
+
+    /**  The text for  current (default) timestamp */
+    String TIME_CURRENT = "current";
+    /**  The text for  modified timestamp */
+    String TIME_MODIFIED = "modified";
+    /**  The text for  updated timestamp */
+    String TIME_UPDATED = "updated";
+
+    /**  The text for replacing writable files   */
+    String WRITABLE_REPLACE = "replace";
+    /**  The text for skiping writable files  */
+    String WRITABLE_SKIP = "skip";
+    /**  The text for failing on writable files  */
+    String WRITABLE_FAIL = "fail";
+
+    String FLAG_LOGIN = "-Y";
+    String FLAG_OVERRIDE_WORKING_DIR = "-GL";
+    String FLAG_AUTORESPONSE_DEF = "-I-";
+    String FLAG_AUTORESPONSE_YES = "-I-Y";
+    String FLAG_AUTORESPONSE_NO = "-I-N";
+    String FLAG_RECURSION = "-R";
+    String FLAG_VERSION = "-V";
+    String FLAG_VERSION_DATE = "-Vd";
+    String FLAG_VERSION_LABEL = "-VL";
+    String FLAG_WRITABLE = "-W";
+    String VALUE_NO = "-N";
+    String VALUE_YES = "-Y";
+    String FLAG_QUIET = "-O-";
+    String FLAG_COMMENT = "-C";
+    String FLAG_LABEL = "-L";
+    String VALUE_FROMDATE = "~d";
+    String VALUE_FROMLABEL = "~L";
+    String FLAG_OUTPUT = "-O";
+    String FLAG_USER = "-U";
+    String FLAG_NO_FILE = "-F-";
+    String FLAG_BRIEF = "-B";
+    String FLAG_CODEDIFF = "-D";
+    String FLAG_FILETIME_DEF = "-GTC";
+    String FLAG_FILETIME_MODIFIED = "-GTM";
+    String FLAG_FILETIME_UPDATED = "-GTU";
+    String FLAG_REPLACE_WRITABLE = "-GWR";
+    String FLAG_SKIP_WRITABLE = "-GWS";
+    String FLAG_NO_GET = "-G-";
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSDECLOAK.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSDECLOAK.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSDECLOAK.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSDECLOAK.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,53 @@
+/*
+ * Copyright  2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+
+public class MSVSSDECLOAK extends MSVSS {
+
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // first off, make sure that we've got a command and a vssdir...
+        if (getVsspath() == null) {
+            String msg = "vsspath attribute must be set!";
+            throw new BuildException(msg, getLocation());
+        }
+        // Decloak always returns 1 - must set failonerror="false" as workaround
+        this.setFailOnError(false);
+        // build the command line from what we got
+        // the format is:
+        // ss Decloak VSS project path
+        // as specified in the SS.EXE help
+        commandLine.setExecutable(getSSCommand());
+        commandLine.createArgument().setValue(COMMAND_DECLOAK);
+
+        // VSS items (from)
+        commandLine.createArgument().setValue(getVsspath());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+
+        return commandLine;
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSDELETE.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSDELETE.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSDELETE.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSDELETE.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,52 @@
+/*
+ * Copyright  2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+
+public class MSVSSDELETE extends MSVSS {
+
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // first off, make sure that we've got a command and a vssdir...
+        if (getVsspath() == null) {
+            String msg = "vsspath attribute must be set!";
+            throw new BuildException(msg, getLocation());
+        }
+        // build the command line from what we got
+        // the format is:
+        // ss Delete VSS items [-H] [-I-] [-N] [-O] [-S] [-Y] [-?]
+        // as specified in the SS.EXE help
+        commandLine.setExecutable(getSSCommand());
+        commandLine.createArgument().setValue(COMMAND_DELETE);
+
+        // VSS items (from)
+        commandLine.createArgument().setValue(getVsspath());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+        // -I-
+        commandLine.createArgument().setValue(getAutoresponse());
+        
+        return commandLine;
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSDESTROY.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSDESTROY.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSDESTROY.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSDESTROY.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,79 @@
+/*
+ * Copyright  2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+
+/**
+ * Permanently removes a file or project from Microsoft Visual SourceSafe.
+ *
+ * @ant.task name="vssdestroy" category="scm"
+ */
+public class MSVSSDESTROY extends MSVSS {
+
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // first off, make sure that we've got a command and a vssdir...
+        if (getVsspath() == null) {
+            String msg = "vsspath attribute must be set!";
+            throw new BuildException(msg, getLocation());
+        }
+
+        // build the command line from what we got
+        // the format is:
+        // ss Destroy VSS items [-H] [-I-] [-N] [-O] [-S] [-Y] [-?]
+        // as specified in the SS.EXE help
+        commandLine.setExecutable(getSSCommand());
+        commandLine.createArgument().setValue(COMMAND_DESTROY);
+
+        // VSS items
+        commandLine.createArgument().setValue(getVsspath());
+        // -I- or -I-Y or -I-N
+        commandLine.createArgument().setValue(getAutoresponse());
+        // -O-
+        commandLine.createArgument().setValue(getQuiet());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+
+        return commandLine;
+    }
+    
+    /**
+     * Enable quiet mode. Defaults to false.
+     *
+     * @param   quiet The boolean value for quiet.
+     */
+    public final void setQuiet (boolean quiet) {
+        super.setInternalQuiet(quiet);
+    }
+
+    /**
+     * Autoresponce behaviour. Valid options are Y and N.
+     *
+     * @param response The auto response value.
+     */
+    public void setAutoresponse(String response) {
+        super.setInternalAutoResponse(response);
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSGET.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSGET.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSGET.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSGET.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,171 @@
+/*
+ * Copyright  2000-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.Path;
+
+/**
+ * Perform Get commands from Microsoft Visual SourceSafe.
+ *
+ * @ant.task name="vssget" category="scm"
+ * @ant.attribute.group name="vdl" description="Only one of version, date or label"
+ */
+public class MSVSSGET extends MSVSS {
+
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // 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.createArgument().setValue(COMMAND_GET);
+
+        if (getVsspath() == null) {
+            throw new BuildException("vsspath attribute must be set!", getLocation());
+        }
+        commandLine.createArgument().setValue(getVsspath());
+
+        // -GL
+        commandLine.createArgument().setValue(getLocalpath());
+        // -I- or -I-Y or -I-N
+        commandLine.createArgument().setValue(getAutoresponse());
+        // -O-
+        commandLine.createArgument().setValue(getQuiet());
+        // -R
+        commandLine.createArgument().setValue(getRecursive());
+        // -V
+        commandLine.createArgument().setValue(getVersionDateLabel());
+        // -W
+        commandLine.createArgument().setValue(getWritable());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+        // -G
+        commandLine.createArgument().setValue(getFileTimeStamp());
+        // -GWS or -GWR
+        commandLine.createArgument().setValue(getWritableFiles());
+
+        return commandLine;
+    }
+
+    /**
+     * Override the project working directory.
+     *
+     * @param   localPath   The path on disk.
+     */
+    public void setLocalpath(Path localPath) {
+        super.setInternalLocalPath(localPath.toString());
+    }
+
+    /**
+     * Get files recursively. Defaults to false.
+     *
+     * @param recursive  The boolean value for recursive.
+     */
+    public final void setRecursive(boolean recursive) {
+        super.setInternalRecursive(recursive);
+    }
+
+    /**
+     * Enable quiet mode. Defaults to false.
+     *
+     * @param   quiet The boolean value for quiet.
+     */
+    public final void setQuiet (boolean quiet) {
+        super.setInternalQuiet(quiet);
+    }
+
+    /**
+     * Unset the READ-ONLY flag on files retrieved from VSS. Defaults to false.
+     *
+     * @param   writable The boolean value for writable.
+     */
+    public final void setWritable(boolean writable) {
+        super.setInternalWritable(writable);
+    }
+
+    /**
+     * Version to get.
+     *
+     * @param  version The version to get.
+     *
+     * @ant.attribute group="vdl"
+     */
+    public void setVersion(String version) {
+        super.setInternalVersion(version);
+    }
+
+    /**
+     * Date to get.
+     *
+     * @param  date The date to get.
+     *
+     * @ant.attribute group="vdl"
+     */
+    public void setDate(String date) {
+        super.setInternalDate(date);
+    }
+
+    /**
+     * Label to get.
+     *
+     * @param  label The label to get.
+     *
+     * @ant.attribute group="vdl"
+     */
+    public void setLabel(String label) {
+        super.setInternalLabel(label);
+    }
+
+    /**
+     * Autoresponce behaviour. Valid options are Y and N.
+     *
+     * @param response The auto response value.
+     */
+    public void setAutoresponse(String response) {
+        super.setInternalAutoResponse(response);
+    }
+
+    /**
+     * Date and time stamp given to the local copy. Defaults to <code>current</code>.
+     *
+     * @param timestamp     The file time stamping behaviour.
+     */
+    public void setFileTimeStamp(CurrentModUpdated timestamp) {
+        super.setInternalFileTimeStamp(timestamp);
+    }
+
+    /**
+     * Action taken when local files are writable. Defaults to <code>fail</code>.
+     * <p>
+     * Due to ss.exe returning with an exit code of '100' for both errors and when
+     * a file has been skipped, <code>failonerror</code> is set to false when using
+     * the <code>skip</code> option.
+     *
+     * @param files The action to take.
+     */
+    public void setWritableFiles(WritableFiles files) {
+        super.setInternalWritableFiles(files);
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSHISTORY.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSHISTORY.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSHISTORY.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSHISTORY.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,198 @@
+/*
+ * Copyright  2001-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.ant.vss;
+
+import java.io.File;
+import java.text.SimpleDateFormat;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.EnumeratedAttribute;
+
+/**
+ * Performs History commands to Microsoft Visual SourceSafe.
+ *
+ * @ant.task name="vsshistory" category="scm"
+ */
+public class MSVSSHISTORY extends MSVSS {
+
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // first off, make sure that we've got a command and a vssdir and a label ...
+        if (getVsspath() == null) {
+            String msg = "vsspath attribute must be set!";
+            throw new BuildException(msg, getLocation());
+        }
+
+        // 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.createArgument().setValue(COMMAND_HISTORY);
+
+        // VSS items
+        commandLine.createArgument().setValue(getVsspath());
+        // -I-
+        commandLine.createArgument().setValue(getAutoresponse());
+        // -Vd
+        commandLine.createArgument().setValue(getVersionDate());
+        // -VL
+        commandLine.createArgument().setValue(getVersionLabel());
+        // -R
+        commandLine.createArgument().setValue(getRecursive());
+        // -B / -D / -F-
+        commandLine.createArgument().setValue(getStyle());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+        // -O
+        commandLine.createArgument().setValue(getOutput());
+
+        return commandLine;
+    }
+
+    /**
+     * Retrieve history recursively. Defaults to false.
+     *
+     * @param recursive  The boolean value for recursive.
+     */
+    public void setRecursive(boolean recursive) {
+        super.setInternalRecursive(recursive);
+    }
+
+    /**
+     * Name of the user whose change history is generated.
+     *
+     * @param   user The username.
+     */
+    public void setUser(String user) {
+        super.setInternalUser(user);
+    }
+
+    /**
+     * Date representing the 'start' of the range.
+     *
+     * @param   fromDate    The start date.
+     */
+    public void setFromDate(String fromDate) {
+        super.setInternalFromDate(fromDate);
+    }
+
+    /**
+     * Date representing the 'end' of the range.
+     *
+     * @param   toDate    The end date.
+     */
+    public void setToDate(String toDate) {
+        super.setInternalToDate(toDate);
+    }
+
+    /**
+     * Label representing the 'start' of the range.
+     *
+     * @param   fromLabel    The start label.
+     */
+    public void setFromLabel(String fromLabel) {
+        super.setInternalFromLabel(fromLabel);
+    }
+
+    /**
+     * Label representing the 'end' of the range.
+     *
+     * @param   toLabel    The end label.
+     */
+    public void setToLabel(String toLabel) {
+        super.setInternalToLabel(toLabel);
+    }
+
+    /**
+     * Number of days for comparison.
+     * Defaults to 2 days.
+     *
+     * @param   numd    The number of days.
+     */
+    public void setNumdays(int numd) {
+        super.setInternalNumDays(numd);
+    }
+
+    /**
+     * Output file name for the history.
+     *
+     * @param   outfile The output file name.
+     */
+    public void setOutput(File outfile) {
+        if (outfile != null) {
+            super.setInternalOutputFilename(outfile.getAbsolutePath());
+        }
+    }
+
+    /**
+     * Format of dates in <code>fromDate</code and <code>toDate</code>.
+     * Used when calculating dates with the numdays attribute.
+     * This string uses the formatting rules of <code>SimpleDateFormat</code>.
+     * Defaults to <code>DateFormat.SHORT</code>.
+     *
+     * @param   dateFormat  The date format.
+     */
+    public void setDateFormat(String dateFormat) {
+        super.setInternalDateFormat(new SimpleDateFormat(dateFormat));
+    }
+
+   /**
+     * Output style. Valid options are:
+     * <ul>
+     * <li>brief:    -B Display a brief history.
+     * <li>codediff: -D Display line-by-line file changes.
+     * <li>nofile:   -F- Do not display individual file updates in the project history.
+     * <li>default:  No option specified. Display in Source Safe's default format.
+     * </ul>
+     *
+     * @param attr The history style:
+     */
+    public void setStyle(BriefCodediffNofile attr) {
+        String option = attr.getValue();
+        if (option.equals(STYLE_BRIEF)) {
+            super.setInternalStyle(FLAG_BRIEF);
+        } else if (option.equals(STYLE_CODEDIFF)) {
+            super.setInternalStyle(FLAG_CODEDIFF);
+        } else if (option.equals(STYLE_DEFAULT)) {
+            super.setInternalStyle("");
+        } else if (option.equals(STYLE_NOFILE)) {
+            super.setInternalStyle(FLAG_NO_FILE);
+        } else {
+            throw new BuildException("Style " + attr + " unknown.", getLocation());
+        }
+    }
+
+    /**
+     * Extention of EnumeratedAttribute to hold the values for style.
+     */
+    public static class BriefCodediffNofile extends EnumeratedAttribute {
+        /**
+         * Gets the list of allowable values.
+         * @return The values.
+         */
+        public String[] getValues() {
+            return new String[] {STYLE_BRIEF, STYLE_CODEDIFF, STYLE_NOFILE, STYLE_DEFAULT};
+        }
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSLABEL.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSLABEL.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSLABEL.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSLABEL.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,107 @@
+/*
+ * Copyright  2001-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+
+/**
+ * Performs Label commands to Microsoft Visual SourceSafe.
+ *
+ * @ant.task name="vsslabel" category="scm"
+ */
+public class MSVSSLABEL extends MSVSS {
+
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // first off, make sure that we've got a command and a vssdir and a label ...
+        if (getVsspath() == null) {
+            throw new BuildException("vsspath attribute must be set!", getLocation());
+        }
+
+        String label = getLabel();
+        if (label.equals("")) {
+            String msg = "label attribute must be set!";
+            throw new BuildException(msg, getLocation());
+        }
+
+        // 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.createArgument().setValue(COMMAND_LABEL);
+
+        // VSS items
+        commandLine.createArgument().setValue(getVsspath());
+        // -C
+        commandLine.createArgument().setValue(getComment());
+        // -I- or -I-Y or -I-N
+        commandLine.createArgument().setValue(getAutoresponse());
+        // -L Specify the new label on the command line (instead of being prompted)
+        commandLine.createArgument().setValue(label);
+        // -V Label an existing file or project version
+        commandLine.createArgument().setValue(getVersion());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+
+        return commandLine;
+    }
+
+    /**
+     * Label to apply in SourceSafe.
+     *
+     * @param  label The label to apply.
+     *
+     * @ant.attribute group="required"
+     */
+    public void setLabel(String label) {
+        super.setInternalLabel(label);
+    }
+
+    /**
+     * Version to label.
+     *
+     * @param  version The version to label.
+     */
+    public void setVersion(String version) {
+        super.setInternalVersion(version);
+    }
+
+    /**
+     * Comment to apply to files labeled in SourceSafe.
+     *
+     * @param comment The comment to apply in SourceSafe
+     */
+    public void setComment(String comment) {
+        super.setInternalComment(comment);
+    }
+
+    /**
+     * Autoresponce behaviour. Valid options are Y and N.
+     *
+     * @param response The auto response value.
+     */
+    public void setAutoresponse(String response) {
+        super.setInternalAutoResponse(response);
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSLOCATE.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSLOCATE.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSLOCATE.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSLOCATE.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,54 @@
+/*
+ * Copyright  2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+
+public class MSVSSLOCATE extends MSVSS {
+
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // first off, make sure that we've got a command and a vssdir...
+        if (getVsspath() == null) {
+            String msg = "vsspath attribute must be set!";
+            throw new BuildException(msg, getLocation());
+        }
+        // Cloak always returns 1 - must set failonerror="false" as workaround
+        this.setFailOnError(false);
+        // build the command line from what we got
+        // the format is:
+        // ss Locate filename [-H] [-I-] [-N] [-O] [-Y] [-?]
+        // as specified in the SS.EXE help
+        commandLine.setExecutable(getSSCommand());
+        commandLine.createArgument().setValue(COMMAND_LOCATE);
+
+        // VSS items (from)
+        commandLine.createArgument().setValue(getVsspath());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+        // -I-
+        commandLine.createArgument().setValue(getAutoresponse());
+        return commandLine;
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSMOVE.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSMOVE.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSMOVE.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSMOVE.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,71 @@
+/*
+ * Copyright  2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+
+public class MSVSSMOVE extends MSVSS {
+
+    private String destination;
+    
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // first off, make sure that we've got a command and a vssdir...
+        if (getVsspath() == null) {
+            String msg = "vsspath attribute must be set!";
+            throw new BuildException(msg, getLocation());
+        }
+
+        // build the command line from what we got
+        // the format is:
+        // ss Destroy VSS items [-H] [-I-] [-N] [-O] [-S] [-Y] [-?]
+        // as specified in the SS.EXE help
+        commandLine.setExecutable(getSSCommand());
+        commandLine.createArgument().setValue(COMMAND_MOVE);
+
+        // VSS items (from)
+        commandLine.createArgument().setValue(getVsspath());
+        // VSS item (to)
+        commandLine.createArgument().setValue(destination);
+        // -I- or -I-Y or -I-N
+        commandLine.createArgument().setValue(getAutoresponse());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+
+        return commandLine;
+    }
+    
+    /**
+     * Autoresponce behaviour. Valid options are Y and N.
+     *
+     * @param response The auto response value.
+     */
+    public void setAutoresponse(String response) {
+        super.setInternalAutoResponse(response);
+    }
+    
+    public void setDestination(String d) {
+        this.destination = d;
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSRECOVER.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSRECOVER.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSRECOVER.java (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSRECOVER.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,53 @@
+/*
+ * Copyright  2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+
+public class MSVSSRECOVER extends MSVSS {
+
+    /**
+     * Builds a command line to execute ss.
+     * @return     The constructed commandline.
+     */
+    Commandline buildCmdLine() {
+        Commandline commandLine = new Commandline();
+
+        // first off, make sure that we've got a command and a vssdir...
+        if (getVsspath() == null) {
+            String msg = "vsspath attribute must be set!";
+            throw new BuildException(msg, getLocation());
+        }
+        // build the command line from what we got
+        // the format is:
+        // ss Recover VSS items [-G] [-H] [-I-] [-N] [-O] [-S] [-W] [-Y] [-?]
+        // as specified in the SS.EXE help
+        commandLine.setExecutable(getSSCommand());
+        commandLine.createArgument().setValue(COMMAND_RECOVER);
+
+        // VSS items (from)
+        commandLine.createArgument().setValue(getVsspath());
+        // -Y
+        commandLine.createArgument().setValue(getLogin());
+        // -I-
+        commandLine.createArgument().setValue(getAutoresponse());
+        //-GWS or -GWR
+        commandLine.createArgument().setValue(getWritableFiles());
+        return commandLine;
+    }
+}

Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/antlib.xml
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/antlib.xml?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/antlib.xml (added)
+++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/antlib.xml Tue Apr 25 19:21:27 2006
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<!--
+ Copyright  2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<antlib>
+  <taskdef
+    name="vss"
+    classname="org.apache.ant.vss.MSVSS"
+    />
+  <taskdef
+    name="add"
+    classname="org.apache.ant.vss.MSVSSADD"
+    />
+  <taskdef
+    name="checkin"
+    classname="org.apache.ant.vss.MSVSSCHECKIN"
+    />
+  <taskdef
+    name="checkout"
+    classname="org.apache.ant.vss.MSVSSCHECKOUT"
+    />
+  <taskdef
+    name="cp"
+    classname="org.apache.ant.vss.MSVSSCP"
+    />
+  <taskdef
+    name="create"
+    classname="org.apache.ant.vss.MSVSSCREATE"
+    />
+  <taskdef
+    name="get"
+    classname="org.apache.ant.vss.MSVSSGET"
+    />
+  <taskdef
+    name="history"
+    classname="org.apache.ant.vss.MSVSSHISTORY"
+    />
+  <taskdef
+    name="label"
+    classname="org.apache.ant.vss.MSVSSLABEL"
+    />
+  <taskdef
+    name="destroy"
+    classname="org.apache.ant.vss.MSVSSDESTROY"
+    />
+  <taskdef
+    name="delete"
+    classname="org.apache.ant.vss.MSVSSDELETE"
+    />
+  <taskdef
+    name="recover"
+    classname="org.apache.ant.vss.MSVSSRECOVER"
+    />
+  <taskdef
+    name="move"
+    classname="org.apache.ant.vss.MSVSSMOVE"
+    />
+  <taskdef
+    name="cloak"
+    classname="org.apache.ant.vss.MSVSSCLOAK"
+    />
+  <taskdef
+    name="decloak"
+    classname="org.apache.ant.vss.MSVSSDECLOAK"
+    />
+  <taskdef
+    name="locate"
+    classname="org.apache.ant.vss.MSVSSLOCATE"
+    />
+</antlib>

Added: ant/sandbox/antlibs/vss/test/org/apache/ant/vss/MSVSSTest.java
URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/test/org/apache/ant/vss/MSVSSTest.java?rev=397058&view=auto
==============================================================================
--- ant/sandbox/antlibs/vss/test/org/apache/ant/vss/MSVSSTest.java (added)
+++ ant/sandbox/antlibs/vss/test/org/apache/ant/vss/MSVSSTest.java Tue Apr 25 19:21:27 2006
@@ -0,0 +1,42 @@
+package org.apache.ant.vss;
+
+import org.apache.tools.ant.BuildFileTest;
+
+public class MSVSSTest extends BuildFileTest {
+
+    public MSVSSTest() {
+        this("MSVSSTest");
+    }
+    
+    public MSVSSTest(String name) {
+        super(name);
+    }
+    
+    public void setUp() throws Exception {
+        configureProject("src/etc/testcases/msvss.xml");
+    }
+
+    public void tearDown() throws Exception {
+        executeTarget("cleanup");
+    }
+    
+    public void testMSVSS() throws Exception {
+        executeTarget("test-all");
+    }
+    
+    public void testMSVSSMOVE() throws Exception {
+        executeTarget("test-move");
+    }
+    
+    public void testMSVSSCLOAK() throws Exception {
+        executeTarget("test-cloak");
+    }
+    
+    public void testMSVSSDELETE() throws Exception {
+        executeTarget("test-delete");
+    }
+    
+    public void testMSVSSLOCATE() throws Exception {
+        executeTarget("test-locate");
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message