@Override
public Object startInstall(File carFile, String defaultRepository, boolean restrictToDefaultRepository, String username, String password) {
File[] args = new File[] {carFile};
if (!isSameMachine) {
AbstractDeployCommand progress = new AbstractDeployCommand(CommandType.DISTRIBUTE, kernel, null, null, null,
null, null, false) {
public void run() {
}
};
progress.addProgressListener(new ProgressListener() {
public void handleProgressEvent(ProgressEvent event) {
log.info(event.getDeploymentStatus().getMessage());
}
});
progress.setCommandContext(commandContext);
RemoteDeployUtil.uploadFilesToServer(args, progress);
}
// make sure to pass args[0] as RemoteDeployUtil.uploadFilesToServer will update
// the args argument with the filenames returned from the server
return super.startInstall(args[0], defaultRepository, restrictToDefaultRepository, username, password);