@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (deploymentUnit.getParent() != null) {
return;
}
final CompositeIndex index = deploymentUnit.getAttachment(Attachments.COMPOSITE_ANNOTATION_INDEX);
addAnnotations(deploymentUnit, CdiAnnotations.BEAN_DEFINING_ANNOTATIONS);
addAnnotation(deploymentUnit, new AnnotationType(CdiAnnotations.MODEL.getDotName(), false));
addAnnotation(deploymentUnit, new AnnotationType(TransactionScoped.class));
addAnnotation(deploymentUnit, new AnnotationType(VIEW_SCOPED_NAME, true));
addAnnotation(deploymentUnit, new AnnotationType(FLOW_SCOPED_NAME, true));
for (AnnotationType annotationType : CdiAnnotations.BEAN_DEFINING_META_ANNOTATIONS) {
addAnnotations(deploymentUnit, getAnnotationsAnnotatedWith(index, annotationType.getName()));
}
}