private void configureJobWithExec(FreeStyleJob j, Resource cp_file) {
   j.configure();
   {
     j.copyResource(cp_file);
     PublishOverSSHPublisher popsp = j.addPublisher(PublishOverSSHPublisher.class);
     // set default set
     Publishers publishers = popsp.setPublishers();
     // set default set
     TransferSet ts = publishers.setTransferSet();
     // set source file
     ts.sourceFiles.set(sourceFile);
     // exec a command
     ts.execCommand.set("echo 'i was here' >> /tmp/testecho");
   }
 }
 private void configureJobNoExec(FreeStyleJob j, Resource cp_file) {
   j.configure();
   {
     j.copyResource(cp_file);
     PublishOverSSHPublisher popsp = j.addPublisher(PublishOverSSHPublisher.class);
     // set default set
     Publishers publishers = popsp.setPublishers();
     // add new set
     // Publishers newSps = popsp.addPublishers();
     // set default set
     TransferSet ts = publishers.setTransferSet();
     // set source file
     ts.sourceFiles.set(sourceFile);
   }
 }