Search in sources :

Example 6 with JavaArchive

use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.

the class RaWithElytronAuthContextTestCase method deploymentSingleton.

@Deployment
public static Archive<?> deploymentSingleton() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "single.jar").addClass(RaWithElytronAuthContextTestCase.class).addPackage(MultipleConnectionFactory1.class.getPackage());
    jar.addClasses(AbstractElytronSetupTask.class, ServerSetupTask.class);
    final ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, "test.rar").addAsLibrary(jar).addAsManifestResource(RaWithElytronAuthContextTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(RaWithElytronAuthContextTestCase.class.getPackage(), "ironjacamar-elytron.xml", "ironjacamar.xml");
    return rar;
}
Also used : ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) MultipleConnectionFactory1(org.jboss.as.test.integration.jca.rar.MultipleConnectionFactory1) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 7 with JavaArchive

use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.

the class ListenerTestCase method getDeployment.

@Deployment
public static Archive<?> getDeployment() {
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "dummy.jar");
    ja.addClass(ListenerTestCase.class);
    return ja;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 8 with JavaArchive

use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.

the class JAASIdentityCachingTestCase method earDeployment.

// Public methods --------------------------------------------------------
/**
     * Creates {@link EnterpriseArchive} deployment.
     */
@Deployment
public static EnterpriseArchive earDeployment() {
    final JavaArchive libJar = ShrinkWrap.create(JavaArchive.class, LM_LIB_NAME).addClasses(CustomLoginModule.class, CustomPrincipal.class);
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, JAR_BASE_NAME + ".jar").addClasses(Hello.class, HelloBean.class).addAsManifestResource(Utils.getJBossEjb3XmlAsset(TEST_NAME), "jboss-ejb3.xml");
    final WebArchive war = ShrinkWrap.create(WebArchive.class, WAR_BASE_NAME + ".war").addClasses(HelloEJBCallServlet.class, //
    LMCounterServlet.class).addAsWebInfResource(UsersRolesLoginModuleTestCase.class.getPackage(), "web-basic-authn.xml", //
    "web.xml").addAsWebInfResource(Utils.getJBossWebXmlAsset(TEST_NAME), "jboss-web.xml");
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_BASE_NAME + ".ear");
    ear.addAsLibrary(libJar);
    ear.addAsModule(war);
    ear.addAsModule(ejbJar);
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) Hello(org.jboss.as.test.integration.security.common.ejb3.Hello) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) HelloBean(org.jboss.as.test.integration.security.common.ejb3.HelloBean) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 9 with JavaArchive

use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.

the class EjbXACMLAuthorizationModuleTestCase method createJar.

// Private methods -------------------------------------------------------
/**
     * Creates JAR with the EJB for the test deployment.
     *
     * @param archiveName
     * @param securityDomainName
     * @return
     */
private static JavaArchive createJar(final String archiveName, final String securityDomainName) {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, archiveName).addClasses(HelloBean.class, Hello.class, CustomXACMLAuthorizationModule.class).addAsResource(new StringAsset("jduke=theduke\nJohnDoe=jdoe"), "users.properties").addAsResource(new StringAsset("jduke=TestRole,TestRole2\nJohnDoe=TestRole"), "roles.properties").addAsResource(EjbXACMLAuthorizationModuleTestCase.class.getPackage(), XACMLTestUtils.TESTOBJECTS_CONFIG + "/jbossxacml-config.xml", "jbossxacml-config.xml").addAsResource(EjbXACMLAuthorizationModuleTestCase.class.getPackage(), XACMLTestUtils.TESTOBJECTS_POLICIES + "/ejb-xacml-policy.xml", "xacml-policy.xml").addAsManifestResource(EjbXACMLAuthorizationModuleTestCase.class.getPackage(), XACMLTestUtils.TESTOBJECTS_CONFIG + "/jboss-ejb3.xml", "jboss-ejb3.xml");
    XACMLTestUtils.addJBossDeploymentStructureToArchive(jar);
    jar.addClasses(AbstractSecurityDomainsServerSetupTask.class);
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) Hello(org.jboss.as.test.integration.security.common.ejb3.Hello) HelloBean(org.jboss.as.test.integration.security.common.ejb3.HelloBean) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive)

Example 10 with JavaArchive

use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.

the class JBossPDPInteroperabilityTestCase method deployment.

// Public methods --------------------------------------------------------
/**
     * Creates {@link JavaArchive} for the deployment.
     *
     * @return
     */
@Deployment
public static JavaArchive deployment() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "pdp-service-bean.jar");
    jar.addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
    XACMLTestUtils.addCommonClassesToArchive(jar);
    XACMLTestUtils.addJBossDeploymentStructureToArchive(jar);
    XACMLTestUtils.addXACMLPoliciesToArchive(jar);
    //we need this because of "in-container" testing
    for (int i = 1; i <= 7; i++) {
        jar.addAsResources(JBossPDPServletInitializationTestCase.class.getPackage(), XACMLTestUtils.TESTOBJECTS_REQUESTS + "/scenario2-testcase" + i + "-request.xml");
    }
    jar.addAsResource(JBossPDPServletInitializationTestCase.class.getPackage(), XACMLTestUtils.TESTOBJECTS_REQUESTS + "/med-example-request.xml");
    return jar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) PolicyDecisionPoint(org.jboss.security.xacml.interfaces.PolicyDecisionPoint) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)1209 Deployment (org.jboss.arquillian.container.test.api.Deployment)979 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)301 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)192 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)183 File (java.io.File)125 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)109 Asset (org.jboss.shrinkwrap.api.asset.Asset)89 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)62 ZipExporter (org.jboss.shrinkwrap.api.exporter.ZipExporter)57 PropertyPermission (java.util.PropertyPermission)46 InputStream (java.io.InputStream)39 TargetsContainer (org.jboss.arquillian.container.test.api.TargetsContainer)36 Test (org.junit.Test)36 ArchivePath (org.jboss.shrinkwrap.api.ArchivePath)31 FilePermission (java.io.FilePermission)29 OSGiManifestBuilder (org.jboss.osgi.metadata.OSGiManifestBuilder)26 BeansXml (org.jboss.shrinkwrap.impl.BeansXml)22 CommandSupport (io.fabric8.itests.support.CommandSupport)18 ManifestBuilder (org.jboss.gravia.resource.ManifestBuilder)18