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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations