AnnotationsScanningPlugin plugin = new AnnotationsScanningPlugin(unit.getClassLoader());
scanner.addPlugin(plugin);
scanner.scan();
AnnotationRepository repository = unit.getAttachment(plugin.getAttachmentKey(), AnnotationRepository.class);
unit.addAttachment(AnnotationRepository.class, repository);
}
catch (Exception e)
{
throw DeploymentException.rethrowAsDeploymentException("Cannot create AR", e);