use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class MessageDestinationTestCase method getDeployment.
@Deployment
public static Archive getDeployment() {
final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "MessageDestinationTestCase.jar");
ejbJar.addPackage(MessageDestinationTestCase.class.getPackage());
ejbJar.addPackage(JMSOperations.class.getPackage());
ejbJar.addClass(JmsQueueSetup.class);
ejbJar.addAsManifestResource(MessageDestinationTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml");
ejbJar.addAsManifestResource(MessageDestinationTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml");
ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr \n"), "MANIFEST.MF");
return ejbJar;
}
use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class RunAsPrincipalTestCase method runAsStartupTransitiveDeployment.
@Deployment(name = STARTUP_SINGLETON_DEPLOYMENT, managed = false, testable = false)
public static Archive<?> runAsStartupTransitiveDeployment() {
// using JavaArchive doesn't work, because of a bug in Arquillian, it only deploys wars properly
final WebArchive war = ShrinkWrap.create(WebArchive.class, STARTUP_SINGLETON_DEPLOYMENT + ".war").addClass(WhoAmI.class).addClass(StatelessBBean.class).addClass(SingletonStartupBean.class).addPackage(Assert.class.getPackage()).addClass(Util.class).addClass(Entry.class).addClass(RunAsPrincipalTestCase.class).addClasses(AbstractSecurityDomainSetup.class, EjbSecurityDomainSetup.class).addAsWebInfResource(RunAsPrincipalTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF");
war.addPackage(CommonCriteria.class.getPackage());
return war;
}
use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class SecurityDDOverrideTestCase method runAsDeployment.
@Deployment
public static Archive<?> runAsDeployment() {
final Package currentPackage = SecurityDDOverrideTestCase.class.getPackage();
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "ejb3-security-partial-dd-test.jar").addPackage(PartialDDBean.class.getPackage()).addClass(Util.class).addClasses(AbstractSecurityDomainSetup.class, EjbSecurityDomainSetup.class).addAsResource(currentPackage, "users.properties", "users.properties").addAsResource(currentPackage, "roles.properties", "roles.properties").addAsManifestResource(currentPackage, "partial-ejb-jar.xml", "ejb-jar.xml").addAsManifestResource(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF").addAsManifestResource(currentPackage, "permissions.xml", "permissions.xml").addPackage(CommonCriteria.class.getPackage());
return jar;
}
use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class AsynchronousSecurityTestCase method deploy.
@Deployment
public static Archive<?> deploy() {
final Package currentPackage = AsynchronousSecurityTestCase.class.getPackage();
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar").addPackage(currentPackage).addClass(AnnotationAuthorizationTestCase.class).addClasses(EjbSecurityDomainSetup.class, AbstractSecurityDomainSetup.class, ServerSetupTask.class, Util.class).addAsResource(currentPackage, "roles.properties", "roles.properties").addAsResource(currentPackage, "users.properties", "users.properties").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF").addAsManifestResource(currentPackage, "permissions.xml", "permissions.xml").addPackage(CommonCriteria.class.getPackage());
return jar;
}
use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class ServletUnitTestCase method deployEjbs.
@Deployment(name = "ejb", order = 2)
public static Archive<?> deployEjbs() {
JavaArchive jar = getEjbs("ejb3-servlet-ejbs.jar");
jar.addAsManifestResource(new StringAsset("Dependencies: deployment.ejb3-servlet-client.jar \n"), "MANIFEST.MF");
return jar;
}
Aggregations