if (updateCheck.allowedToCheckForUpdates()) {
updateCheck.maybePrintNagScreen(new PrintStream(System.out, true));
}
}
final GenericApplication app = readApplication();
final AppAdmin appAdmin = createAppAdmin(app);
final DeployUpdateListener listener = new DeployUpdateListener(
this,
new PrintWriter(System.out, true),
new PrintWriter(System.err, true)
);
getExecutor().execute(new Runnable() {
public void run() {
appAdmin.update(listener);
}
});
Status status;
synchronized (this) {
do {
wait(configuration.getStartupTimeout());
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("http://" + id + ".appspot.com", configuration.getPort(), archive);
} catch (DeploymentException e) {
throw e;
} catch (AppEngineConfigException e) {