Author: kevj Date: Fri May 5 00:42:15 2006 New Revision: 400004 URL: http://svn.apache.org/viewcvs?rev=400004&view=rev Log: added status task for VSS antlib (Bug #18146)
Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSSTATUS.java Added: ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSSTATUS.java URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSSTATUS.java?rev=400004&view=auto ============================================================================== --- ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSSTATUS.java (added) +++ ant/sandbox/antlibs/vss/src/main/org/apache/ant/vss/MSVSSSTATUS.java Fri May 5 00:42:15 2006 @@ -0,0 +1,57 @@ +/* + * 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 MSVSSSTATUS 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 Status [VSS items] [-H] [-I-] [-N] [-O] [-P[project]] [-R] [-U[username]] [-Y] [-?] + // as specified in the SS.EXE help + commandLine.setExecutable(getSSCommand()); + commandLine.createArgument().setValue(COMMAND_STATUS); + + // VSS items (from) + commandLine.createArgument().setValue(getVsspath()); + // -Y + commandLine.createArgument().setValue(getLogin()); + // -I- + commandLine.createArgument().setValue(getAutoresponse()); + // -U + commandLine.createArgument().setValue(getUser()); + return commandLine; + } + + public void setUser(String u) { + super.setInternalUser(u); + } +} --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]