@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
String name = phaseContext.getDeploymentUnit().getName();
ResourceRoot root = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT);
TrackerService service = getTrackerService(phaseContext.getServiceRegistry(), name);
if (service != null) {
VirtualFile cool = root.getRoot().getChild("META-INF/cool.txt");
service.addDeployment(name);
if (cool.exists()) {
service.addCoolDeployment(name);
}
}
}