{
// check for new deployment
File aFile = stagedFiles[i];
if (aFile.isFile() && !ignoreFile(aFile))
{
DeploymentStatus status = null;
Exception de = null;
try
{
status = deploy(aFile);
}
catch (Exception e)
{
de = e;
}
if ( status != null && status.getStatus() == DeploymentStatus.STATUS_OKAY )
{
if (aFile.exists())
{
log.info("File: " + aFile.getAbsolutePath() + " deployed");
boolean result = aFile.delete();
if (!result)
{
log.error("Failed to remove: " + aFile);
}
}
}
else
{
if (status == null || status.getStatus() == DeploymentStatus.STATUS_EVAL)
{
log.warn("Unrecognized file " + aFile.getAbsolutePath());
}
else if ( de != null )
{