status = listener.getStatus();
} while (status == null); // guard against spurious wakeup
}
if (status != Status.OK) {
throw new DeploymentException("Cannot deploy via GAE tools: " + status);
}
final String id = app.getVersion() + "." + app.getAppId();
return getProtocolMetaData(id + ".appspot.com", configuration.getPort(), archive);
} catch (DeploymentException e) {
throw e;
} catch (AppEngineConfigException e) {
if (e.getCause() instanceof SAXParseException) {
String msg = e.getCause().getMessage();
// have to check what the message says to distinguish a file-not-found
// problem from some other xml problem.
if (msg.contains("Failed to read schema document") && msg.contains("backends.xsd")) {
throw new IllegalArgumentException("Deploying a project with backends requires App Engine SDK 1.5.0 or greater.", e);
} else {
throw e;
}
} else {
throw e;
}
} catch (Exception e) {
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
throw new DeploymentException("Cannot deploy via GAE tools.", e);
}
}