String appString = (String) options.get("app");
final File appsDir = MuleContainerBootstrapUtils.getMuleAppsDir();
// delete any leftover anchor files from previous unclean shutdowns
String[] appAnchors = appsDir.list(new SuffixFileFilter(APP_ANCHOR_SUFFIX));
for (String anchor : appAnchors)
{
// ignore result
new File(appsDir, anchor).delete();
}
String[] apps;
// mule -app app1:app2:app3 will restrict deployment only to those specified apps
final boolean explicitAppSet = appString != null;
DeploymentStatusTracker deploymentStatusTracker = new DeploymentStatusTracker();
addDeploymentListener(deploymentStatusTracker);
StartupSummaryDeploymentListener summaryDeploymentListener = new StartupSummaryDeploymentListener(deploymentStatusTracker);
addStartupListener(summaryDeploymentListener);
if (!explicitAppSet)
{
// explode any app zips first
final String[] zips = appsDir.list(new SuffixFileFilter(".zip"));
Arrays.sort(zips);
for (String zip : zips)
{
String appName = StringUtils.removeEnd(zip, ".zip");