configureScanner(unit, scanner, config);
if (configuration != null)
config.merge(configuration); // override with custom config
scanner.setConfiguration(config);
AnnotationRepository repository = scanner.scan(unit.getClassLoader(), urls);
unit.addAttachment(AnnotationRepository.class, repository);
}
catch (Exception e)
{
throw DeploymentException.rethrowAsDeploymentException("Exception visiting module", e);