// log deployment details
logDeploy(connection, zipFile, deployOptions);
try {
// prepare deployment stub
MetadataStubExt metadataStubExt = getMetadataFactory().getMetadataStubExt(connection);
metadataStubExt.setMetadataDebugHeader(logInfos);
if (adjust) {
// adjust deploy options based on org settings
adjustDeployOptions(metadataStubExt, deployOptions, monitor);
}
monitorCheckSubTask(monitor, "Deploying components...");
// call deploy and wait for response
if (logger.isDebugEnabled()) {
logger.debug("Calling deploy() at " + (new Date()).toString());
}
AsyncResult asyncResult = metadataStubExt.deploy(zipFile, deployOptions);
monitorWork(monitor);
// get async result
deployResultHandler = getDeployResult(deployResultHandler, asyncResult, metadataStubExt, monitor);