public IAnnotationFinder create(DeploymentModule module) throws Exception {
IAnnotationFinder finder;
if (module instanceof WebModule) {
WebModule webModule = (WebModule) module;
final AnnotationFinder annotationFinder = new AnnotationFinder(new WebappAggregatedArchive(webModule, webModule.getScannableUrls()));
if (annotationFinder.hasMetaAnnotations()) annotationFinder.enableMetaAnnotations();
if (enableFindSubclasses()) annotationFinder.enableFindSubclasses();
finder = annotationFinder;
} else if (module instanceof ConnectorModule) {
ConnectorModule connectorModule = (ConnectorModule) module;
finder = new AnnotationFinder(new ConfigurableClasspathArchive(connectorModule, connectorModule.getLibraries())).link();