in wagon-providers/wagon-ssh-common-test/src/main/java/org/apache/maven/wagon/providers/ssh/ScpCommand.java [84:125]
public ScpCommand(String[] args) {
name = Arrays.asList(args).toString();
if (LOG.isDebugEnabled()) {
LOG.debug("Executing command {}", name);
}
path = ".";
for (int i = 1; i < args.length; i++) {
if (args[i].charAt(0) == '-') {
for (int j = 1; j < args[i].length(); j++) {
switch (args[i].charAt(j)) {
case 'f':
optF = true;
break;
case 'p':
optP = true;
break;
case 'r':
optR = true;
break;
case 't':
optT = true;
break;
case 'v':
optV = true;
break;
case 'd':
optD = true;
break;
default:
// error = new IOException("Unsupported option: " +
// args[i].charAt(j));
// return;
}
}
} else if (i == args.length - 1) {
path = args[args.length - 1];
}
}
if (!optF && !optT) {
error = new IOException("Either -f or -t option should be set");
}
}