Commandline buildCmdLine()

in src/main/org/apache/ant/vss/MSVSSLOCATE.java [30:54]


    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());
        }
        // Locate 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;
    }