org.jboss.arquillian.container.test.spi.client.deployment.ProtocolArchiveProcessor Java Examples
The following examples show how to use
org.jboss.arquillian.container.test.spi.client.deployment.ProtocolArchiveProcessor.
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: MicroProfileOpenAPITCKDeploymentPackager.java From tomee with Apache License 2.0 | 6 votes |
@Override public Archive<?> generateDeployment(final TestDeployment testDeployment, final Collection<ProtocolArchiveProcessor> processors) { final WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "microprofile-openapi.war") .merge(testDeployment.getApplicationArchive()) // TODO - This doesn't seem right. This is for the JAX-RS endpoints to be CDI scanned. // This is to use CDI events to filter endpoints with configuration. // Check org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension.findEndpointsAndApplication() // A beans.xml should not be required. .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml") ; // MP Config in wrong place - See https://github.com/eclipse/microprofile/issues/46. if (testDeployment.getApplicationArchive() instanceof WebArchive) { final Map<ArchivePath, Node> content = testDeployment.getApplicationArchive().getContent( object -> object.get().matches(".*META-INF/.*")); content.forEach((archivePath, node) -> webArchive.addAsResource(node.getAsset(), node.getPath())); } return super.generateDeployment( new TestDeployment(null, webArchive, testDeployment.getAuxiliaryArchives()), processors); }
Example #2
Source File: MicroProfileOpenTracingTCKDeploymentPackager.java From tomee with Apache License 2.0 | 6 votes |
@Override public Archive<?> generateDeployment(final TestDeployment testDeployment, final Collection<ProtocolArchiveProcessor> processors) { final WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "microprofile-opentracing.war") .merge(testDeployment.getApplicationArchive()); // opentracing-api jar added by Geronimo Impl. Also added by TCK causes issues with same classes in different Classloaders final Map<ArchivePath, Node> content = webArchive.getContent(object -> object.get().matches(".*opentracing-api.*jar.*")); content.forEach((archivePath, node) -> webArchive.delete(archivePath)); // TCK expects a MockTracer. Check org/eclipse/microprofile/opentracing/tck/application/TracerWebService.java:133 webArchive.addAsLibrary(jarLocation(MockTracer.class)); webArchive.addAsLibrary(jarLocation(ThreadLocalScopeManager.class)); webArchive.addAsWebInfResource("META-INF/beans.xml"); webArchive.addClass(MicroProfileOpenTracingTCKTracer.class); System.out.println(webArchive.toString(true)); return super.generateDeployment( new TestDeployment(null, webArchive, testDeployment.getAuxiliaryArchives()), processors); }
Example #3
Source File: TestDeploymentPackager.java From camel-spring-boot with Apache License 2.0 | 5 votes |
@Override public Archive<?> generateDeployment(TestDeployment testDeployment, Collection<ProtocolArchiveProcessor> collection) { Archive<?> applicationArchive = testDeployment.getApplicationArchive(); boolean isClassPath = ClassPath.isRepresentedBy(applicationArchive); for (Archive<?> auxiliaryArchive : testDeployment.getAuxiliaryArchives()) { if (isClassPath) { applicationArchive.add(auxiliaryArchive, ClassPath.ROOT_ARCHIVE_PATH, ZipExporter.class); } else { applicationArchive.merge(auxiliaryArchive); } } return applicationArchive; }
Example #4
Source File: MicroProfileMetricsTCKDeploymentPackager.java From tomee with Apache License 2.0 | 5 votes |
@Override public Archive<?> generateDeployment(final TestDeployment testDeployment, final Collection<ProtocolArchiveProcessor> processors) { final Archive<?> applicationArchive = testDeployment.getApplicationArchive(); if (applicationArchive instanceof JavaArchive) { final WebArchive wrapperWar = ShrinkWrap.create(WebArchive.class, "microprofile-metrics.war").addAsLibrary(applicationArchive); return super.generateDeployment(new TestDeploymentDelegate(testDeployment, wrapperWar), processors); } return super.generateDeployment(testDeployment, processors); }
Example #5
Source File: MetricsExtension.java From smallrye-metrics with Apache License 2.0 | 4 votes |
@Override public void register(ExtensionBuilder extensionBuilder) { extensionBuilder.service(ProtocolArchiveProcessor.class, ArchiveProcessor.class); }
Example #6
Source File: JaxRsMetricsExtension.java From smallrye-metrics with Apache License 2.0 | 4 votes |
@Override public void register(ExtensionBuilder extensionBuilder) { extensionBuilder.service(ProtocolArchiveProcessor.class, JaxRsMetricsActivatingProcessor.class); }