public void deploy(DeploymentUnit unit, Module deployment) throws DeploymentException
{
try
{
AbstractScanner scanner = new DeploymentUnitScanner(unit);
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)