MKS Integrity API resync won't work

319 Views Asked by At

I've been trying to fetch files from the Integrity server with java MKS api, using command "si createsandbox" . It went fine connecting to servers and making directories, but won't fetch any files, even with the option "populate". So I tried another command, "si resync", and it won't get me anything either.

Here is my code, simplified:

public void createsandbox(CmdRunner cmdRunner)

String fullDir = "U:/workspace/test/Admin_Project";
String projectName = "/Admin_Project/project.pj";

Command command = new Command(Command.SI, "createsandbox");
command.addOption(new Option("project", projectName));
command.addOption(new Option("Y"));
command.addOption(new Option("cwd", fullDir));

Response reponse = cmdRunner.execute(command);


public void resync(CmdRunner cmdRunner)

String sandbox = "U:/workspace/test/Admin_Project/project.pj";

Command command= new Command(Command.SI, "resync");
command.addOption(new Option("sandbox", sandbox));
command.addOption(new Option("Y"));

Response reponse = cmdRunner.execute(command);

I tried them with command-line, and they worked fine. These are the command-lines I used.

si createsandbox --project "/Admin_Project/project.pj" --cwd "U:/workspace/test/Admin_Project"

si resync --sandbox "U:/workspace/test/Admin_Project/project.pj" --Y

Any thoughts or comments would be very useful for me, thx in advance.

1

There are 1 best solutions below

0
홍상원 On

figured it out. I added a simple code adding another options,

command.addOption(new Option("R"));

which means "Recurse into subsandboxes creation"