
io.narayana.lra.arquillian.appender.MpLraTckAuxiliaryArchiveAppender Maven / Gradle / Ivy
/*
Copyright The Narayana Authors
SPDX-License-Identifier: Apache-2.0
*/
package io.narayana.lra.arquillian.appender;
import io.narayana.lra.arquillian.spi.NarayanaLRARecovery;
import org.jboss.arquillian.config.descriptor.api.ArquillianDescriptor;
import org.jboss.arquillian.config.descriptor.api.ExtensionDef;
import org.jboss.arquillian.container.test.spi.client.deployment.AuxiliaryArchiveAppender;
import org.jboss.arquillian.core.api.Instance;
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import java.util.Map;
import java.util.Optional;
/**
* As the MicroProfile LRA TCK is implementation agnostic, deployments created within the TCK must be
* enriched with dependencies, services and other needed properties/files in order to run the Narayana
* implementation of the MicroProfile LRA specification. This class is an ad-hoc AuxiliaryArchiveAppender
* developed exactly for this purpose and it can be activated specifying the activation class {@link io.narayana.lra.arquillian.MpLraTckExtension}
* in src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension. Moreover, this
* extension is activated when an extension section is defined in arquillian.xml of the module
*To activate this extension in your arquillian.xml, use the following construct:
* {@code }
*/
public class MpLraTckAuxiliaryArchiveAppender implements AuxiliaryArchiveAppender {
@Inject
Instance arquillianDescriptorInstance;
// manifest for WildFly deployment, it requires access to some other WildFly internal modules
final String ManifestMF = "Manifest-Version: 1.0\n"
+ "Dependencies: org.jboss.jandex, org.jboss.logging, org.jboss.modules\n";
public static final String EXTENSION_NAME = "MpLraTckAppender";
@Override
public Archive> createAuxiliaryArchive() {
ArquillianDescriptor arquillianDescriptor = arquillianDescriptorInstance.get();
Optional
© 2015 - 2025 Weber Informatics LLC | Privacy Policy