make sure the tested archive contains beans.xml
Some TCK tests don't add `beans.xml` to the main tested archive.
This commit changes the `ApplicationArchiveProcessor` to add
empty `beans.xml` to such archives, because the Arquillian Weld
container requires the file to be present (that is, it doesn't
recognize implicit bean archives).
@@ -55,6 +55,11 @@ public class FaultToleranceApplicationArchiveProcessor implements ApplicationArc
classContainer.addClass(HystrixCommandSemaphoreCleanup.class);
classContainer.addAsResource(EmptyAsset.INSTANCE, "META-INF/beans.xml");
}
+
+ if (!applicationArchive.contains("META-INF/beans.xml")) {
+ applicationArchive.add(EmptyAsset.INSTANCE, "META-INF/beans.xml");
+ }
+
LOGGER.info("Added additional resources to " + applicationArchive.toString(true));
}
}
