org.jboss.shrinkwrap.api.container.ResourceContainer Java Examples
The following examples show how to use
org.jboss.shrinkwrap.api.container.ResourceContainer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ArchiveProcessor.java From smallrye-metrics with Apache License 2.0 | 5 votes |
@Override public void process(Archive<?> applicationArchive, TestClass testClass) { if (applicationArchive instanceof ResourceContainer) { ResourceContainer archive = (ResourceContainer) applicationArchive; archive.addAsResource("io/smallrye/metrics/base-metrics.properties", "/io/smallrye/metrics/base-metrics.properties"); } else { throw new IllegalStateException(this.getClass().getCanonicalName() + " works only with ResourceContainers"); } }
Example #2
Source File: FaultToleranceApplicationArchiveProcessor.java From thorntail with Apache License 2.0 | 5 votes |
@Override public void process(Archive<?> applicationArchive, TestClass testClass) { if (!(applicationArchive instanceof ResourceContainer)) { LOGGER.warning("Unable to add Hystrix-related project-defaults.yaml - not a resource container: " + applicationArchive); return; } ResourceContainer<?> resourceContainer = (ResourceContainer<?>) applicationArchive; resourceContainer.addAsResource(new File("src/test/resources/project-defaults.yml")); LOGGER.info("Added project-defaults.yaml to " + applicationArchive.toString(true)); }