use of org.jboss.arquillian.config.descriptor.api.GroupDef in project keycloak by keycloak.
the class RegistryCreator method createRegistry.
public void createRegistry(@Observes ArquillianDescriptor event) {
ContainerRegistry reg = new Registry(injector.get());
ServiceLoader serviceLoader = loader.get();
log.info("arquillian.xml: " + System.getProperty("arquillian.xml"));
@SuppressWarnings("rawtypes") Collection<DeployableContainer> containers = serviceLoader.all(DeployableContainer.class);
if (containers.isEmpty()) {
throw new IllegalStateException("There are not any container adapters on the classpath");
}
// arquillian.xml
List<ContainerDef> containersDefs = event.getContainers();
// arquillian.xml
List<GroupDef> groupDefs = event.getGroups();
// dynamically loaded containers/groups
addAppServerContainers(containersDefs, groupDefs);
createRegistry(containersDefs, reg, serviceLoader);
for (GroupDef group : groupDefs) {
createRegistry(group.getGroupContainers(), reg, serviceLoader);
}
registry.set(reg);
}
Aggregations