wagon.putDirectory(inputDirectory, remoteDirectory);
if (chmod && wagon instanceof CommandExecutor) {
CommandExecutor exec = (CommandExecutor) wagon;
exec.executeCommand("chmod " + chmodOptions + " " + chmodMode + " " + repository.getBasedir());
}
} catch (ResourceDoesNotExistException e) {
throw new MojoExecutionException("Error uploading site", e);
} catch (TransferFailedException e) {
throw new MojoExecutionException("Error uploading site", e);